Open chrisknepper opened 2 years ago
With the announcement that Plex will no longer support Tidal this is more urgent now then ever (or less) but I'd like to export my playlists that are mixed between local and tidal songs.
The issue is only with removing or moving Tidal tracks in a playlist. There should be nothing preventing you from just listing Tidal tracks in a playlist.
Describe the Bug
If you have a Plex playlist mixed with regular songs and Tidal songs and you attempt to add/move/update/remove the Tidal song, an exception is thrown. This is because the methods all rely on
ratingKey
which is alwaysnan
for Tidal songs, at least when they are in Plex playlists. In particular themoveItem
andremoveItems
methods call_getPlaylistItemID
which loops through the playlist and compares theratingKey
which will of course fail fornan
values.This worked in a previous version of the library because
_getPlaylistItemID
did not exist and the move/update/delete methods simply assumed the existence ofplaylistItemID
.A workaround if
playlistItemID
can be safely assumed to exist is to copy the underlying API calls and run them.Code Snippets
Expected Behavior
No response
Additional Context
A Tidal song can be added to a normal Plex (not Tidal) playlist by finding a Tidal song within the Plex UI, adding it to a playlist, and taking care to select a Plex playlist and not a Tidal playlist.
Compare
https://github.com/pkkid/python-plexapi/blob/3d3f9da5012428f5d703cf9f8e95f6aa10673ea6/plexapi/playlist.py#L254
to
https://github.com/pkkid/python-plexapi/blame/445897798831955ced99d3de1f7a806e5ee33549/plexapi/playlist.py#L219
Appears to have been broken via
https://github.com/pkkid/python-plexapi/commit/38114b62ba8bc488a18673173248bb32b9cb7dc2
Operating System and Version
macOS 13.0.1
Plex Media Server Version
1.29.2.6364
Python Version
3.10.8
PlexAPI Version
4.13.1