ZeroQI / YouTube-Agent.bundle

Plex Metadata Agent for Movies and TV Series libraries
452 stars 43 forks source link

Added new functionality to read metadata for episodes and movies from… #42

Closed Banner-Keith closed 3 years ago

Banner-Keith commented 3 years ago

… info.json files.

Fixes #40

I hope this method of handling this is okay with you. I split up the search method into two methods that search via api and via info.json file. I also broke out parts of the update method into methods that can search via api and via info.json.

I added a setting so that users can choose if they only want to use the API, or if they would like to use the info.json file with the api as a backup only. I have tested using both methods on a TV Series library and it performed as expected.

There was one limitation that I came across that may be of interest. The thumbnails that are returned from the youtube api can be accessed using "standard" "high" and other keywords. The json file simply gives them a numeric index. In my experience the higher index values had higher resolution so I am attempting to pull that first and then moving down the list if that doesn't exist. we could also read all values into a collection and specifically grab thumbnails with a higher resolution.

I am not a python developer by trade. C# is my bread and butter. I tried to follow python conventions to the best of my knowledge, but if I did anything strange or unconventional, feel free to change it.

I also will not have any issues with any critiques or feedback if there's something you'd like me to change, but this should provide a pretty good starting point.

ZeroQI commented 3 years ago

Thanks a lot for the coding, and sorry for the huge delay in coming back to you Here are my notes

To be fair, i code in a weird way, preferring long lines of repetitive codes to line things up, but it is so much clearer for me, so am badly placed to recommend things... I did PHP coding before Python, so was and still am novice enough but managed to do funky stuff, my proudest being again the Dict() function as it made code simpler, smoother...

glensc commented 2 years ago

Configuration for metadata_source was removed in: