ZeroQI / YouTube-Agent.bundle

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

TV Show doesn't get a proper name. #19

Closed tmfksoft closed 5 years ago

tmfksoft commented 5 years ago

When the agent scans it correctly labels individual episodes but fails to label the show. The show simply picks up the file path for the channel.

For example, I have a King of Random folder with some videos in, the show ends up being named "E:\Plex\YouTube\UC1zZE_kJ8rQHgLTVfobLi_g" rather than using the channels name.

Is this intentional or overlooked?

Thanks for working on a great plug-in 👍

ZeroQI commented 5 years ago

Not intended but "E:\Plex\YouTube\King of random [UC1zZE_kJ8rQHgLTVfobLi_g]" would be the proper folder name though. Just updated the agent, it corrected it for me after metadata refresh. Please let me know if it fixes it for you and please consider donations if so.

jimbuck commented 5 years ago

I downloaded and installed the plugin last night and I am getting this same bug. I have a TV Show Plex library with folders for each playlist that match your example above:

Z:\Youtube\<playlist name> [PLxxxxxxxxxxxxxxxxxxxxxx]\

It actually shows the correct name while it is scanning for files, but then switches to the folder path once it finds the files. The videos have the correct episode number, title, description, and director.

ZeroQI commented 5 years ago

Thanks for that

I never had a youtube id with an underscore, and really bad with regex, so good to know need to check if the following code works

displayname = media.title if movie else media.show
filename = os.path.splitext(os.path.basename(media.items[0].parts[0].file if movie else media.filename))[0]