blacktwin / JBOPS

Just a Bunch Of Plex Scripts
1.7k stars 304 forks source link

Playlist Manager script adds then deletes custom playlist #303

Closed irodimus closed 3 years ago

irodimus commented 3 years ago

Describe the bug

Updated to commit a479596b350f3a2d44e279ee787e1ad0dfa9e19c for playlist_manager.py script. Use the script with random to create genre related playlists. When running script using the update command, it will delete any playlist showing and then add a new playlist like normal. On the next loop, it will delete the last created playlist and create a new playlist, repeating depending how many times you run the command.

To Reproduce

Steps to reproduce the behavior:

  1. Create a new "playlist_1".
  2. Run playlist manager using the update command creating a new "playlist_2" as well.
  3. "playlist_1" will be deleted and the script will create "playlist_2"
  4. If you had run the script again, "playlist_2" will be deleted and "playlist_3" will be created.
Deleting the playlist(s)...
...Deleted Playlist: 45 Futurama for 'admin'.
Creating playlist(s)...
...Added Playlist: 01 Science Fiction to 'admin'.
Done.
Deleting the playlist(s)...
...Deleted Playlist: 01 Science Fiction for 'admin'.
Creating playlist(s)...
...Added Playlist: 02 Action to 'admin'.
Done.
Deleting the playlist(s)...
...Deleted Playlist: 02 Action for 'admin'.
Creating playlist(s)...
...Added Playlist: 03 Comedy to 'admin'.
Done.

Expected behavior

Delete the previous playlist and create(update) the new playlist

Desktop (please complete the following information):

blacktwin commented 3 years ago

What are the arguments you're using?

irodimus commented 3 years ago

Here is the first command:

python3 playlist_manager.py --jbop random --action update --name "01 Science Fiction" --libraries Movies --limit 50 --filter genre=sci-fi

I have a script that then goes into another command like this using a different playlist name and genre filter.

blacktwin commented 3 years ago

Can you check this update?

irodimus commented 3 years ago

Tested the new commit, https://github.com/blacktwin/JBOPS/commit/c84cee5fece9d53bfad6f5273e71d71bf70e506a, and it appears to have resolved the issue. Thank you!