ZeroQI / YouTube-Agent.bundle

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

No external subtitles being added #120

Closed arabcoders closed 1 year ago

arabcoders commented 1 year ago

Hi, First of all Thank you for this wonderful plugin. It's working fine for me it's does discover the show and episodes and pulls the information from youtube api. However one thing that isn't working for me is the external subtitles, i mostly watch Japanese's shows. Example of folder structure /storage/media/youtube/01familia [UCWa9Ea4SfJ2kCF49NZhODoA] inside the dir, the files named as such

'20221201 - 【桃月NG】付き合ってから連絡が減る男ってどうなの? [youtube-16h9IuielGU].ass'
'20221201 - 【桃月NG】付き合ってから連絡が減る男ってどうなの? [youtube-16h9IuielGU].mkv'
'20221202 - 【メイドカフェ】ご主人様にアイドルが萌え萌えきゅんきゅん♥️ [youtube-0BgboHSeKRw].ass'
'20221202 - 【メイドカフェ】ご主人様にアイドルが萌え萌えきゅんきゅん♥️ [youtube-0BgboHSeKRw].mkv'
'20221203 - ゼロイチTV [youtube-tkc0u9LpjzY].ass'
'20221203 - ゼロイチTV [youtube-tkc0u9LpjzY].mkv'
'20221209 - 【ゼロイチ総出演】年に一度のサンタコス大運動会 [youtube-uUV0aKkO1rY].ass'
'20221209 - 【ゼロイチ総出演】年に一度のサンタコス大運動会 [youtube-uUV0aKkO1rY].mkv'
'20221214 - 【汗かいちゃった♥️】ゼロイチサンタがクリスマス前にやってきた♪ [youtube-VaaU3Pbc1f8].ass'
'20221214 - 【汗かいちゃった♥️】ゼロイチサンタがクリスマス前にやってきた♪ [youtube-VaaU3Pbc1f8].mkv'
'20221216 - 【自前ドレスで出演】12月22日(木)深夜0時26分放送!!絶対見てね [youtube-weHFlJlsN2M].ass'
'20221216 - 【自前ドレスで出演】12月22日(木)深夜0時26分放送!!絶対見てね [youtube-weHFlJlsN2M].mkv'
'20221223 - 横野すみれの美女飯#1『ラ・ルッチョラのカルボナーラと赤ワイン』 [youtube-KaSoI15YSOI].ass'
'20221223 - 横野すみれの美女飯#1『ラ・ルッチョラのカルボナーラと赤ワイン』 [youtube-KaSoI15YSOI].mkv'
'20221228 - HASHTAGNIGHT年末大忘年会 [youtube-GHOaJgSCHyU].ass'
'20221228 - HASHTAGNIGHT年末大忘年会 [youtube-GHOaJgSCHyU].mkv'
'20221228 - 【東ブクロ参戦】ドレスと体操服でさらば青春の光をドキドキブルブル❤️ [youtube-tlHC1CtC6cs].ass'
'20221228 - 【東ブクロ参戦】ドレスと体操服でさらば青春の光をドキドキブルブル❤️ [youtube-tlHC1CtC6cs].mkv'
'20221230 - 【初監督】女性経験のない年下Dが密着したら真島なおみが凄すぎた・・・❤️ [youtube-KuKYxeYS99w].ass'
'20221230 - 【初監督】女性経験のない年下Dが密着したら真島なおみが凄すぎた・・・❤️ [youtube-KuKYxeYS99w].mkv'

looking at item xml the subtitle aren't being added to it example XML

<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="29" librarySectionTitle="YouTube" librarySectionUUID="df4c54d6-201d-4076-a75d-51c2d762ec5c" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1671045426">
    <Video ratingKey="213085" key="/library/metadata/213085" parentRatingKey="213001" grandparentRatingKey="212971" guid="com.plexapp.agents.youtube://youtube|UCWa9Ea4SfJ2kCF49NZhODoA|01familia [UCWa9Ea4SfJ2kCF49NZhODoA]/2022/2022-12-30?lang=xn" parentGuid="com.plexapp.agents.youtube://youtube|UCWa9Ea4SfJ2kCF49NZhODoA|01familia [UCWa9Ea4SfJ2kCF49NZhODoA]/2022?lang=xn" grandparentGuid="com.plexapp.agents.youtube://youtube|UCWa9Ea4SfJ2kCF49NZhODoA|01familia [UCWa9Ea4SfJ2kCF49NZhODoA]?lang=xn" type="episode" title="【初監督】女性経験のない年下Dが密着したら真島なおみが凄すぎた・・・❤️" grandparentKey="/library/metadata/212971" parentKey="/library/metadata/213001" librarySectionTitle="YouTube" librarySectionID="29" librarySectionKey="/library/sections/29" grandparentTitle="01familia " parentTitle="Season 2022" summary="snip" parentIndex="2022" year="2022" thumb="/library/metadata/213085/thumb/1672520176" art="/library/metadata/212971/art/1672520193" grandparentThumb="/library/metadata/212971/thumb/1672520193" grandparentArt="/library/metadata/212971/art/1672520193" duration="1418947" originallyAvailableAt="2022-12-29" addedAt="1672397063" updatedAt="1672520176">
        <Media id="291765" duration="1418947" bitrate="2465" width="1920" height="1080" aspectRatio="1.78" audioChannels="2" audioCodec="aac" videoCodec="h264" videoResolution="1080" container="mkv" videoFrameRate="NTSC" audioProfile="lc" videoProfile="high">
            <Part accessible="1" exists="1" id="619428" key="/library/parts/619428/1672519080/file.mkv" duration="1418947" file="/storage/media/youtube/01familia [UCWa9Ea4SfJ2kCF49NZhODoA]/20221230 - 【初監督】女性経験のない年下Dが密着したら真島なおみが凄すぎた・・・❤️ [youtube-KuKYxeYS99w].mkv" size="438194699" audioProfile="lc" container="mkv" deepAnalysisVersion="6" requiredBandwidths="3791,3579,3579,3579,3579,3579,3579,3579" videoProfile="high">
                <Stream id="2119393" streamType="1" default="1" codec="h264" index="0" bitrate="2337" bitDepth="8" chromaLocation="left" chromaSubsampling="4:2:0" codedHeight="1088" codedWidth="1920" colorPrimaries="bt709" colorRange="tv" colorSpace="bt709" colorTrc="bt709" frameRate="29.970" hasScalingMatrix="0" height="1080" level="40" profile="high" refFrames="3" requiredBandwidths="3663,3455,3455,3455,3455,3455,3455,3455" scanType="progressive" width="1920" displayTitle="1080p (H.264)" extendedDisplayTitle="1080p (H.264)"> </Stream>
                <Stream id="2119394" streamType="2" selected="1" default="1" codec="aac" index="1" channels="2" bitrate="128" language="Japanese" languageTag="ja" languageCode="jpn" audioChannelLayout="stereo" profile="lc" requiredBandwidths="128,128,128,128,128,128,128,128" samplingRate="44100" title="Japanese" displayTitle="Japanese (AAC Stereo)" extendedDisplayTitle="Japanese (Japanese AAC Stereo)"> </Stream>
            </Part>
        </Media>
        <Director id="377112" filter="director=377112" tag="ゼロイチTV"/>
        <Extras size="0"> </Extras>
        <Related> </Related>
    </Video>
</MediaContainer>

manually scan for item

