You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
I was fairly sure we already had at least one issue for this, so this might be a dupe, just can't seem to find the other ones.
That being said we already have core methods for handling playlist creation, updates and deletes (and have rejected a previous attempt to add playlist support because it was adding more APIs instead of using the ones we had).
Other than that the main issue is if we should support multibackend playlists or not. If we go for multibackend in creates quite a bit of headaches in how to expose it cleanly in the APIs, in the UIs and how to handle that some backends can only handle certain track types.
The simpler, but much more limited variant is to just say you can have a single playlist provider. But then you would have to choose between using local which could handle all URI types, or spotify which could only handle itself (and technically local, but not in mopidy).
I would think the simpler option is good enough to go with here. Synchronizing local music with spotify across devices outside of the spotify client is going to be a very weird thing anyway, and in the main playlist you could still have music from different backends (right?).
Hi. I'm just looking over mopidy source & docs, but can't find any API related to writing tracks to playlist. It looks like M3U playlist can be saved, but there is no way how to modify list of tracks inside of it.
That being said we already have core methods for handling playlist creation, updates and deletes
@adamcik Could you, please, direct me to those methods? I'd like to have this functionality, so I'm thinking of implementing it myself, but, of course, I don't want to add stuff that's already there...
After some digging trough code, I managed to implement playlistmove commmand and test it with GMPC. Please, stop me if I'm abusing non-documented stuff or doing something wrong.
defplaylistmove(context, name, from_pos, to_pos):
# (comment stripped)uri=context.lookup_playlist_uri_from_name(name)
raiseexceptions.MpdNoExistError('No such playlist')
return# Nothing to do# Convert tracks to list and perform movetracks=list(playlist.tracks)
# Replace tracks and save playlistplaylist=playlist.replace(tracks=tracks)