···88 "parameters": {
99 "type": "params",
1010 "required": [
1111- "uri"
1111+ "uri",
1212+ "directory"
1213 ],
1314 "properties": {
1415 "uri": {
···1920 "directory": {
2021 "type": "string",
2122 "description": "The directory (id) to insert into the playlist"
2323+ },
2424+ "position": {
2525+ "type": "integer",
2626+ "description": "The position in the playlist to insert the directory at, if not specified, the directory will be appended"
2227 }
2328 }
2429 }
+6-1
apps/api/lexicons/playlist/insertFiles.json
···88 "parameters": {
99 "type": "params",
1010 "required": [
1111- "uri"
1111+ "uri",
1212+ "files"
1213 ],
1314 "properties": {
1415 "uri": {
···2223 "type": "string",
2324 "description": "List of file (id) to insert into the playlist"
2425 }
2626+ },
2727+ "position": {
2828+ "type": "integer",
2929+ "description": "The position in the playlist to insert the files at, if not specified, files will be appended"
2530 }
2631 }
2732 }
+8
apps/api/lexicons/playlist/startPlaylist.json
···1515 "type": "string",
1616 "description": "The URI of the playlist to start",
1717 "format": "at-uri"
1818+ },
1919+ "shuffle": {
2020+ "type": "boolean",
2121+ "description": "Whether to shuffle the playlist when starting it"
2222+ },
2323+ "position": {
2424+ "type": "integer",
2525+ "description": "The position in the playlist to start from, if not specified, starts from the beginning"
1826 }
1927 }
2028 }
+5-1
apps/api/pkl/defs/playlist/insertDirectory.pkl
···88 description = "Insert a directory into a playlist"
99 parameters {
1010 type = "params"
1111- required = List("uri")
1111+ required = List("uri", "directory")
1212 properties {
1313 ["uri"] = new StringType {
1414 type = "string"
···1818 ["directory"] = new StringType {
1919 type = "string"
2020 description = "The directory (id) to insert into the playlist"
2121+ }
2222+ ["position"] = new IntegerType {
2323+ type = "integer"
2424+ description = "The position in the playlist to insert the directory at, if not specified, the directory will be appended"
2125 }
2226 }
2327 }
+5-1
apps/api/pkl/defs/playlist/insertFiles.pkl
···88 description = "Insert files into a playlist"
99 parameters {
1010 type = "params"
1111- required = List("uri")
1111+ required = List("uri", "files")
1212 properties {
1313 ["uri"] = new StringType {
1414 type = "string"
···2121 type = "string"
2222 description = "List of file (id) to insert into the playlist"
2323 }
2424+ }
2525+ ["position"] = new IntegerType {
2626+ type = "integer"
2727+ description = "The position in the playlist to insert the files at, if not specified, files will be appended"
2428 }
2529 }
2630 }
+8
apps/api/pkl/defs/playlist/startPlaylist.pkl
···1515 description = "The URI of the playlist to start"
1616 format = "at-uri"
1717 }
1818+ ["shuffle"] = new BooleanType {
1919+ type = "boolean"
2020+ description = "Whether to shuffle the playlist when starting it"
2121+ }
2222+ ["position"] = new IntegerType {
2323+ type = "integer"
2424+ description = "The position in the playlist to start from, if not specified, starts from the beginning"
2525+ }
1826 }
1927 }
2028 }
···23442344 description: 'Insert a directory into a playlist',
23452345 parameters: {
23462346 type: 'params',
23472347- required: ['uri'],
23472347+ required: ['uri', 'directory'],
23482348 properties: {
23492349 uri: {
23502350 type: 'string',
···23542354 directory: {
23552355 type: 'string',
23562356 description: 'The directory (id) to insert into the playlist',
23572357+ },
23582358+ position: {
23592359+ type: 'integer',
23602360+ description:
23612361+ 'The position in the playlist to insert the directory at, if not specified, the directory will be appended',
23572362 },
23582363 },
23592364 },
···23692374 description: 'Insert files into a playlist',
23702375 parameters: {
23712376 type: 'params',
23722372- required: ['uri'],
23772377+ required: ['uri', 'files'],
23732378 properties: {
23742379 uri: {
23752380 type: 'string',
···23822387 type: 'string',
23832388 description: 'List of file (id) to insert into the playlist',
23842389 },
23902390+ },
23912391+ position: {
23922392+ type: 'integer',
23932393+ description:
23942394+ 'The position in the playlist to insert the files at, if not specified, files will be appended',
23852395 },
23862396 },
23872397 },
···25142524 type: 'string',
25152525 description: 'The URI of the playlist to start',
25162526 format: 'at-uri',
25272527+ },
25282528+ shuffle: {
25292529+ type: 'boolean',
25302530+ description: 'Whether to shuffle the playlist when starting it',
25312531+ },
25322532+ position: {
25332533+ type: 'integer',
25342534+ description:
25352535+ 'The position in the playlist to start from, if not specified, starts from the beginning',
25172536 },
25182537 },
25192538 },
···1212 /** The URI of the playlist to start */
1313 uri: string
1414 /** The directory (id) to insert into the playlist */
1515- directory?: string
1515+ directory: string
1616+ /** The position in the playlist to insert the directory at, if not specified, the directory will be appended */
1717+ position?: number
1618}
17191820export type InputSchema = undefined
···1111export interface QueryParams {
1212 /** The URI of the playlist to start */
1313 uri: string
1414- files?: string[]
1414+ files: string[]
1515+ /** The position in the playlist to insert the files at, if not specified, files will be appended */
1616+ position?: number
1517}
16181719export type InputSchema = undefined
···1111export interface QueryParams {
1212 /** The URI of the playlist to start */
1313 uri: string
1414+ /** Whether to shuffle the playlist when starting it */
1515+ shuffle?: boolean
1616+ /** The position in the playlist to start from, if not specified, starts from the beginning */
1717+ position?: number
1418}
15191620export type InputSchema = undefined
+2
apps/api/src/schema/index.ts
···1616import playlistTracks from "./playlist-tracks";
1717import playlists from "./playlists";
1818import profileShouts from "./profile-shouts";
1919+import queueTracks from "./queue-tracks";
1920import scrobbles from "./scrobbles";
2021import shoutLikes from "./shout-likes";
2122import shoutReports from "./shout-reports";
···6263 googleDrivePaths,
6364 dropbox,
6465 googleDrive,
6666+ queueTracks,
6567};
···11import { Context } from "context";
22import { Server } from "lexicon";
33-import spotifyPause from "./app/rocksky//spotify/pause";
44-import spotifyPlay from "./app/rocksky//spotify/play";
55-import spotifySeek from "./app/rocksky//spotify/seek";
63import getActorAlbums from "./app/rocksky/actor/getActorAlbums";
74import getActorArtists from "./app/rocksky/actor/getActorArtists";
85import getActorLovedSongs from "./app/rocksky/actor/getActorLovedSongs";
···3532import dislikeSong from "./app/rocksky/like/dislikeSong";
3633import likeShout from "./app/rocksky/like/likeShout";
3734import likeSong from "./app/rocksky/like/likeSong";
3535+import addItemsToQueue from "./app/rocksky/player/addItemsToQueue";
3836import getCurrentlyPlaying from "./app/rocksky/player/getCurrentlyPlaying";
3737+import getPlaybackQueue from "./app/rocksky/player/getPlaybackQueue";
3938import next from "./app/rocksky/player/next";
4039import pause from "./app/rocksky/player/pause";
4140import play from "./app/rocksky/player/play";
4141+import playDirectory from "./app/rocksky/player/playDirectory";
4242+import playFile from "./app/rocksky/player/playFile";
4243import previous from "./app/rocksky/player/previous";
4344import seek from "./app/rocksky/player/seek";
4545+import createPlaylist from "./app/rocksky/playlist/createPlaylist";
4446import getPlaylist from "./app/rocksky/playlist/getPlaylist";
4547import getPlaylists from "./app/rocksky/playlist/getPlaylists";
4848+import insertDirectory from "./app/rocksky/playlist/insertDirectory";
4949+import insertFiles from "./app/rocksky/playlist/insertFiles";
5050+import removePlaylist from "./app/rocksky/playlist/removePlaylist";
5151+import startPlaylist from "./app/rocksky/playlist/startPlaylist";
4652import createScrobble from "./app/rocksky/scrobble/createScrobble";
4753import getScrobble from "./app/rocksky/scrobble/getScrobble";
4854import getScrobbles from "./app/rocksky/scrobble/getScrobbles";
···6066import getSongs from "./app/rocksky/song/getSongs";
6167import spotifyGetCurrentlyPlaying from "./app/rocksky/spotify/getCurrentlyPlaying";
6268import spotifyNext from "./app/rocksky/spotify/next";
6969+import spotifyPause from "./app/rocksky/spotify/pause";
7070+import spotifyPlay from "./app/rocksky/spotify/play";
6371import spotifyPrevious from "./app/rocksky/spotify/previous";
7272+import spotifySeek from "./app/rocksky/spotify/seek";
6473import getStats from "./app/rocksky/stats/getStats";
65746675export default function (server: Server, ctx: Context) {
···127136 spotifyPlay(server, ctx);
128137 getStats(server, ctx);
129138 createSong(server, ctx);
139139+ addItemsToQueue(server, ctx);
140140+ getPlaybackQueue(server, ctx);
141141+ playDirectory(server, ctx);
142142+ playFile(server, ctx);
143143+ createPlaylist(server, ctx);
144144+ insertDirectory(server, ctx);
145145+ insertFiles(server, ctx);
146146+ removePlaylist(server, ctx);
147147+ startPlaylist(server, ctx);
130148131149 return server;
132150}