2023-01-01 12:00:58,479 (7f749ca15b38) :  INFO (__init__:192) - === update(lang=xn, force=True, movie=False) ===
2023-01-01 12:00:58,479 (7f749ca15b38) :  INFO (__init__:39) - /storage/media/youtube/01familia [UCWa9Ea4SfJ2kCF49NZhODoA]/20221230 - 【初監督】女性経験のない年下Dが密着したら真島 なおみが凄すぎた・・・❤️ [youtube-KuKYxeYS99w].mkv
2023-01-01 12:00:58,479 (7f749ca15b38) :  INFO (__init__:298) - =============================================================================================================================================================
2023-01-01 12:00:58,479 (7f749ca15b38) :  INFO (__init__:288) - [ ] library:    "YouTube"
2023-01-01 12:00:58,479 (7f749ca15b38) :  INFO (__init__:289) - [ ] root:       "/storage/media/youtube"
2023-01-01 12:00:58,479 (7f749ca15b38) :  INFO (__init__:290) - [ ] path:       "01familia [UCWa9Ea4SfJ2kCF49NZhODoA]"
2023-01-01 12:00:58,479 (7f749ca15b38) :  INFO (__init__:291) - [ ] dir:        "/storage/media/youtube/01familia [UCWa9Ea4SfJ2kCF49NZhODoA]"
2023-01-01 12:00:58,480 (7f749ca15b38) :  INFO (__init__:296) - [ ] series_root_folder: "/storage/media/youtube/01familia [UCWa9Ea4SfJ2kCF49NZhODoA]"
2023-01-01 12:00:58,491 (7f749ca15b38) :  INFO (__init__:299) - [ ] subfolder_count:    "0"
2023-01-01 12:00:58,491 (7f749ca15b38) :  INFO (__init__:423) - Grouping folder not found or single folder, root: /storage/media/youtube, path: 01familia [UCWa9Ea4SfJ2kCF49NZhODoA], Grouping folder: 01familia [UCWa9Ea4SfJ2kCF49NZhODoA], subdirs: 0, reverse_path: [u'01familia [UCWa9Ea4SfJ2kCF49NZhODoA]']
2023-01-01 12:00:58,491 (7f749ca15b38) :  DEBUG (__init__:70) - Loaded token from youtube-token.txt file
2023-01-01 12:00:58,496 (7f749ca15b38) :  DEBUG (networking:138) - Fetching 'https://www.googleapis.com/youtube/v3/channels?part=snippet%2CcontentDetails%2Cstatistics%2CbrandingSettings&id=UCWa9Ea4SfJ2kCF49NZhODoA&key=Snipped' from the HTTP cache
2023-01-01 12:00:58,499 (7f749ca15b38) :  INFO (__init__:423) - [ ] title:        "01familia ", metadata.title: "01familia "
2023-01-01 12:00:58,500 (7f749ca15b38) :  INFO (__init__:423) - [ ] country: JP
2023-01-01 12:00:58,500 (7f749ca15b38) :  INFO (__init__:415) - [X] art:       https://yt3.googleusercontent.com/7Ya91d_O1hkqmRTYr3lzQC5cU2W6kPJlADOncFvoIk_U6bPyU3IT6icTJ7UtqeDaGRM81r2vtg=s1920
2023-01-01 12:00:58,502 (7f749ca15b38) :  DEBUG (networking:143) - Requesting 'https://yt3.googleusercontent.com/7Ya91d_O1hkqmRTYr3lzQC5cU2W6kPJlADOncFvoIk_U6bPyU3IT6icTJ7UtqeDaGRM81r2vtg=s1920'
2023-01-01 12:00:59,113 (7f749ca15b38) :  DEBUG (networking:175) - Not caching 'https://yt3.googleusercontent.com/7Ya91d_O1hkqmRTYr3lzQC5cU2W6kPJlADOncFvoIk_U6bPyU3IT6icTJ7UtqeDaGRM81r2vtg=s1920' (content type 'image/jpeg' not cacheable in Agent plug-ins)
2023-01-01 12:00:59,114 (7f749ca15b38) :  INFO (__init__:417) - [X] banners:   https://yt3.googleusercontent.com/7Ya91d_O1hkqmRTYr3lzQC5cU2W6kPJlADOncFvoIk_U6bPyU3IT6icTJ7UtqeDaGRM81r2vtg=s1920
2023-01-01 12:00:59,117 (7f749ca15b38) :  DEBUG (networking:143) - Requesting 'https://yt3.googleusercontent.com/7Ya91d_O1hkqmRTYr3lzQC5cU2W6kPJlADOncFvoIk_U6bPyU3IT6icTJ7UtqeDaGRM81r2vtg=s1920'
2023-01-01 12:00:59,483 (7f749ca15b38) :  DEBUG (networking:175) - Not caching 'https://yt3.googleusercontent.com/7Ya91d_O1hkqmRTYr3lzQC5cU2W6kPJlADOncFvoIk_U6bPyU3IT6icTJ7UtqeDaGRM81r2vtg=s1920' (content type 'image/jpeg' not cacheable in Agent plug-ins)
2023-01-01 12:00:59,483 (7f749ca15b38) :  INFO (__init__:422) - [X] posters:   https://yt3.ggpht.com/gN8EI1KtVWJGVPq7yY_cX2vhwiDeZ68wJRN0wYf0qTSmP0e0xV6tEBFiIqsH4AaaIkj-Qmjd=s240-c-k-c0x00ffffff-no-rj
2023-01-01 12:00:59,486 (7f749ca15b38) :  DEBUG (networking:143) - Requesting 'https://yt3.ggpht.com/gN8EI1KtVWJGVPq7yY_cX2vhwiDeZ68wJRN0wYf0qTSmP0e0xV6tEBFiIqsH4AaaIkj-Qmjd=s240-c-k-c0x00ffffff-no-rj'
2023-01-01 12:00:59,943 (7f749ca15b38) :  DEBUG (networking:175) - Not caching 'https://yt3.ggpht.com/gN8EI1KtVWJGVPq7yY_cX2vhwiDeZ68wJRN0wYf0qTSmP0e0xV6tEBFiIqsH4AaaIkj-Qmjd=s240-c-k-c0x00ffffff-no-rj' (content type 'image/jpeg' not cacheable in Agent plug-ins)
2023-01-01 12:00:59,943 (7f749ca15b38) :  INFO (__init__:431) - [ ] role:        ゼロイチTV
2023-01-01 12:00:59,944 (7f749ca15b38) :  INFO (__init__:444) - =============================================================================================================================================================
2023-01-01 12:00:59,944 (7f749ca15b38) :  INFO (__init__:445) - Season: 2022
2023-01-01 12:00:59,944 (7f749ca15b38) :  INFO (__init__:451) - metadata.seasons[2022].episodes[2022-12-29] "20221230 - 【初監督】女性経験のない年下Dが密着したら真島なおみが凄すぎ た・・・❤️ [youtube-KuKYxeYS99w].mkv"
2023-01-01 12:00:59,944 (7f749ca15b38) :  INFO (__init__:470) - populate_episode_metadata_from_info_json() - series_root_folder: /storage/media/youtube/01familia [UCWa9Ea4SfJ2kCF49NZhODoA], filename: 20221230 - 【初監督】女性経験のない年下Dが密着したら真島なおみが凄すぎた・・・❤️ [youtube-KuKYxeYS99w].mkv
2023-01-01 12:00:59,944 (7f749ca15b38) :  INFO (__init__:471) - Searching for "20221230 - 【初監督】女性経験のない年下Dが密着したら真島なおみが凄すぎた・・・❤️ [youtube-KuKYxeYS99w].info.json". Searching in "/storage/media/youtube/01familia [UCWa9Ea4SfJ2kCF49NZhODoA]".
2023-01-01 12:00:59,956 (7f749ca15b38) :  INFO (__init__:473) - Directory /storage/media/youtube/01familia [UCWa9Ea4SfJ2kCF49NZhODoA] contains 426 files
2023-01-01 12:00:59,957 (7f749ca15b38) :  INFO (__init__:512) - populate_episode_metadata_from_api() - filename: 20221230 - 【初監督】女性経験のない年下Dが密着したら真島なおみが凄 すぎた・・・❤️ [youtube-KuKYxeYS99w].mkv
2023-01-01 12:00:59,957 (7f749ca15b38) :  INFO (__init__:516) - # videoId [KuKYxeYS99w] not in Playlist/channel item list so loading json_video_details
2023-01-01 12:00:59,957 (7f749ca15b38) :  DEBUG (__init__:70) - Loaded token from youtube-token.txt file
2023-01-01 12:00:59,962 (7f749ca15b38) :  DEBUG (networking:138) - Fetching 'https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails,statistics&id=KuKYxeYS99w&key=Snipped' from the HTTP cache
2023-01-01 12:00:59,967 (7f749ca15b38) :  INFO (__init__:520) - [?] link:     "https://www.youtube.com/watch?v=KuKYxeYS99w"
2023-01-01 12:00:59,967 (7f749ca15b38) :  INFO (__init__:522) - [ ] title:    "【初監督】女性経験のない年下Dが密着したら真島なおみが凄すぎた・・・❤️"
2023-01-01 12:00:59,968 (7f749ca15b38) :  INFO (__init__:523) - [ ] summary:  "2022年最後の企画は!. . 女性経験がない年下Dが”令和の愛人”真島なおみを1日密着❤️///. . ジムに、日サロに、DJの現場・・・. さらに親友とのご飯にまで潜入🍻. . 親友が明かす真島なおみの本性とは?❤️///. . 最後には. 年下Dの恋愛相談に真剣に答える真島なおみの姿も・・・. . 真島なおみにイジられながらの初めての撮影💦. 新米DのロケMEMOにも注目です👀. . -----------------------------------------------------------------------------. 🎉今年も1年間、ゼロイチTVを視聴してくださり�..    🎉ありがとうございました!!🎉. -----------------------------------------------------------------------------. . #ゼロイチファミリア  #真島なおみ #密着. 番組公式Twitter :https://twitter.com/01familia_MBS . 番組公式TikTok:https://vt.tiktok.com/ZSeLfQAEW/. . 真島なおみ . 【Twitter】https://twitter.com/naomi_majima. 【Instagram】https://www.instagram.com/naomi_majima/. . 動画UP予定日(すべて18時UPです) . 1月6日、11日、13日、20日、25日、27日.  是非チェックしてください! . . #Shorts、. #マネージャーカメラVlog . #ゼロイチラジ オ も随時公開しますので、お楽しみに! . . ゼロイチメンバーのここだけでしか見られない姿が満載! . 是非チャンネル登録よろしくお願いします!! . . ★お仕事の依頼&お問い合わせ ★ . サ ービスや商品紹介のご依頼 / イベントの告知・取材など . お仕事のお問い合わせは下記よりお願い致します!. https://forms.gle/2m8TKSMYimu6m9pB9"
2023-01-01 12:00:59,968 (7f749ca15b38) :  INFO (__init__:524) - [ ] date:     "2022-12-30T09:00:11Z"
2023-01-01 12:00:59,968 (7f749ca15b38) :  INFO (__init__:525) - [ ] duration: "PT23M39S"->"1419000"
2023-01-01 12:00:59,971 (7f749ca15b38) :  DEBUG (networking:143) - Requesting 'https://i.ytimg.com/vi/KuKYxeYS99w/maxresdefault.jpg'
2023-01-01 12:01:00,661 (7f749ca15b38) :  DEBUG (networking:175) - Not caching 'https://i.ytimg.com/vi/KuKYxeYS99w/maxresdefault.jpg' (content type 'image/jpeg' not cacheable in Agent plug-ins)
2023-01-01 12:01:00,662 (7f749ca15b38) :  INFO (__init__:530) - [ ] thumbs:   "https://i.ytimg.com/vi/KuKYxeYS99w/maxresdefault.jpg"
2023-01-01 12:01:00,662 (7f749ca15b38) :  INFO (__init__:532) - [ ] Thumb: https://i.ytimg.com/vi/KuKYxeYS99w/maxresdefault.jpg
2023-01-01 12:01:00,662 (7f749ca15b38) :  INFO (__init__:536) - [ ] director: "ゼロイチTV"
2023-01-01 12:01:00,662 (7f749ca15b38) :  INFO (__init__:541) - [ ] genres:   "[]"
2023-01-01 12:01:00,663 (7f749ca15b38) :  INFO (__init__:546) - === End Of Agent Call, errors after that are Plex related ===================================================================================================
ZeroQI commented 1 year ago

