Use original YouTube thumbnails on your YouTube video imports

Thanks for the interesting reading, @tmm1.
No worries, I am not concerned at all, I'm not losing sleep over this. :laughing:

Sorry for the distraction. Please carry on. :slight_smile:

This is wonderful. In the process of figuring out how to make it work, I am now in possession of a new tool to clean up lots of stuff in the metadata in batch. Although for me, this is kinda like giving a sharp object to a toddler, but I figure worse case I delete the source and start over.

Anyway, what I would love to do is to have the thumbnail show up in the guide (and on-now/later) detail section vs. the generic show image. It would just much better for all of these videos. Don't even know if this is possible but have a question.

What is the relationship/difference in use of the Airing:Image and Airing:Thumbnail? Each airing/episode seams to inherit the Image from the show, and then that is used exclusively in the guide details.

I will certainly understand if the recommendation is to "put down the knife and go play outside".
Thanks
Charles

tvOS and iOS are sort of in the process of this. Where a video would show its thumbnail, like a TV Show episode, it will show the overrided thumbnail instead.

tvOS and iOS have gone a little further and are using the thumbnail in the modal when you select the video, as it's a bit more descriptive. This all needs to be ported over to Android.

There's no plans to use this thumbnail in things like Virtual Channels, as those are set to use the Airing image, which is the branded image for the video in its Video Group.

Excellent. I am pretty much all apple on the client side so should be in good shape, although I am a big fan/user of virtual channels if you ever re-visit that one. All good for now because I just found another squirrel to chase! I just discovered the option to download all the metadata for the videos with tubesync. Now I can also load the full description and whatever else is interesting for a given video.

Youtube is a bit of an undiscovered country, only because it is an unorganized mess. But there is a ton of content there that is at least entertaining if not quality.

I was able to set this up last night for a bunch of YT channels I like to follow. I updated my naming syntax for downloads to filename_(date)_[youtubeID].ext and got the workflow into place.

Very slick. Thanks for this!

Is there any way to get more metadata, say into the Summary or Full Summary fields? Maybe the first few lines from the YouTube video's description?

1 Like

package = {Thumbnail: yt_thumbnail_url, Airing: {EpisodeTitle: new_title, Summary: new_summary, FullSummary: new_full_summary}}

You can always use web dev tools in the web admin to see more.

again, THIS IS UNOFFICIAL AND NOT SUPPORTED :wink:

1 Like

Understood, and THANKS AGAIN for sharing this greatness... I'll tinker some later when I get home.

1 Like

Using the actual youtube thumbs really makes things look nicer.

2 Likes

Very much so! Each video group is now consistent with the branding of the YT channel that feeds it. Makes it easier to differentiate between these channels, and livens up the DVR library interface a lot too. Thanks for making this possible!

FWIW I pay for YouTube Premium and appreciate the platform. But their app's interface, while it's gotten a bit better recently, still kinda sucks. So this unofficial and unsupported YouTube integration is great!

Along with Channels' new RSS feed, that helps us keep tabs on automated video imports, the actual consumption of curated YT content has never felt more elegant. I'm now using News Explorer which has notifications and widgets, as well as apps for AppleTV and Apple Watch (!)

For now I set up a Collection in Channels DVR that has some of our favorite subscriptions, sorted by most recently updated, so they're easier to browse through. The ability to mix and mix these imports via playlists, smart or otherwise, would be great to see one day.

1 Like

Thank you @Maddox for this script. Works great.

I have started downloading some YT videos that are cooking show related for the wife.

I am looking into this utility and realized I already have a lot of downloaded videos and don't have the required naming in the title. Is there a utility that you guys know of that would do that?

What are you using that downloads with the correct naming syntax? I have been using Media Human but it doesn't look like that is one of the options in their software that I can find.

1 Like

Thank you so much! I had missed that advanced button when I had the UI opened up.

So, I am not a programmer, but thought this script may be easy to run and try my hand at it. I downloaded and installed Ruby on my DVR server (windows 11 machine), copied the script into a text file with .rb extension and saved in a folder on my hdd, added my DVR URL where indicated in the script.

When I run the script I get this error: internal:C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb:88:in require': cannot load such file -- httparty (LoadError) from <internal:C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in require'
from fix_thumbnails.rb:1:in `'

I tried to google the "cannot load such file -- httparty (LoadError) but I can't seem to find anything that I understand.

Is this just some simple thing I am missing or am I out of my depth here and it's not as easy as I thought?

2 Likes

You need to install that package with the rubygems package manager.

I don’t know anything about ruby on windows, but on Unix you would run this at the command line:

gem install httparty

Maybe this is enough to help you google how to do it in windows.

1 Like

Thanks! That handled that error. In Windows, it does run in the command prompt.

Anyway, now I get the error: fix_thumbnails.rb:7:in `': uninitialized constant Youtube (NameError)

source_files = HTTParty.get("#{server_url}/dvr/groups/#{Youtube}/files")

So I assume I am not filling in something correctly somewhere in the script, but not sure what I am supposed to put there, if anything.

1 Like

You edited that part of the script. Edit the above variable video_group to be the video group ID you want to manipulate in your Channels library.

It will be a long collections of letter and numbers. You can get it by visiting this group in your web admin and getting it from the url.

2 Likes

Awesome! Thanks.

It does run without throwing any errors in the command line. However, it's doesn't change any of the images or the title. I am trying to figure out where to find an error log to look at but haven't yet.

1 Like

I figured out what I was doing incorrectly! When I put the video group number in the video_group line in the script I wasn't adding the "video-" part before the collection of letters and numbers. Adding that made it work perfectly!

Thanks for this little script! It makes a real difference in my videos section.