ZeroQI / YouTube-Agent.bundle

Plex Metadata Agent for Movies and TV Series libraries
463 stars 44 forks source link

Logs show local info.json and thumbnails are been used, but doesnt refelect in plex #134

Open Lewissss opened 1 year ago

Lewissss commented 1 year ago

Logs: com.plexapp.agents.youtube.log

com.plexapp.system.log

The logs show that the thumbnail and info.json are been found for a video and used, but dont reflect in Plex (See screenshots and log snippet below)

2023-06-21 11:24:33,967 (13fc) : INFO (logkit:16) - Attempting to read metadata from \\?\D:\YouTube\Babish Culinary Universe [UCJHA_jMfCvEnv-3kRjTCQXw]\02 - Surf and Turf | Basics with Babish [hq2hRMDYKWQ].info.json 2023-06-21 11:24:33,967 (13fc) : INFO (logkit:16) - # videoId [hq2hRMDYKWQ] not in Playlist/channel item list so loading json_video_details 2023-06-21 11:24:33,967 (13fc) : INFO (logkit:16) - [?] link: "https://www.youtube.com/watch?v=hq2hRMDYKWQ" 2023-06-21 11:24:33,967 (13fc) : INFO (logkit:16) - img_load() - series_root_folder: D:\YouTube\Babish Culinary Universe [UCJHA_jMfCvEnv-3kRjTCQXw], filename: 02 - Surf and Turf | Basics with Babish [hq2hRMDYKWQ].mp4 2023-06-21 11:24:33,967 (13fc) : INFO (logkit:16) - local thumbnail found for file D:\YouTube\Babish Culinary Universe [UCJHA_jMfCvEnv-3kRjTCQXw]\02 - Surf and Turf | Basics with Babish [hq2hRMDYKWQ].png 2023-06-21 11:24:33,967 (13fc) : INFO (logkit:16) - [ ] thumbs: "D:\YouTube\Babish Culinary Universe [UCJHA_jMfCvEnv-3kRjTCQXw]\02 - Surf and Turf | Basics with Babish [hq2hRMDYKWQ].png" 2023-06-21 11:24:33,967 (13fc) : INFO (logkit:16) - [ ] title: "Surf and Turf | Basics with Babish" 2023-06-21 11:24:33,969 (13fc) : INFO (logkit:16) - [ ] summary: "Thanks to The Botanist Islay Dry Gin for sponsoring this episode. Get a bottle for yourself here: https://us-shop.thebotanist.com/link/1686606428347d2ab11e6/ad573e37-95d3-002e-3a59-c526cf526570?. . Pre-Order the new Basics with Babish Cookbook on Amazon: https://www.amazon.com/Basics-Babish-Guide-Making-Mistakes/dp/198216753X. . Babish Cookware on Amazon: http://bit.ly/babishstore. . Recipe coming soon! . . Music: “Middle School" by Blue Wednesday. https://soundcloud.com/bluewednesday. . My playlist of preferred cooking tunes, Bangers with Babish!. https://spoti.fi/2TYXmiY. . BCU TikTok: https://bit.ly/2PLtohe. Binging With Babish Website: http://bit.ly/BingingBabishWebsite. Basics With Babish Website: http://bit.ly/BasicsWithBabishWebsite. BCU Discord: https://bit.ly/3ALFRnY. Patreon: http://bit.ly/BingingPatreon. Instagram: http://bit.ly/BabishInstagram. Subreddit: https://bit.ly/3mkNpp6. Facebook: http://bit.ly/BabishFacebook. Twitter: http://bit.ly/BabishTwitter" 2023-06-21 11:24:33,969 (13fc) : INFO (logkit:16) - [ ] date: "20230616" 2023-06-21 11:24:33,969 (13fc) : INFO (logkit:16) - [ ] duration: "441" 2023-06-21 11:24:33,969 (13fc) : INFO (logkit:16) - [ ] genres: "[u'babish pasta', u'People & Blogs', u'super mario bros movie', u'binging with babish', u'mario mushroom pasta', u'mushroom pasta', u'babish', u'mario mushroom pasta recipe', u'pear qwerty horse', u'basics with babish', u'cooking with babbish', u'super mario bros movie pasta', u'super mario bros pasta', u'mushroom pasta recipe', u'babish mushroom pasta', u'mario pasta', u'babbish', u'babish mushroom pasta recipe', u'babish pasta recipe', u'super mario bros mushroom pasta']" Screenshot 2023-06-21 115121

Screenshot 2023-06-21 115157

ZeroQI commented 1 year ago

2023-06-21 11:44:53,631 (9f8) : INFO (logkit:16) - local thumbnail found for file D:\YouTube\Babish Culinary Universe [UCJHA_jMfCvEnv-3kRjTCQXw]\02 - Surf and Turf | Basics with Babish [hq2hRMDYKWQ].png

2023-06-21 11:44:53,688 (9f8) : INFO (logkit:16) - local thumbnail found for file D:\YouTube\Babish Culinary Universe [UCJHA_jMfCvEnv-3kRjTCQXw]\01 - Binging with Babish: Mushroom Pasta from The Super Mario Bros. Movie [sf4AoqBnSKI].png

This is generated by this line: https://github.com/ZeroQI/YouTube-Agent.bundle/blob/master/Contents/Code/__init__.py#L100 Which was called by: https://github.com/ZeroQI/YouTube-Agent.bundle/blob/master/Contents/Code/__init__.py#L483

                thumb, picture = img_load(series_root_folder, filename)  #Load locally
                if thumb is None:
                  thumb = get_thumb(json_video_details)
                  if thumb not in episode.thumbs: picture = HTTP.Request(thumb).content  
                if thumb and thumb not in episode.thumbs:
                  Log.Info(u'[ ] thumbs:   "{}"'.format(thumb))
                  episode.thumbs[thumb] = Proxy.Media(picture, sort_order=1)
                  episode.thumbs.validate_keys([thumb])

it looks like thumb is None or is in episode.thumbs. Would need more output created to troubleshoot and new logs

Lewissss commented 1 year ago

com.plexapp.agents.youtube.log

Some more logs (Cleared the logs and re-scanned metadata)