Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plex_search "genre not found" error ignores genre requirement and continues with search #239

Closed
ngInit opened this issue May 12, 2021 · 9 comments · Fixed by #240
Closed
Assignees
Labels
enhancement New feature or request

Comments

@ngInit
Copy link

ngInit commented May 12, 2021

I have a genre collection:

  "Action":
    plex_search:
      genre: Action
      collection.not: Anime

With Plex's new beta TV agent, they've removed the Action and Adventure genre's so the genre throws an error:

[2021-05-12 15:49:24,456] [builder.py:602]            [DEBUG]    | Validating Method: plex_search                                                                     |
[2021-05-12 15:49:24,456] [builder.py:603]            [DEBUG]    | Value: ordereddict([('genre', 'Action')])                                                          |
[2021-05-12 15:49:24,580] [plex.py:487]               [ERROR]    | Plex Error: genre: Action not found                                                                |
[2021-05-12 15:49:24,580] [builder.py:947]            [WARNING]  | Collection Warning: No valid genre values found in ['Action']                                      |

The script continues without crashing, but now all of the sudden it's adding everything that's not in collection Anime while ignoring the previous genre requirement.

I think it would make more sense if plex_search fails to find a genre, network, or any other field that needs to be exact, that the entire search fails.

@meisnate12
Copy link
Member

having it automatically fail the whole search was my initial intention but I got requested to allow it to continue. In either case the real solution is to just properly give the correct attributes and then there's no problem at all.

but other then that I'm really not sure why it failed to find the action genre. Can you verify that it is a genre in your library and the its spelled exactly the same.

Finally my honest recommendation for this type of collection is to switch it to a smart collection, which can be done complete in plex

@ngInit
Copy link
Author

ngInit commented May 12, 2021

Well it should definitely continue the script without crashing, but to continue creating the collection while ignoring one of the requirements doesn't make sense...

It failed to find Action and Adventure because Plex took it upon themselves to decide that those genre's are the same and combined them into an "Action/Adventure" genre in their new Beta TV Agent.

I can look into smart collections later, but IDK how to do that yet, so for now it's easier to comment out this specific collection block in my YML

@meisnate12
Copy link
Member

The reasoning was using a template for actor director producer and writer and then being able to just give it a person to include any movies that have any of those conditions and with it the way you're describing that collection would error out.

@ngInit
Copy link
Author

ngInit commented May 12, 2021

It wouldn't, or we couldn't, just translate the "actor/director/producer/writer not found" errors to a false match and move on?

You're the main guy working on this, so I'm sure you know what you're talking about. It's just hard for me to picture why this would be an issue with my general knowledge of programming.

@meisnate12
Copy link
Member

Also if you don't like those genres PMM has a mass_update_genres feature you might be interested in

And smart collections are absolutely amazing it doesn't take the place of PMM completely but it should be able to take the place of any plex_search

@meisnate12
Copy link
Member

meisnate12 commented May 12, 2021

It's more of one way or the other unless I specifically like make a new term let's say crew and have it function different then how all the others work, which is actually the route im leaning torwards

@ngInit
Copy link
Author

ngInit commented May 12, 2021

I'm wasting a bunch of time opening random wiki pages and Ctrl+F'ing this stuff... Do you know the URL to the wiki pages for mass_update_genres and smart collections?

@meisnate12
Copy link
Member

Mass_genre_update is I wanna say on the library attribute page
As for smart collections, I've just added how to create them in develop and haven't actually made a wiki page for them yet

@meisnate12 meisnate12 self-assigned this May 12, 2021
@meisnate12 meisnate12 added the enhancement New feature or request label May 12, 2021
@meisnate12
Copy link
Member

ok i added crew to plex_search as a specific case and now it will fail if an attribute isn't found I agree that its better like that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants