-
Notifications
You must be signed in to change notification settings - Fork 199
Playlist.addItems throws on empty list #566
Copy link
Copy link
Closed
Description
Describe the issue
Creating an empty playlist throws an IndexError.
Code snippets
# The relevant code from plexapi.playlist addItems method:
# line 95
uuid = items[0].section().uuid # IndexError thrown here, there is no check for empty list.Expected behavior
The method should either be a no-op or throw a more meaningful error (e.g. asserting the input is a non-empty List/Tuple).
Enviroment (please complete the following information):
- OS: MacOS Catalina
- Plex version 1.20.1.3252
- Python Version 3.8
- PlexAPI version 4.1.0
Stumbled across this when someone opened an issue about it on my iTunes playlist importer.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels