-
Notifications
You must be signed in to change notification settings - Fork 21
Description
This isn't really a bug of this script, just unwanted behavior because of how plex works.
Problem: I wanted the list to show up on my home screen, but plex only gives this option for collections and NOT playlists. So I made a collection using this script instead of a playlist. The problem, my collections are set to hide items in the collection (e.g. so I don't have 30 barbie items in my library). I can set this playlist to not combine, but then each movie that is in another collection gets pulled out of that collection if it is also in this collection (ie. the most popular harry potter movies are listed next to the harry potter collection because they are also in the popular trakt list).
My solution:
instead of adding 'collection' tags. I add labels. I just modified the code in collection.py to be like
def add_library_items_to_collection(title, items):
""" Adds plex items to a collection """
for library_item in items:
library_item.addLabel(title)
Then I make a smart playlist based on the labels. I also had to add this somewhere in the beginning of the code to remove the old labels.
movies = PLEX.library.section('Movies')
for movie in movies.search(label='Featured'):
movie.removeLabel('Featured')
This approach lets me add popular movies on trakt to my home screen. Side note: smart collections can be sorted randomly, you simply replace the &sort=asc in the url to &sort=random. So aquaman isn't always the first movie in the collection. It would be cooler if it was sorted like a playlist, but plex can't do that from what I can tell.
It would be cool if this was somehow a feature, but I don't think it should replace existing collecction operation like I did it.
Thanks