.ass are for anime mainly. Plex supposedly supports them but recommend UTF-8 encoding

Plex is in charge of adding subtitles

'20221201 - 【桃月NG】付き合ってから連絡が減る男ってどうなの? [youtube-16h9IuielGU].mkv' '20221201 - 【桃月NG】付き合ってから連絡が減る男ってどうなの? [youtube-16h9IuielGU].eng.ass' <= Did you try this naming convention ?

Totally not the agent responsibility. Closing this ticket

arabcoders commented 1 year ago

@ZeroQI Thank you for your quick reply,

Indeed i did the following:

Nothing works.

However, once i switch the library agent & scanner to Plex TV Series, it does pick the external subtitles.

ZeroQI commented 1 year ago

Plex TV series type libraries are the new type, which no longer uses python or external agents so I believe it's a local media assets agent bug, and they may pull the plug on third party agent at some point...

arabcoders commented 1 year ago

Indeed, it seems the issue is local media assets related, i tried moving some episodes into a Season 2022 folder and the subs do show up, but sadly once i separate all the show into Season XX, the problem reappear.

Thank you for your time

arabcoders commented 1 year ago

One more data point, it seems if i un-match the show and scan it does pick the subs and rematch it will show up, but sadly i have to do that for each video that i add.

ZeroQI commented 1 year ago

Oh interesting... The scanner cashes results and won't run again until you change the folder content, renaming the file doesn't work.... Try to recreate a library using ASS Scanner or also try default series scanner, it may see the ass file as it's between the scanner and local media assets agent...

arabcoders commented 1 year ago

Thanks for the tips, i did indeed before opening the ticket attempt to recreate the library 3 times, which different settings. I use many different agents, like the XBMCnfoTVImporter, plex legacy and new agent as well as hama. All of them works except and find subtitles with no issues, i only faced this problem with this agent. i work on watch state sync tool which has to support those agents anyway xD

plex_yt

I came up with possible explanation that it might have to do with the shows being date sorted instead of regular SXXYXX shows. But then again, why does it work if unmatched? this is puzzling me. i honestly have no idea, i tried googling few hours and come up empty so far.

arabcoders commented 1 year ago

@ZeroQI Hi, sorry to bother you i may have found the problem within the agent,

