mza921 / Plex-Auto-Collections

Python 3 script to automatically update Plex collections based off a configuration file
313 stars 28 forks source link

"Directors" filter stopped working #212

Open theotocopulitos opened 3 years ago

theotocopulitos commented 3 years ago

As of today (maybe 3-4 days before today, since I last used it), the directors filter started to fail. (sorry I cannot get the padding right)

This config: collections: _Director - Steven Spielberg_: directors: Steven Spielberg

fails with this error: Traceback (most recent call last): File "plex_auto_collections.py", line 1035, in <module> update_from_config(config_path, plex, False) File "plex_auto_collections.py", line 668, in update_from_config missing, map = add_to_collection(config_path, plex, m, v, c, plex_map, map, filters) File "d:\mypath\mza921 - Plex-Auto-Collections-master\app\plex_tools.py", line 242, in add_to_collection items = plex.Library.search(**search_terms) File "C:\Users\myuser\AppData\Local\Programs\Python\Python38\lib\site-packages\plexapi\library.py", line 669, in search args[category] = self._cleanSearchFilter(category, value, libtype) File "C:\Users\myuser\AppData\Local\Programs\Python\Python38\lib\site-packages\plexapi\library.py", line 717, in _cleanSearchFilter raise BadRequest('Unknown filter category: %s' % category) plexapi.exceptions.BadRequest: Unknown filter category: director

Other collections based on imdb and trakt lists keep working

meisnate12 commented 3 years ago

I had the same issue in a script I write and figured out that the Plex API endpoint is different in the beta branch of PMS so the plexapi dependency is failing. I raised the issue here but for an immediate fix you can roll back your PMS to the latest stable release

theotocopulitos commented 3 years ago

@meisnate12, but the thing is it was working until three days ago... your issue was reported a few months back, right?

meisnate12 commented 3 years ago

look at the latest 3 comments at the bottom

theotocopulitos commented 3 years ago

got'cha!

BTW, your script looks great!

meisnate12 commented 3 years ago

thanks, I'm glad you like it 😄

Sakujakira commented 3 years ago

So, if im understanding this correct, for now we have to wait for an fix in pkkid/python-plexapi? And as an Workaround we may disable all plex_search features?

meisnate12 commented 3 years ago

Yup

maxtrax04 commented 3 years ago

It looks like the python-plexapi issue was resolved a few days ago. Have you been able to look into what changed to determine if an updated release of this that includes the change or if just updating the python-plexapi portion manually would resolve it?

meisnate12 commented 3 years ago

updating the python-plexapi version in the requirements.txt may fix some issues but they haven't release a version with that commit yet. The latest version 4.4.1 doesn't include the fix so we wait until its released. In the meantime, you can take out PlexAPI==4.2.0 from requirements.txt and replace it with git+https://github.com/pkkid/python-plexapi.git to pull the latest commits

ramair02 commented 3 years ago

The above [Bug Fix] Addresses filter problems #220 fixed this issue for me. I'm not sure if this is in 2.9, so I just went into plex_auto_collections.py and changed from plexapi.library import Collections to from plexapi.collection import Collections and went into requirements.txt and changed PlexAPI==4.2.0 to PlexAPI==4.5.1

meisnate12 commented 3 years ago

Check out Plex Meta Manager for an updated Plex Auto Collections