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

IMDB keywords to Plex genre #70

Closed
Ark0301 opened this issue May 23, 2022 · 10 comments
Closed

IMDB keywords to Plex genre #70

Ark0301 opened this issue May 23, 2022 · 10 comments
Assignees
Labels
1. Script request Request for new script 3. Request accepted Request is accepted and will be realised 3. Request completed Request has been completed

Comments

@Ark0301
Copy link

Ark0301 commented May 23, 2022

Here's my idea- The user creates a list of keywords. The script then scrapes IMDB keywords for each movie in the library and any matching the user's list are added to the genre field in Plex.

For example:
The script has the keywords "Robot, Dinosaurs, Tragedy, Time Travel, Espionage"
The Terminator original genre field contains "Action, Thriller, Science Fiction" as these are the listed genres on TMDB
The script finds Robot and Time Travel within the Terminator keywords on IMDB
The Terminator genre field now contains "Action, Thriller, Science Fiction, Robot, Time Travel"

The user created list of keywords is necessary, otherwise each movie could end up with potentially hundreds of genres.

Great work! Thanks for everything.

@Ark0301 Ark0301 added the 1. Script request Request for new script label May 23, 2022
@Casvt
Copy link
Owner

Casvt commented May 23, 2022

So basically "add a keyword to the genre list in Plex if the keyword is present for the media in the TMDb keyword list, where multiple keywords can be processed at the same time". I understand. I can totally do this :)

@Casvt Casvt added the 3. Request accepted Request is accepted and will be realised label May 23, 2022
@Ark0301
Copy link
Author

Ark0301 commented May 23, 2022

That's right. Any time a match is found between the user's keyword list and the online keyword list, it's added into the genre field for the movie in Plex. I said IMDB, but TMDB would work too.
Looking forward to it. Thanks.

@Casvt Casvt self-assigned this May 23, 2022
@Casvt
Copy link
Owner

Casvt commented May 23, 2022

BTW TMDb was a typo. The IMDB is fine too. The script will work with the IMDB

Casvt added a commit that referenced this issue May 23, 2022
Casvt added a commit that referenced this issue May 23, 2022
@Casvt
Copy link
Owner

Casvt commented May 23, 2022

Request completed. You can find the script here: https://github.com/Casvt/Plex-scripts/blob/main/various/keywords_to_genre.py. Enjoy!
P.S. it uses the IMDB as promised :)

@Casvt Casvt closed this as completed May 23, 2022
@Casvt Casvt added the 3. Request completed Request has been completed label May 23, 2022
@Ark0301
Copy link
Author

Ark0301 commented May 24, 2022

Terminator 1
Terminator 2

It works perfectly. Exactly as I described it. Your work is much appreciated. Thanks.

@Casvt
Copy link
Owner

Casvt commented May 24, 2022

Np

@Ark0301
Copy link
Author

Ark0301 commented May 30, 2022

This has been working great so far, but I have one more request.
Would it be possible to add an argument regarding locked genre fields? Either something to ignore locked movies, or by skipping locked movies by default with an argument to edit locked movies too.
Thanks

@Casvt
Copy link
Owner

Casvt commented May 30, 2022

So "if the genre field is locked, skip the media"?

@Ark0301
Copy link
Author

Ark0301 commented May 30, 2022 via email

@Casvt
Copy link
Owner

Casvt commented May 30, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. Script request Request for new script 3. Request accepted Request is accepted and will be realised 3. Request completed Request has been completed
Projects
None yet
Development

No branches or pull requests

2 participants