2023-01-09 18:13:45,698 (7f5330860b38) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.youtube/messaging/function/X0FnZW50S2l0OlNlYXJjaA__/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAo2CnMyCnhuczQKbGFuZ2IxczYKbWFudWFsYjFzNwpwcmltYXJ5aTAKczcKdmVyc2lvbnIxCnM2Cmt3YXJnc3M3ClRWX1Nob3dzMTAKbWVkaWFfdHlwZTExCnMxNgo1YmU2ZjIwZjg3MjAxMmEwczE3Cm9wZW5TdWJ0aXRsZXNIYXNoczcKNDMwMTQ0M3M3CmVwaXNvZGVzODkKMjAyMTA0MzAgLSDjgJDljp%40lrr%40jgJHjgYjjgarjgZPjgZXjgpPjgb0gLUhhcmFqdWt1IFRva3lvIFdhbGstIFt5b3V0dWJlLUt4dnlFS3RpRkpBXS5ta3ZzNApuYW1lczEKMXM4CmVwaXNvZGljczQ0CuOBiOOBquOBkyBbeW91dHViZS1VQ3JVZGlLdjlMRVJabUdfTUtoNjNYZ2ddczQKc2hvd3M0CjIwMjFzNgpzZWFzb25zNAoyMDIxczQKeWVhcnMyNjgKJTJGc3RvcmFnZSUyRnRlc3QlMkZtZWRpYSUyRnlvdXR1YmUlMkYlRTMlODElODglRTMlODElQUElRTMlODElOTMlMjAlNUJVQ3JVZGlLdjlMRVJabUdfTUtoNjNYZ2clNUQlMkYyMDIxMDQzMCUyMC0lMjAlRTMlODAlOTAlRTUlOEUlOUYlRTUlQUUlQkYlRTMlODAlOTElRTMlODElODglRTMlODElQUElRTMlODElOTMlRTMlODElOTUlRTMlODIlOTMlRTMlODElQkQlMjAtSGFyYWp1a3UlMjBUb2t5byUyMFdhbGstJTIwJTVCeW91dHViZS1LeHZ5RUt0aUZKQSU1RCUyRW1rdnM4CmZpbGVuYW1lczQwCjkyOTg5NGVmMjI4NTRiNDU0MDk2ZmI3MTUxZGJkNjlkYzMzMGFiZjZzOApwbGV4SGFzaHM2CjQ4MzEwM3M4CmR1cmF0aW9uczYKMjE3NDA5czIKaWRyMAo_
2023-01-09 18:13:45,698 (7f5330860b38) :  DEBUG (runtime:49) - Received packed state data (80 bytes)
2023-01-09 18:13:45,699 (7f5330860b38) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.youtube/messaging/function/X0FnZW50S2l0OlNlYXJjaA__/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAo2CnMyCnhuczQKbGFuZ2IxczYKbWFudWFsYjFzNwpwcmltYXJ5aTAKczcKdmVyc2lvbnIxCnM2Cmt3YXJnc3M3ClRWX1Nob3dzMTAKbWVkaWFfdHlwZTExCnMxNgo1YmU2ZjIwZjg3MjAxMmEwczE3Cm9wZW5TdWJ0aXRsZXNIYXNoczcKNDMwMTQ0M3M3CmVwaXNvZGVzODkKMjAyMTA0MzAgLSDjgJDljp@lrr@jgJHjgYjjgarjgZPjgZXjgpPjgb0gLUhhcmFqdWt1IFRva3lvIFdhbGstIFt5b3V0dWJlLUt4dnlFS3RpRkpBXS5ta3ZzNApuYW1lczEKMXM4CmVwaXNvZGljczQ0CuOBiOOBquOBkyBbeW91dHViZS1VQ3JVZGlLdjlMRVJabUdfTUtoNjNYZ2ddczQKc2hvd3M0CjIwMjFzNgpzZWFzb25zNAoyMDIxczQKeWVhcnMyNjgKJTJGc3RvcmFnZSUyRnRlc3QlMkZtZWRpYSUyRnlvdXR1YmUlMkYlRTMlODElODglRTMlODElQUElRTMlODElOTMlMjAlNUJVQ3JVZGlLdjlMRVJabUdfTUtoNjNYZ2clNUQlMkYyMDIxMDQzMCUyMC0lMjAlRTMlODAlOTAlRTUlOEUlOUYlRTUlQUUlQkYlRTMlODAlOTElRTMlODElODglRTMlODElQUElRTMlODElOTMlRTMlODElOTUlRTMlODIlOTMlRTMlODElQkQlMjAtSGFyYWp1a3UlMjBUb2t5byUyMFdhbGstJTIwJTVCeW91dHViZS1LeHZ5RUt0aUZKQSU1RCUyRW1rdnM4CmZpbGVuYW1lczQwCjkyOTg5NGVmMjI4NTRiNDU0MDk2ZmI3MTUxZGJkNjlkYzMzMGFiZjZzOApwbGV4SGFzaHM2CjQ4MzEwM3M4CmR1cmF0aW9uczYKMjE3NDA5czIKaWRyMAo_
2023-01-09 18:13:45,699 (7f5330860b38) :  INFO (agentkit:961) - Searching for matches for {'openSubtitlesHash': '5be6f20f872012a0', 'episode': '4301443', 'name': '20210430 - \xe3\x80\x90\xe5\x8e\x9f\xe5\xae\xbf\xe3\x80\x91\xe3\x81\x88\xe3\x81\xaa\xe3\x81\x93\xe3\x81\x95\xe3\x82\x93\xe3\x81\xbd -Harajuku Tokyo Walk- [youtube-KxvyEKtiFJA].mkv', 'episodic': '1', 'show': '\xe3\x81\x88\xe3\x81\xaa\xe3\x81\x93 [youtube-UCrUdiKv9LERZmG_MKh63Xgg]', 'season': '2021', 'plexHash': '929894ef22854b454096fb7151dbd69dc330abf6', 'filename': '%2Fstorage%2Ftest%2Fmedia%2Fyoutube%2F%E3%81%88%E3%81%AA%E3%81%93%20%5BUCrUdiKv9LERZmG_MKh63Xgg%5D%2F20210430%20-%20%E3%80%90%E5%8E%9F%E5%AE%BF%E3%80%91%E3%81%88%E3%81%AA%E3%81%93%E3%81%95%E3%82%93%E3%81%BD%20-Harajuku%20Tokyo%20Walk-%20%5Byoutube-KxvyEKtiFJA%5D%2Emkv', 'year': '2021', 'duration': '483103', 'id': '217409'}
2023-01-09 18:13:45,700 (7f5330860b38) :  DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/library/metadata/217409/tree'
2023-01-09 18:13:45,704 (7f5330860b38) :  INFO (__init__:39) - /storage/test/media/youtube/えなこ [UCrUdiKv9LERZmG_MKh63Xgg]/20210411 - 【初投稿】えなこチャンネルできました [youtube-Kes7kgRp5AQ].mkv
2023-01-09 18:13:45,704 (7f5330860b38) :  INFO (__init__:182) - =============================================================================================================================================================
2023-01-09 18:13:45,704 (7f5330860b38) :  INFO (__init__:182) - Search() - dir: /storage/test/media/youtube/えなこ [UCrUdiKv9LERZmG_MKh63Xgg], filename: /storage/test/media/youtube/ããªã [UCrUdiKv9LERZmG_MKh63Xgg]/20210430 - ãå宿ãããªãããã½ -Harajuku Tokyo Walk- [youtube-KxvyEKtiFJA].mkv, displayname: えなこ [youtube-UCrUdiKv9LERZmG_MKh63Xgg]
2023-01-09 18:13:45,704 (7f5330860b38) :  INFO (__init__:182) - search() - YouTube ID found - regex: PLAYLIST, youtube ID: "UCrUdiKv9LERZmG_MKh63Xgg"
2023-01-09 18:13:45,704 (7f5330860b38) :  INFO (__init__:182) - =============================================================================================================================================================
2023-01-09 18:13:45,705 (7f5330860b38) :  DEBUG (runtime:88) - Sending packed state data (107 bytes)
2023-01-09 18:13:45,705 (7f5330860b38) :  DEBUG (runtime:924) - Response: [200] str, 756 bytes
2023-01-09 18:13:46,569 (7f5330860b38) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.youtube/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKeG5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNgoyMTc0MDlzNApkYmlkaTAKczcKdmVyc2lvbm5zMTAKcGFyZW50R1VJRG5zOApwYXJlbnRJRHM3ClRWX1Nob3dzMTAKbWVkaWFfdHlwZXMxMDYKY29tLnBsZXhhcHAuYWdlbnRzLnlvdXR1YmU6Ly95b3V0dWJlfFVDclVkaUt2OUxFUlptR19NS2g2M1hnZ3zjgYjjgarjgZMgW1VDclVkaUt2OUxFUlptR19NS2g2M1hnZ10%40bGFuZz14bnM0Cmd1aWRzNjkKeW91dHViZXxVQ3JVZGlLdjlMRVJabUdfTUtoNjNYZ2d844GI44Gq44GTIFtVQ3JVZGlLdjlMRVJabUdfTUtoNjNYZ2ddczIKaWRyMAo_
2023-01-09 18:13:46,569 (7f5330860b38) :  DEBUG (runtime:49) - Received packed state data (80 bytes)
2023-01-09 18:13:46,570 (7f5330860b38) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.youtube/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKeG5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNgoyMTc0MDlzNApkYmlkaTAKczcKdmVyc2lvbm5zMTAKcGFyZW50R1VJRG5zOApwYXJlbnRJRHM3ClRWX1Nob3dzMTAKbWVkaWFfdHlwZXMxMDYKY29tLnBsZXhhcHAuYWdlbnRzLnlvdXR1YmU6Ly95b3V0dWJlfFVDclVkaUt2OUxFUlptR19NS2g2M1hnZ3zjgYjjgarjgZMgW1VDclVkaUt2OUxFUlptR19NS2g2M1hnZ10@bGFuZz14bnM0Cmd1aWRzNjkKeW91dHViZXxVQ3JVZGlLdjlMRVJabUdfTUtoNjNYZ2d844GI44Gq44GTIFtVQ3JVZGlLdjlMRVJabUdfTUtoNjNYZ2ddczIKaWRyMAo_
2023-01-09 18:13:46,570 (7f5330860b38) :  DEBUG (model:32) - Loading model with GUID com.plexapp.agents.youtube://youtube|UCrUdiKv9LERZmG_MKh63Xgg|えなこ [UCrUdiKv9LERZmG_MKh63Xgg]?lang=xn
2023-01-09 18:13:46,570 (7f5330860b38) :  DEBUG (model:234) - Deserializing from /config/Library/Application Support/Plex Media Server/Metadata/TV Shows/d/c5abb110083ceb2edbccafcfcc64fc94e719329.bundle/Contents/com.plexapp.agents.youtube/Info.xml
2023-01-09 18:13:46,570 (7f5330860b38) :  ERROR (model:236) - Unable to deserialize object at /config/Library/Application Support/Plex Media Server/Metadata/TV Shows/d/c5abb110083ceb2edbccafcfcc64fc94e719329.bundle/Contents/com.plexapp.agents.youtube
2023-01-09 18:13:46,570 (7f5330860b38) :  DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/library/metadata/217409/tree'
2023-01-09 18:13:46,574 (7f5330860b38) :  INFO (__init__:192) - === update(lang=xn, force=True, movie=False) ===
2023-01-09 18:13:46,574 (7f5330860b38) :  INFO (__init__:39) - /storage/test/media/youtube/えなこ [UCrUdiKv9LERZmG_MKh63Xgg]/20210411 - 【初投稿】えなこチャンネルできました [youtube-Kes7kgRp5AQ].mkv
2023-01-09 18:13:46,574 (7f5330860b38) :  INFO (__init__:423) - =============================================================================================================================================================
2023-01-09 18:13:46,575 (7f5330860b38) :  INFO (__init__:51) - [!] Library access denied
2023-01-09 18:13:46,575 (7f5330860b38) :  INFO (__init__:59) - [!] ASS root scanner file missing: "/config/Library/Application Support/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.hama/DataItems/_Logs/_root_.scanner.log"
2023-01-09 18:13:46,575 (7f5330860b38) :  INFO (__init__:288) - [ ] library:    ""
2023-01-09 18:13:46,575 (7f5330860b38) :  INFO (__init__:289) - [ ] root:       "/storage/test/media/youtube/えなこ [UCrUdiKv9LERZmG_MKh63Xgg]"
2023-01-09 18:13:46,575 (7f5330860b38) :  INFO (__init__:290) - [ ] path:       ""
2023-01-09 18:13:46,575 (7f5330860b38) :  INFO (__init__:291) - [ ] dir:        "/storage/test/media/youtube/えなこ [UCrUdiKv9LERZmG_MKh63Xgg]"
2023-01-09 18:13:46,575 (7f5330860b38) :  INFO (__init__:296) - [ ] series_root_folder: "/storage/test/media/youtube/えなこ [UCrUdiKv9LERZmG_MKh63Xgg]/"
2023-01-09 18:13:46,576 (7f5330860b38) :  INFO (__init__:299) - [ ] subfolder_count:    "0"
2023-01-09 18:13:46,576 (7f5330860b38) :  INFO (__init__:414) - Grouping folder not found or single folder, root: /storage/test/media/youtube/えなこ [UCrUdiKv9LERZmG_MKh63Xgg], path: , Grouping folder: , subdirs: 0, reverse_path: ['']
2023-01-09 18:13:46,576 (7f5330860b38) :  DEBUG (__init__:70) - Loaded token from youtube-token.txt file
2023-01-09 18:13:46,582 (7f5330860b38) :  DEBUG (networking:138) - Fetching 'https://www.googleapis.com/youtube/v3/channels?part=snippet%2CcontentDetails%2Cstatistics%2CbrandingSettings&id=UCrUdiKv9LERZmG_MKh63Xgg&key=snip' from the HTTP cache
2023-01-09 18:13:46,586 (7f5330860b38) :  INFO (__init__:423) - [ ] title:        "えなこ ", metadata.title: "えなこ "
2023-01-09 18:13:46,586 (7f5330860b38) :  INFO (__init__:423) - [ ] country: JP
2023-01-09 18:13:46,587 (7f5330860b38) :  INFO (__init__:415) - [X] art:       https://yt3.googleusercontent.com/oodx_RTLLvhqYfQnaZFUzc1qmdvnvMGdGG-lEcpgvULhyvBicTyALRPOtUPnT1TQ4zViLvGsUA=s1920
2023-01-09 18:13:46,589 (7f5330860b38) :  DEBUG (networking:143) - Requesting 'https://yt3.googleusercontent.com/oodx_RTLLvhqYfQnaZFUzc1qmdvnvMGdGG-lEcpgvULhyvBicTyALRPOtUPnT1TQ4zViLvGsUA=s1920'
2023-01-09 18:13:46,972 (7f5330860b38) :  DEBUG (networking:175) - Not caching 'https://yt3.googleusercontent.com/oodx_RTLLvhqYfQnaZFUzc1qmdvnvMGdGG-lEcpgvULhyvBicTyALRPOtUPnT1TQ4zViLvGsUA=s1920' (content type 'image/jpeg' not cacheable in Agent plug-ins)
2023-01-09 18:13:46,972 (7f5330860b38) :  INFO (__init__:417) - [X] banners:   https://yt3.googleusercontent.com/oodx_RTLLvhqYfQnaZFUzc1qmdvnvMGdGG-lEcpgvULhyvBicTyALRPOtUPnT1TQ4zViLvGsUA=s1920
2023-01-09 18:13:46,974 (7f5330860b38) :  DEBUG (networking:143) - Requesting 'https://yt3.googleusercontent.com/oodx_RTLLvhqYfQnaZFUzc1qmdvnvMGdGG-lEcpgvULhyvBicTyALRPOtUPnT1TQ4zViLvGsUA=s1920'
2023-01-09 18:13:47,317 (7f5330860b38) :  DEBUG (networking:175) - Not caching 'https://yt3.googleusercontent.com/oodx_RTLLvhqYfQnaZFUzc1qmdvnvMGdGG-lEcpgvULhyvBicTyALRPOtUPnT1TQ4zViLvGsUA=s1920' (content type 'image/jpeg' not cacheable in Agent plug-ins)
2023-01-09 18:13:47,317 (7f5330860b38) :  INFO (__init__:422) - [X] posters:   https://yt3.ggpht.com/BPRxYBgGRt-LPwjCddLHjiZh04nDm9ZdLfegodDyovf7-RcbH9psdJvlatoQXrl-2t3mBro_Ow=s240-c-k-c0x00ffffff-no-rj
2023-01-09 18:13:47,319 (7f5330860b38) :  DEBUG (networking:143) - Requesting 'https://yt3.ggpht.com/BPRxYBgGRt-LPwjCddLHjiZh04nDm9ZdLfegodDyovf7-RcbH9psdJvlatoQXrl-2t3mBro_Ow=s240-c-k-c0x00ffffff-no-rj'
2023-01-09 18:13:47,781 (7f5330860b38) :  DEBUG (networking:175) - Not caching 'https://yt3.ggpht.com/BPRxYBgGRt-LPwjCddLHjiZh04nDm9ZdLfegodDyovf7-RcbH9psdJvlatoQXrl-2t3mBro_Ow=s240-c-k-c0x00ffffff-no-rj' (content type 'image/jpeg' not cacheable in Agent plug-ins)
2023-01-09 18:13:47,781 (7f5330860b38) :  INFO (__init__:431) - [ ] role:        えなこ
2023-01-09 18:13:47,781 (7f5330860b38) :  INFO (__init__:444) - =============================================================================================================================================================
2023-01-09 18:13:47,782 (7f5330860b38) :  INFO (__init__:445) - Season: 2021
2023-01-09 18:13:47,782 (7f5330860b38) :  INFO (__init__:451) - metadata.seasons[2021].episodes[4111443] "20210411 - 【初投稿】えなこチャンネルできました [youtube-Kes7kgRp5AQ].mkv"
2023-01-09 18:13:47,782 (7f5330860b38) :  INFO (__init__:470) - populate_episode_metadata_from_info_json() - series_root_folder: /storage/test/media/youtube/えなこ [UCrUdiKv9LERZmG_MKh63Xgg]/, filename: 20210411 - 【初投稿】えな こチャンネルできました [youtube-Kes7kgRp5AQ].mkv
2023-01-09 18:13:47,782 (7f5330860b38) :  INFO (__init__:471) - Searching for "20210411 - 【初投稿】えなこチャンネルできました [youtube-Kes7kgRp5AQ].info.json". Searching in "/storage/test/media/youtube/えなこ [UCrUdiKv9LERZmG_MKh63Xgg]/".
2023-01-09 18:13:47,783 (7f5330860b38) :  INFO (__init__:473) - Directory /storage/test/media/youtube/えなこ [UCrUdiKv9LERZmG_MKh63Xgg]/ contains 4 files
2023-01-09 18:13:47,783 (7f5330860b38) :  INFO (__init__:512) - populate_episode_metadata_from_api() - filename: 20210411 - 【初投稿】えなこチャンネルできました [youtube-Kes7kgRp5AQ].mkv
2023-01-09 18:13:47,783 (7f5330860b38) :  INFO (__init__:516) - # videoId [Kes7kgRp5AQ] not in Playlist/channel item list so loading json_video_details
2023-01-09 18:13:47,783 (7f5330860b38) :  DEBUG (__init__:70) - Loaded token from youtube-token.txt file
2023-01-09 18:13:47,787 (7f5330860b38) :  DEBUG (networking:138) - Fetching 'https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails,statistics&id=Kes7kgRp5AQ&key=snip' from the HTTP cache
2023-01-09 18:13:47,791 (7f5330860b38) :  INFO (__init__:520) - [?] link:     "https://www.youtube.com/watch?v=Kes7kgRp5AQ"
2023-01-09 18:13:47,791 (7f5330860b38) :  INFO (__init__:522) - [ ] title:    "【初投稿】えなこチャンネルできました"
2023-01-09 18:13:47,791 (7f5330860b38) :  INFO (__init__:523) - [ ] summary:  "コスプレイヤーのえなこです!. お仕事の裏側やプライベートのことなど皆さんがまだあまり知らない部分だったり. ゲームやメイクだったり、好きなことを好きなだけ発信していきます。. このチャンネル開設を機に、動画編集も頑張りたいと思います。. . 是非、チャンネル登録よろしくお願いします!. . Twitter : https://twitter.com/enako_cos. Instagram : https://www.instagram.com/enakorin"
2023-01-09 18:13:47,792 (7f5330860b38) :  INFO (__init__:524) - [ ] date:     "2021-04-11T11:00:04Z"
2023-01-09 18:13:47,792 (7f5330860b38) :  INFO (__init__:525) - [ ] duration: "PT1M7S"->"67000"
2023-01-09 18:13:47,794 (7f5330860b38) :  DEBUG (networking:143) - Requesting 'https://i.ytimg.com/vi/Kes7kgRp5AQ/maxresdefault.jpg'
2023-01-09 18:13:48,337 (7f5330860b38) :  DEBUG (networking:175) - Not caching 'https://i.ytimg.com/vi/Kes7kgRp5AQ/maxresdefault.jpg' (content type 'image/jpeg' not cacheable in Agent plug-ins)
2023-01-09 18:13:48,337 (7f5330860b38) :  INFO (__init__:530) - [ ] thumbs:   "https://i.ytimg.com/vi/Kes7kgRp5AQ/maxresdefault.jpg"
2023-01-09 18:13:48,337 (7f5330860b38) :  INFO (__init__:532) - [ ] Thumb: https://i.ytimg.com/vi/Kes7kgRp5AQ/maxresdefault.jpg
2023-01-09 18:13:48,338 (7f5330860b38) :  INFO (__init__:536) - [ ] director: "えなこ"
2023-01-09 18:13:48,338 (7f5330860b38) :  INFO (__init__:541) - [ ] genres:   "[]"
2023-01-09 18:13:48,338 (7f5330860b38) :  INFO (__init__:451) - metadata.seasons[2021].episodes[4301443] "20210430 - 【原宿】えなこさんぽ -Harajuku Tokyo Walk- [youtube-KxvyEKtiFJA].mkv"
2023-01-09 18:13:48,339 (7f5330860b38) :  INFO (__init__:470) - populate_episode_metadata_from_info_json() - series_root_folder: /storage/test/media/youtube/えなこ [UCrUdiKv9LERZmG_MKh63Xgg]/, filename: 20210430 - 【原宿】えなこ さんぽ -Harajuku Tokyo Walk- [youtube-KxvyEKtiFJA].mkv
2023-01-09 18:13:48,339 (7f5330860b38) :  INFO (__init__:471) - Searching for "20210430 - 【原宿】えなこさんぽ -Harajuku Tokyo Walk- [youtube-KxvyEKtiFJA].info.json". Searching in "/storage/test/media/youtube/えなこ [UCrUdiKv9LERZmG_MKh63Xgg]/".
2023-01-09 18:13:48,339 (7f5330860b38) :  INFO (__init__:473) - Directory /storage/test/media/youtube/えなこ [UCrUdiKv9LERZmG_MKh63Xgg]/ contains 4 files
2023-01-09 18:13:48,339 (7f5330860b38) :  INFO (__init__:512) - populate_episode_metadata_from_api() - filename: 20210430 - 【原宿】えなこさんぽ -Harajuku Tokyo Walk- [youtube-KxvyEKtiFJA].mkv
2023-01-09 18:13:48,339 (7f5330860b38) :  INFO (__init__:516) - # videoId [KxvyEKtiFJA] not in Playlist/channel item list so loading json_video_details
2023-01-09 18:13:48,340 (7f5330860b38) :  DEBUG (__init__:70) - Loaded token from youtube-token.txt file
2023-01-09 18:13:48,345 (7f5330860b38) :  DEBUG (networking:138) - Fetching 'https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails,statistics&id=KxvyEKtiFJA&key=snip' from the HTTP cache
2023-01-09 18:13:48,349 (7f5330860b38) :  INFO (__init__:520) - [?] link:     "https://www.youtube.com/watch?v=KxvyEKtiFJA"
2023-01-09 18:13:48,349 (7f5330860b38) :  INFO (__init__:522) - [ ] title:    "【原宿】えなこさんぽ -Harajuku Tokyo Walk-"
2023-01-09 18:13:48,350 (7f5330860b38) :  INFO (__init__:523) - [ ] summary:  "この日は原宿でお仕事だったので、久しぶりに原宿を楽しんできました!!. これからも色んな場所でお散歩できたらいいなぁ。. (※この動画は緊急事態宣言前に撮影 しています。). . Twitter. →https://twitter.com/enako_cos. . Instagram. →https://www.instagram.com/enakorin/. . Shop. →https://enako.shop-pro.jp/"
2023-01-09 18:13:48,350 (7f5330860b38) :  INFO (__init__:524) - [ ] date:     "2021-04-30T11:17:09Z"
2023-01-09 18:13:48,350 (7f5330860b38) :  INFO (__init__:525) - [ ] duration: "PT8M4S"->"484000"
2023-01-09 18:13:48,353 (7f5330860b38) :  DEBUG (networking:143) - Requesting 'https://i.ytimg.com/vi/KxvyEKtiFJA/maxresdefault.jpg'
2023-01-09 18:13:48,762 (7f5330860b38) :  DEBUG (networking:175) - Not caching 'https://i.ytimg.com/vi/KxvyEKtiFJA/maxresdefault.jpg' (content type 'image/jpeg' not cacheable in Agent plug-ins)
2023-01-09 18:13:48,763 (7f5330860b38) :  INFO (__init__:530) - [ ] thumbs:   "https://i.ytimg.com/vi/KxvyEKtiFJA/maxresdefault.jpg"
2023-01-09 18:13:48,763 (7f5330860b38) :  INFO (__init__:532) - [ ] Thumb: https://i.ytimg.com/vi/KxvyEKtiFJA/maxresdefault.jpg
2023-01-09 18:13:48,763 (7f5330860b38) :  INFO (__init__:536) - [ ] director: "えなこ"
2023-01-09 18:13:48,764 (7f5330860b38) :  INFO (__init__:541) - [ ] genres:   "[u'#\u521d\u6295\u7a3f', u'People & Blogs', u'#\u3048\u306a\u3053']"
2023-01-09 18:13:48,764 (7f5330860b38) :  INFO (__init__:546) - === End Of Agent Call, errors after that are Plex related ===================================================================================================
2023-01-09 18:13:48,764 (7f5330860b38) :  CRITICAL (model:192) - Exception serializing TV_Show with guid 'com.plexapp.agents.youtube://youtube|UCrUdiKv9LERZmG_MKh63Xgg|えなこ [UCrUdiKv9LERZmG_MKh63Xgg]?lang=xn' (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-5fc2e0894/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/modelling/model.py", line 190, in _write
    self._serialize(os.path.join(self._storage_path, subdir))
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-5fc2e0894/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/modelling/model.py", line 215, in _serialize
    el.set('id', self._id)
  File "lxml.etree.pyx", line 699, in lxml.etree._Element.set (/data/jenkins/conan_build/1112280674/conan/.conan/data/python/2.7.17-e4735d56d5-16/plex/stable/build/242b7b657a940429f9f9b4b8934e7cbdc36e54b7/Python/PlexModules/lxml-2.3/src/lxml/lxml.etree.c:34531)
  File "apihelpers.pxi", line 563, in lxml.etree._setAttributeValue (/data/jenkins/conan_build/1112280674/conan/.conan/data/python/2.7.17-e4735d56d5-16/plex/stable/build/242b7b657a940429f9f9b4b8934e7cbdc36e54b7/Python/PlexModules/lxml-2.3/src/lxml/lxml.etree.c:15781)
  File "apihelpers.pxi", line 1366, in lxml.etree._utf8 (/data/jenkins/conan_build/1112280674/conan/.conan/data/python/2.7.17-e4735d56d5-16/plex/stable/build/242b7b657a940429f9f9b4b8934e7cbdc36e54b7/Python/PlexModules/lxml-2.3/src/lxml/lxml.etree.c:22211)
ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters

2023-01-09 18:13:48,765 (7f5330860b38) :  DEBUG (runtime:88) - Sending packed state data (107 bytes)
2023-01-09 18:13:48,765 (7f5330860b38) :  DEBUG (runtime:924) - Response: [200] str, 16 bytes

it seems Japanese characters cases the metadata save to fail another example.

2023-01-09 18:15:50,540 (7f5330860b38) :  INFO (__init__:473) - Directory /storage/media/youtube/花咲れあHanasaki Rea [UC-eGkbYVZtCPXxFeJTuy1cg] contains 0 files
2023-01-09 18:15:50,541 (7f5330860b38) :  INFO (__init__:473) - Directory /storage/media/youtube/花咲れあHanasaki Rea [UC-eGkbYVZtCPXxFeJTuy1cg]/Season 2021 contains 16 files
2023-01-09 18:15:50,541 (7f5330860b38) :  INFO (__init__:473) - Directory /storage/media/youtube/花咲れあHanasaki Rea [UC-eGkbYVZtCPXxFeJTuy1cg]/Season 2023 contains 0 files
2023-01-09 18:15:50,541 (7f5330860b38) :  INFO (__init__:473) - Directory /storage/media/youtube/花咲れあHanasaki Rea [UC-eGkbYVZtCPXxFeJTuy1cg]/Season 2022 contains 16 files
2023-01-09 18:15:50,541 (7f5330860b38) :  INFO (__init__:512) - populate_episode_metadata_from_api() - filename: 20221115 - 【除霊】お祓い中に大号泣…38分の所から泣き初めて終わったらめちゃくちゃ元気になった!!!!#飯塚唯 先生 #ギャル霊媒師 怖い話 心霊 霊 怨霊  [youtube-7QaBBAmMXYY].mkv
2023-01-09 18:15:50,542 (7f5330860b38) :  INFO (__init__:516) - # videoId [7QaBBAmMXYY] not in Playlist/channel item list so loading json_video_details
2023-01-09 18:15:50,542 (7f5330860b38) :  DEBUG (__init__:70) - Loaded token from youtube-token.txt file
2023-01-09 18:15:50,546 (7f5330860b38) :  DEBUG (networking:138) - Fetching 'https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails,statistics&id=7QaBBAmMXYY&key=snip' from the HTTP cache
2023-01-09 18:15:50,550 (7f5330860b38) :  INFO (__init__:520) - [?] link:     "https://www.youtube.com/watch?v=7QaBBAmMXYY"
2023-01-09 18:15:50,550 (7f5330860b38) :  INFO (__init__:522) - [ ] title:    "【除霊】お祓い中に大号泣…38分の所から泣き初めて終わったらめちゃくちゃ元気になった!!!!#飯塚唯 先生 #ギャル霊媒師 怖い話 心霊 霊 怨霊 霊の声"
2023-01-09 18:15:50,550 (7f5330860b38) :  INFO (__init__:523) - [ ] summary:  "今回のお祓い動画は皆さんビックリすると思いますが、この日からメンタル面も体調面も絶好調です!!. 本当にお祓い受けて良かった…. 飯塚唯先生には一生感謝で す!!!本当にありがとうございました!!. (撮影日・お祓い日は9月23日です). 飯塚唯先生と付き添いの方、本当にありがとうございました🙇‍♂️🙏✨. . 視聴者の方や周りの方で悩んでる方がいたら飯塚唯先生をお勧めします!. 本当に楽になりました!こんな動画載せる日が来るなんて思ってもいませんでした。. 霊に対して信じてない私が信じざる得ない体験をして本当にびっくりしています。. 今でも辛かった事は忘れません. . 家に貼って頂いた11枚のお札を見て毎日唯先生の事を思い出します 。. それと同時に良かった、今は守られている、と安心して日々過ごしています!. . 飯塚唯先生は命の恩人と言っても過言ではないです。こんなポジティブお花畑思考の私が一時期自殺まで考えた。飯塚唯先生、私を元に戻してくれて本当にありがとう ございます!. 親や妹、家族が一番喜んでくれました。後日、妹と(のんれあYouTubeにて)私が元に戻った感想や飯塚唯先生について話してる動画も載せるので、のんちゃんからの意見や感想もぜひ見て下さい!. . ♡. 飯塚唯先生のYouTube. https://youtube.com/user/atomic443. 飯塚唯先生のブログ. https://ameblo.jp/reibaishi/. 飯塚唯先生のインスタ@reibai.y. https://instagram.com/reibai.y?igshid=YmMyMTA2M2Y=. 飯塚唯先生のツイッター@iizuka_reibai. https://twitter.com/iizuka_reibay?s=21&t=yl9k2jr-2p6u997ty3Rmqw. 飯塚唯先生のTIKTOK@iizukayui. https://www.tiktok.com/@iizukayui?_t=8WTE8LViYEb&_r=1. ♡. . ご視聴ありがとうございます!!. 良かったらチャンネル登録と高評価宜しくお願いします♪. . . 普段は、グラビア/タレント/モデルやってます!!🎀. . . ▶︎ https://linktr.ee/h_rea_0503 ◀︎. 🌸ここから全てのSNS見られます🌸. . . 。*⑅୨୧┈┈┈┈┈┈┈┈┈┈┈┈┈୨୧⑅*。. . . インスタ▶︎ https://www.instagram.com/h_rea_0503/. . ツイッター▶︎ https://mobile.twitter.com/h_rea_0503. . TikTok▶︎ https://vt.tiktok.com/U515jY/. . みんな是非見てね❤️. . 卍グラビア界の問題児卍"
2023-01-09 18:15:50,551 (7f5330860b38) :  INFO (__init__:524) - [ ] date:     "2022-11-15T12:00:07Z"
2023-01-09 18:15:50,551 (7f5330860b38) :  INFO (__init__:525) - [ ] duration: "PT57M53S"->"3473000"
2023-01-09 18:15:50,553 (7f5330860b38) :  DEBUG (networking:143) - Requesting 'https://i.ytimg.com/vi/7QaBBAmMXYY/maxresdefault.jpg'
2023-01-09 18:15:50,989 (7f5330860b38) :  DEBUG (networking:175) - Not caching 'https://i.ytimg.com/vi/7QaBBAmMXYY/maxresdefault.jpg' (content type 'image/jpeg' not cacheable in Agent plug-ins)
2023-01-09 18:15:50,989 (7f5330860b38) :  INFO (__init__:530) - [ ] thumbs:   "https://i.ytimg.com/vi/7QaBBAmMXYY/maxresdefault.jpg"
2023-01-09 18:15:50,989 (7f5330860b38) :  INFO (__init__:532) - [ ] Thumb: https://i.ytimg.com/vi/7QaBBAmMXYY/maxresdefault.jpg
2023-01-09 18:15:50,990 (7f5330860b38) :  INFO (__init__:536) - [ ] director: "花咲れあHanasaki Rea"
2023-01-09 18:15:50,990 (7f5330860b38) :  INFO (__init__:541) - [ ] genres:   "[u'\uff03\u30e1\u30a4\u30c9', u'\uff03\u82b1\u54b2\u308c\u3042', u'\uff03\u30b3\u30b9\u30d7\u30ec', u'Entertainment']"
2023-01-09 18:15:50,990 (7f5330860b38) :  INFO (__init__:546) - === End Of Agent Call, errors after that are Plex related ===================================================================================================
2023-01-09 18:15:50,991 (7f5330860b38) :  CRITICAL (model:192) - Exception serializing TV_Show with guid 'com.plexapp.agents.youtube://youtube|UC-eGkbYVZtCPXxFeJTuy1cg|花咲れあHanasaki Rea [UC-eGkbYVZtCPXxFeJTuy1cg]?lang=xn' (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-5fc2e0894/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/modelling/model.py", line 190, in _write
    self._serialize(os.path.join(self._storage_path, subdir))
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-5fc2e0894/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/modelling/model.py", line 215, in _serialize
    el.set('id', self._id)
  File "lxml.etree.pyx", line 699, in lxml.etree._Element.set (/data/jenkins/conan_build/1112280674/conan/.conan/data/python/2.7.17-e4735d56d5-16/plex/stable/build/242b7b657a940429f9f9b4b8934e7cbdc36e54b7/Python/PlexModules/lxml-2.3/src/lxml/lxml.etree.c:34531)
  File "apihelpers.pxi", line 563, in lxml.etree._setAttributeValue (/data/jenkins/conan_build/1112280674/conan/.conan/data/python/2.7.17-e4735d56d5-16/plex/stable/build/242b7b657a940429f9f9b4b8934e7cbdc36e54b7/Python/PlexModules/lxml-2.3/src/lxml/lxml.etree.c:15781)
  File "apihelpers.pxi", line 1366, in lxml.etree._utf8 (/data/jenkins/conan_build/1112280674/conan/.conan/data/python/2.7.17-e4735d56d5-16/plex/stable/build/242b7b657a940429f9f9b4b8934e7cbdc36e54b7/Python/PlexModules/lxml-2.3/src/lxml/lxml.etree.c:22211)
ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters

2023-01-09 18:15:50,992 (7f5330860b38) :  DEBUG (runtime:88) - Sending packed state data (107 bytes)
2023-01-09 18:15:50,992 (7f5330860b38) :  DEBUG (runtime:924) - Response: [200] str, 16 bytes
ZeroQI commented 1 year ago

2023-01-09 18:13:48,764 (7f5330860b38) : INFO (init:546) - === End Of Agent Call, errors after that are Plex related ===================================================================================================

It happens after the last line of the agent so plex issue I am afraid...

arabcoders commented 1 year ago

2023-01-09 18:13:48,764 (7f5330860b38) : INFO (init:546) - === End Of Agent Call, errors after that are Plex related ===================================================================================================

It happens after the last line of the agent so plex issue I am afraid...

Sorry i should have said i am indeed aware the the exception occurs after the end of agent call, but it seems to me exception is in response of malformed data in the GUID or the content of the metadata.

Is it possible to remove the directory from the guid to be like hama agent com.plexapp.agents.youtube://uploader-id/season/episode

arabcoders commented 1 year ago

@ZeroQI Thanks for the tips about plex, i think i managed to find the bug for subs not showing up, it's not a bug more less mishap or forgotten code in plex com.plexapp.agents.LocalMedia, if you go to __init__.py and look for this section of the code

class localMediaTV(Agent.TV_Shows):
  name = 'Local Media Assets (TV)'
  languages = [Locale.Language.NoLanguage]
  primary_provider = False
  persist_stored_files = False
  contributes_to = ['com.plexapp.agents.thetvdb', 'com.plexapp.agents.none']

  def search(self, results, media, lang):
    results.Append(MetadataSearchResult(id = 'null', score = 100))

  def update(self, metadata, media, lang):

    # Clear out the title to ensure stale data doesn't clobber other agents' contributions.
    metadata.title = None

    # Look for media, collect directories.
    dirs = {}
    for s in media.seasons:
      Log('Creating season %s', s)
      metadata.seasons[s].index = int(s)
      for e in media.seasons[s].episodes:

        # Make sure metadata exists, and find sidecar media.
        episodeMetadata = metadata.seasons[s].episodes[e]
        episodeMedia = media.seasons[s].episodes[e].items[0]
        dir = os.path.dirname(episodeMedia.parts[0].file)
        dirs[dir] = True

        try: localmedia.findAssets(episodeMetadata, media.title, [dir], 'episode', episodeMedia.parts)
        except Exception, e: 
          Log('Error finding media for episode: %s' % str(e))

    # Figure out the directories we should be looking in.
    try: dirs = FindUniqueSubdirs(dirs)
    except: dirs = []

    # Look for show images.
    Log("Looking for show media for %s.", metadata.title)
    try: localmedia.findAssets(metadata, media.title, dirs, 'show')
    except: Log("Error finding show media.")

    # Look for season images.
    for s in metadata.seasons:
      Log('Looking for season media for %s season %s.', metadata.title, s)
      try: localmedia.findAssets(metadata.seasons[s], media.title, dirs, 'season')
      except: Log("Error finding season media for season %s" % s)

    # Look for subtitles for each episode.
    for s in media.seasons:
      # If we've got a date based season, ignore it for now, otherwise it'll collide with S/E folders/XML and PMS
      # prefers date-based (why?)
      if int(s) < 1900 or metadata.guid.startswith(PERSONAL_MEDIA_IDENTIFIER):
        for e in media.seasons[s].episodes:
          for i in media.seasons[s].episodes[e].items:

            # Look for subtitles.
            for part in i.parts:
              localmedia.findSubtitles(part)

              # If there is an appropriate VideoHelper, use it.
              video_helper = videohelpers.VideoHelpers(part.file)
              if video_helper:
                video_helper.process_metadata(metadata, episode = metadata.seasons[s].episodes[e])
      else:
        # Whack it in case we wrote it.
        #del metadata.seasons[s]
        pass

Clearly, they are ignoring the Date based season folders, thus no actual scan is happening. and it seems they fixed it in the C++ agent but not in the python code. which what YouTube-Agent.bundle defaults to i.e.

<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="39" librarySectionTitle="test" librarySectionUUID="a8a2e006-d4d7-4d90-aad0-1c3b83446faa" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1673274029">
    <Video ratingKey="217520" key="/library/metadata/217520" parentRatingKey="217519" grandparentRatingKey="217465" guid="com.plexapp.agents.youtube://youtube|UCWa9Ea4SfJ2kCF49NZhODoA|Season 2021/2022/10181228?lang=xn" parentGuid="com.plexapp.agents.youtube://youtube|UCWa9Ea4SfJ2kCF49NZhODoA|Season 2021/2022?lang=xn" grandparentGuid="com.plexapp.agents.youtube://youtube|UCWa9Ea4SfJ2kCF49NZhODoA|Season 2021?lang=xn" type="episode" title="【LIVE映像】「SOS! Summer」#ババババンビ|2022年8月14日 Zepp Namba 単独公演|アイドル ダイジェスト" grandparentKey="/library/metadata/217465" parentKey="/library/metadata/217519" librarySectionTitle="test" librarySectionID="39" librarySectionKey="/library/sections/39" grandparentTitle="Season 2021" parentTitle="Season 2022" summary="8月14日にZepp Nambaにて開催された単独公演のライブ映像を公開! 10/21(金)ワンマンライブ開催! 「バンビの野望」中野サンプラザホール🏛 18:00 開場 / 19:00 開演 🎫只今チケット絶賛販売中❗️(全席指定) http://r-t.jp/babababambi #アイドル #ライブ映像 💚池田メルダ https://twitter.com/meruda__ikeda 💖宇咲 https://twitter.com/usa_usa0427 🤍小鳥遊るい https://twitter.com/pipipi_br ❤️岸みゆ https://twitter.com/miyu_kishi0213 💙水湊みお https://twitter.com/minato__mio 💜近藤沙瑛子 https://twitter.com/saekondo_inu 💛吉沢朱音 https://twitter.com/akanekogurasi 🖤公式Twitter https://twitter.com/babababambi01 ▼YouTube関連のお問い合わせはコチラ https://forms.gle/y7T6qV6NBhvw9bGs8" index="10181228" parentIndex="2022" year="2022" thumb="/library/metadata/217520/thumb/1673299673" art="/library/metadata/217465/art/1673299673" grandparentThumb="/library/metadata/217465/thumb/1673299673" grandparentArt="/library/metadata/217465/art/1673299673" duration="117934" originallyAvailableAt="2022-10-17" addedAt="1673299613" updatedAt="1673299673">
        <Media id="297091" duration="117934" bitrate="4586" width="1920" height="1080" aspectRatio="1.78" audioChannels="2" audioCodec="aac" videoCodec="h264" videoResolution="1080" container="mkv" videoFrameRate="NTSC" audioProfile="lc" videoProfile="high">
            <Part accessible="1" exists="1" id="626414" key="/library/parts/626414/1665232094/file.mkv" duration="117934" file="/storage/test/media/youtube/01TV [UCWa9Ea4SfJ2kCF49NZhODoA]/Season 2022/20221018 - 【LIVE映像】「SOS! Summer」#ババババンビ|2022年8月14日 Zepp Namba 単独公演|アイドル ダイジェスト [youtube-qyIwYXW1hME].mkv" size="67719239" audioProfile="lc" container="mkv" deepAnalysisVersion="6" requiredBandwidths="4423,4423,4423,4423,4423,4423,4423,4423" videoProfile="high">
                <Stream id="2138528" streamType="1" default="1" codec="h264" index="0" bitrate="4458" bitDepth="8" chromaLocation="left" chromaSubsampling="4:2:0" codedHeight="1088" codedWidth="1920" colorPrimaries="bt709" colorRange="tv" colorSpace="bt709" colorTrc="bt709" frameRate="29.970" hasScalingMatrix="0" height="1080" level="40" profile="high" refFrames="3" requiredBandwidths="4300,4300,4300,4300,4300,4300,4300,4300" scanType="progressive" width="1920" displayTitle="1080p (H.264)" extendedDisplayTitle="1080p (H.264)"></Stream>
                <Stream id="2138529" streamType="2" selected="1" default="1" codec="aac" index="1" channels="2" bitrate="128" language="English" languageTag="en" languageCode="eng" audioChannelLayout="stereo" profile="lc" requiredBandwidths="124,124,124,124,124,124,124,124" samplingRate="44100" displayTitle="English (AAC Stereo)" extendedDisplayTitle="English (AAC Stereo)"></Stream>
                <Stream id="2139831" key="/library/streams/2139831" streamType="3" codec="ssa" language="English" languageTag="en" languageCode="eng" format="ssa" displayTitle="English (SSA External)" extendedDisplayTitle="English (SSA External)"></Stream>
            </Part>
        </Media>
        <Extras size="0"></Extras>
        <Related></Related>
    </Video>
</MediaContainer>
arabcoders commented 1 year ago

More info at https://forums.plex.tv/t/bug-in-legacy-localmedia-agent-prevent-year-based-seasons-from-pulling-in-subtitles/826314 for future reference in case someone struggle with this.