[REL] YouTube Metadata Agent

It was more about specifying a series/episode number.
That solved a huge amount of problems for me ages ago.

Yes it uses local json file but didn’t code it myself so have little information.

For the crash create the plex token as per ass readme

Ah, I didn’t realize that you hadn’t done the info implementation.

I’m not sure what you mean about the plex token. Isn’t that only for creating separate logs per library? I only have one youtube library on this server. Just trying to understand what you’re asking for.

Thanks.

I’m struggling at the moment and I’ve seen people have this issue before, but I still can’t seem to fix it. The full path is showing for the channel names instead of the channel names. I saw that there had been an update that corrected this. So, I went to the github and downloaded the code as a zip file from the button on the main page. I installed the updated version and restarted my Plex and then scanned that library, refreshed the metadata, and analyzed, pretty much whatever I could try to do, and the channel names are still the full paths for the folders. What am I missing?

What are your files/paths named?

1 Like

My paths follow the suggested guidelines on the github

This is what it looks like in Plex as the channel name:

%2FMedia%2FYouTube%2FBad%20Chaperones%20%5BUCgao-dj8eksv5HWytpU64eg%5D%2F15%20-%20Is%20OnlyFans%20Actually%20Worth%20It%20W_%20AbsolutelyBlake%20_%20Bad%20Chaperones%20%2314%20%5BjBQnuHRCzXY%5D%2Emkv

The path is actually for that one file is listed as:

/Media/YouTube/Bad Chaperones [UCgao-dj8eksv5HWytpU64eg]/15 - Is OnlyFans Actually Worth It W_ AbsolutelyBlake _ Bad Chaperones #14 [jBQnuHRCzXY].mkv

And the first one is the channel name for some reason. The episodes themselves are named less chaotic in Plex

15 - Is OnlyFans Actually Worth It W_ AbsolutelyBlake _ Bad Chaperones #14 [jBQnuHRCzXY].mkv

My only real suggestion is to name your files so they include a series and episode number like I describe in the linked post. This solved a lot of my matching problems. Other than that everything looks good for your names/paths.

Thanks, I’ll give it a shot, but I’m not sure that explains why my channel names are displaying as full path in my youtube library. :confused:

I revised this recently and came up with a better solution that works how I originally wanted it to. Mainly the YouTube Channel/SYYYY EMMDD - Title.ext format. Other solutions I have seen here got me thinking about different ways to use the YYYYMMDD format that yt-dl/c/p lets you output. Here is my solution:

-o "/home/scripts/youtube-dl/Downloads/%(uploader)s [%(channel_id)s]/S%(upload_date>%Y)s E%(upload_date>%m%d)s%(playlist_index)s - %(title)s [%(id)s].%(ext)s"
# Channel Name [ID]/S[Year Posted] E[Month Posted][Day Posted][Playlist Index] - Title [ID].ext
# Unraveling_the_Pattern [UCtQ4ZscQ-2stjM1JdcBzLxA]/S2020 E012301 - What_is_The_Wheel_of_Time_Part_One_-_The_Books_Unraveling_the_Pattern [0gYnAdKvQ1s].mkv

I wanted to make sure that the file names and seasons reflected the original date of the video posted, not the day/year that I archived it. This adjustment allows for that. I have tested the format on 1000+ YouTube videos and it has been excellent. No duplicates (thanks to playlist index), clean seasons that are the year the video was uploaded, and fast matches using the Plex scanner and YouTube-Agent.bundle. Best of all, is there there is no two part naming and the downloader handles it all. No find or for loops required.

Looks really good. From memory I ran into problems with playlist index once there were over 100 videos in a playlist but I guess that is easily solved with padding (I only pad to 2 characters).

Like you my solution has been in place for so long that I am loath to change it. Its now at the stage where it “Just Works” so I no longer touch it.

1 Like

just published a new branch, 200 shorter and clearer for easier code maintenance GitHub - ZeroQI/YouTube-Agent.bundle at rewrite
Please report any issues

I’ve updated to the new branch and refreshed the library and my channel names are still coming up as the full path for on the files in that channel. I honestly don’t know what I’m doing wrong here.

Also, as I’m trying to figure this out and go through my media. I’m noticing that some of the episodes, while different files, are stacking on top of each other. I’ve followed the directions listed on the github, and I have channels named as full paths and channels that have like 44 “episode 1’s” because of something going on. I’m just lost and confused with all this, and it’s not looking like anyone will be able to help :confused:

did you rename the files to include sXXeYY in the end? like I said, that cleared up a ton of problems for me.

I did, but nothing seemed to resolve for me :confused:

did you update the scanner for the stacking issue? I changed the filelist format as well to be able to reproduce folders easily, and fixed few issues
for the agent,

An option to name the series according to its folder name · Issue #59 · ZeroQI/YouTube-Agent.bundle · GitHub Please update bug report with logs as no reply since 3 days ago

is rewrite the new main branch or should I stay on master?

ASS updated

  • [youtube2-xxxx] mode will use publishing year as a season for channels
  • [youtube3-xxxx] mode will use publishing date to sort playlists
  • Playlist now reverse itself automatically if first item more recent than the last
  • support ‘Playlist.info.json’ created with YouTube-dl -J --dump-single-json > Playlist.info.json

Youtube Agent, rewrire branch merged

  • merged to master now.
  • 200+ less lines, and more readable and simpler logic
  • supports json file if present on disk, no more setting
  • various changes to prevent code-page errors

@ElusiveZatchmo I just resolved that bug in the agent, please test.

Apologies, this has been an insane week for me. I try it out this weekend and let you know. Thanks so much for your hard work.

i modified again in the meantime, playlist mode perfect, reverse playlist so oldest eps are first if needed. In channel mode it will use year as seasons and date based numbering for eps, from filename or last modification date. has issues handling multiple same day release

Absolute series scanner was updated

  • Playlist items get the rank from the playlist, which can self-reverse so oldest items are at episode 1
  • Channels now use date in filename or in file last modification, so they are added date-based which look cooler. However if there is multiple release on a given day, it will use numbering MMDDxx with xx being incremental
  • No longer using youtube2/3 modes as all automated