You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried to reproduce this with PlexAPI but can't seem to get it right.
I've modified the following files:
server.py
defcreateSmartPlaylist(self, title, libraryName, limit=None, **kwargs):
""" Creates and returns a new :class:`~plexapi.playlist.Playlist`. Parameters: title (str): Title of the playlist to be created. libraryName (str): Library name limit (int): Limit of items to include in smart playlist. """returnPlaylist.createSmart(self, title, libraryName, limit, **kwargs)
I noticed sometimes things fail and if I kick it off again it will pass. I just started you're one failing build again, we can see if this is the case. -- We should figure it out and be a bit ore graceful, but I never put time into it yet.
Some of the FILTERS or sectionChoices are not working properly when attempting to create a Smart Playlist.
plex.createPlaylist("test", section="Movies", smart=True, unwatched=True, **{'genre':"Horror"})
This will not use the unwatched FILTER/Choice, instead you just get the genre filter. Also because title is used for the naming of the Playlist **{'title':'Die Hard'} will return: TypeError: create() got multiple values for argument 'title'. Maybe changing the parameter to name or playlist_title?
As it happens, looks like I accidentally omitted title from the ALLOWED_FILTERS for the MovieSection in PR #364 .
previous code would not pass unwatched filter if used. plex.createPlaylist("test", section="Movies", smart=True, unwatched=True, **{'genre':"Horror"}) or plex.createPlaylist("test", section="Movies", smart=True, **{'unwatched':True, 'genre':"Horror"})
Any thoughts on what to rename the title parameter? playlist_title or playlistTtile
Activity
blacktwin commentedon Nov 13, 2018
I've started working on this. Here is a request POST that will create a Smart Playlist:
I've tried to reproduce this with PlexAPI but can't seem to get it right.
I've modified the following files:
server.py
playlist.py
The command to run:
plex.createSmartPlaylist(title='TESTTEST', limit=10, libraryName='Movies', **{'genre': 'Action'})I've been trying to match the url from the POST and the
keyvar from plexapi.Hellowlol commentedon Nov 17, 2018
@pkkid Any idea what travis is complaining about in my branch? https://github.com/pkkid/python-plexapi/tree/smart
pkkid commentedon Nov 17, 2018
I noticed sometimes things fail and if I kick it off again it will pass. I just started you're one failing build again, we can see if this is the case. -- We should figure it out and be a bit ore graceful, but I never put time into it yet.
blacktwin commentedon Jul 29, 2019
Some of the FILTERS or sectionChoices are not working properly when attempting to create a Smart Playlist.
plex.createPlaylist("test", section="Movies", smart=True, unwatched=True, **{'genre':"Horror"})This will not use the unwatched FILTER/Choice, instead you just get the genre filter. Also because
titleis used for the naming of the Playlist**{'title':'Die Hard'}will return:TypeError: create() got multiple values for argument 'title'. Maybe changing the parameter tonameorplaylist_title?As it happens, looks like I accidentally omitted
titlefrom theALLOWED_FILTERSfor the MovieSection in PR #364 .blacktwin commentedon Jul 30, 2019
PR incoming for
playlist.pyprevious code would not pass
unwatchedfilter if used.plex.createPlaylist("test", section="Movies", smart=True, unwatched=True, **{'genre':"Horror"})orplex.createPlaylist("test", section="Movies", smart=True, **{'unwatched':True, 'genre':"Horror"})Any thoughts on what to rename the
titleparameter?playlist_titleorplaylistTtile