Plex-Meta-Manager
Plex-Meta-Manager copied to clipboard
[Playlist] Unexpected Deletion from Admin Account
Version Number
1.20.0-nightly29
What branch are you on?
nightly
Describe the Bug
Description:
When the delete_playlist: true
option is set under - pmm: playlist
in the configuration, the playlists are expected to be deleted only from the users specified under sync_to_users
. However, the playlists are also being deleted from the admin account.
Steps to Reproduce:
- Set the following configuration:
playlist_files:
- pmm: playlist
template_variables:
libraries: [library name]
sync_to_users: Bob
delete_playlist: true
- Run the program.
Expected Result:
The playlists should be deleted only from the user ‘Bob’ as specified under sync_to_users
.
Actual Result:
The playlists are being deleted from both the user ‘Bob’ and the admin account ‘Ben’.
Code Snippet:
In the delete
method in builder.py
, the playlist is deleted from the admin account (self.library.delete(self.obj)
) before it is deleted from the users specified under sync_to_users
(self.library.delete_user_playlist(title, user)
).
def delete(self):
...
if self.obj:
self.library.delete(self.obj) # This actually delete the playlist on Ben
...
if self.playlist and self.valid_users:
for user in self.valid_users:
self.library.delete_user_playlist(title, user) # This delete the playlist for the regular user(s)
...
return output
Documentation Reference:
The documentation states the following for delete_playlist
: “Will delete all playlists for the users defined by sync_to_users.”
Relevant Collection/Overlay/Playlist Definition
No response
Logs
No response