Hello, Steve -
This is a follow-up post from
here on the request for APIs on creating and modifying Playlists from Subsonic Plugin. I have written down the requirements in a user story/gherkin format. Let me know if you have any questions.
For Create Playlist(s) As a user, I would like to create a playlist of songs within my Subsonic server, so that I can access it anywhere on various clients
Saving the playlistGiven that users have selected one or more songs that are part of Subsonic
When they invoke an option to save it as a playlists
Then they should be provided with a way to save the playlist on Subsonic server
Options while saving the playlistsGiven that users have selected songs to save as playlists
When they invoke option to save
Then they are provided with options to enter a name, description and private/public flag for the Playlist
For Editing and Modifying Playlists' attributesAs a user who owns the playlists, I would like to edit and modify playlists' name, description and/or the private/public flag, so that I control the playlists
User who owns the playlistsGiven that user selected a playlist
When they edit the Playlist
Then they should see an option to edit its attributes - Name, Description, and Flag.
User who does not own the playlists - Shared playlistsGiven that the user selects playlists
When they try to edit the playlists
Then they do not see options to modify any of the attributes
For Deleting Playlist(s)As a user, I would like to delete a playlist I own, so that I have a complete control on my playlists.
User who owns the playlistsGiven that user selected a playlist
When they delete the Playlist
Then they are presented with a confirmation for deletion
And upon confirmation, the playlists get deleted from the Subsonic server
User who does not own the playlists - Shared playlistsGiven that the user selects playlists
When they try to delete the playlists
Then they do not see an option to delete the playlists
For modifying the contents of the playlist(s)As a user who owns the playlists, I should be able to modify the contents of the playlists, i.e., add or remove songs from the playlist so that I can customize and publish the playlists to be accessible across devices
RemovingGiven that user selects the playlists
When they view the songs that make up the playlist
Then they see an option to remove one or more songs from the playlists (either right-click or other means) on Subsonic
//Per Subsonic API, the remove takes the index of the song within the playlist and not the songId.
AddingGiven that user is viewing an album or a playlist of songs
When they right click on the song/songs
Then they see an option to add the songs to the playlists on Subsonic server
//Per Subsonic API, the add takes the songId.
Non-ownersGiven that users who do not own the playlist views it
When they right-click a song/songs
Then they do not see an option to remove songs from the playlist they do not own on Subsonic
And they do not see an option to add songs to a playlist they do not own on Subsonic