Skip to content

Commit

Permalink
Find section automatically from items
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Apr 13, 2024
1 parent f784ca0 commit 2395f5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plextraktsync/plex/PlexPlaylist.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def update(self, items: list[PlexMedia], description=None) -> bool:
del self.__dict__["playlist"]
del self.__dict__["items"]
for item in items:
print(type(item), PlexLibraryItem(item, plex=self.plex).library.section)
playlist = self.section.createCollection(self.name, items=items)
section = PlexLibraryItem(item, plex=self.plex).library.section
playlist = section.createCollection(self.name, items=items)
self.logger.info(f"Created plex playlist {self.title_link} with {len(items)} items", extra={"markup": True})

# Skip if playlist could not be made/retrieved
Expand Down

0 comments on commit 2395f5c

Please sign in to comment.