mopidy-tidal
mopidy-tidal copied to clipboard
Support for playlist edit
Closes #75
Known limitations:
- Bulk removals may be a bit slow because the current API seems to only support one removal per call
- Additions are always appended to the end of the playlist because that's the only API that seems supported
- Swapping track positions isn't really supported - a first look at the call made by the Tidal client shows a
POST
request to the playlist item URL with thetoIndex
argument, but I haven't found anything like that in thetidalapi
package
Any volunteers who would like to test this PR? @tehkillerbee @2e0byo @fmarzocca
I have been doing playlist edits for the past few days without issues, tested both from ncmpcpp, Iris and M.A.L.P. However, all these clients are also compatible with the limitations of the current implementation - only support for "Add to playlist" (i.e. append at the end, not in the middle), and swapping only works with adjacent tracks so we can get away with a DELETE followed by a POST. I'd be interested to know how things work with other clients though.
@BlackLight Definitely. I can only test with Iris, as this is what I currently. If there are other clients you suggest testing with, I'll give it a try.
@BlackLight First initial tests:
- Adding to existing playlist in Iris does not seem to work; "Action failed (addTracksToPlaylist) Not supported on this type of object"
- Creating new playlist and then adding tracks to it works great.
- Deleting new playlists, existing playlists works, although playlist view must be refreshed manually.
- Existing playlists are not always shown in the "Add to playlist" dropdown. It seems the playlists must be browsed/created before they appear.
@tehkillerbee I think 4 is just a limitation of iris in general. I'm up for testing this, though I too only use iris! I'll pull it down in a bit.
@tehkillerbee I think 4 is just a limitation of iris in general. I'm up for testing this, though I too only use iris! I'll pull it down in a bit.
After further testing, I noticed the playlists provided as m3u files do show up automatically. So I wonder how they are populated in Iris. Tidal playlists only show up if added manually or when browsing them individually
@tehkillerbee I think some work is required on mopidy-iris side as well.
At a first look, it seems that Iris inspect the can_edit
attribute on the Playlist
object to tell whether a user can create a playlist of that type, or add/remove tracks into it.
An entry exists for Spotify - one should probably be added for Tidal as well.
Besides that, playlist editing, creation and deletion seems to work quite well over MPD. I mostly use the mopidy-mpd backend to connect to MPD clients, and I have tested playlist edit mostly through ncmpcpp and mpc command-line commands. mopidy-mobile also works by the way, since it's a bit less opinionated than Iris about what playlists can actually be edited.
@BlackLight Since this is mainly an Iris Issue, I think we can merge this PR and add it to the Iris todo list.