Use original YouTube thumbnails on your YouTube video imports

Cool, I just wanted to be sure everything was working correctly. I can’t thank you all enough for your help. It truly is a great community! :grinning:

Another way to see all of the VIDEO_GROUP_IDs at once is through the API & Feed Explorer (Support-->API & Feeds) and look at the JSON of the Video groups. The URL formed by selecting video groups option is: http://channels_ip:8089/api/v1/video_groups

1 Like

Thanks for the tip! I had always opened them one at a time, but that is good to know.

After using this script for the last 24 hours, I’ve noticed that it replaces “?” And “:” in the title with “_”. Is this a limitation in how the script deals with these characters?

Also, I’m currently using Keyboard Maestro to run the script every minute in order to avoid the title not getting updated fast enough. Are you using a different method?

Thanks again for your help :grinning:

Every 2 hours has been working fine for the pace of my subscriptions. There are lots of ways to make this happen, like cron or LaunchAgents. The automation can also be set to run whenever content in a specific file path changes, which may work better for you in this context. And if you prefer a basic GUI for managing this, I can recommend Lingon.

Any idea how this script could be adapted to add the YouTube author to the Channels episode title field and the YouTube video title to the Channels summary field? This way, it would show the YouTube channel name above and a description of the video below. Since I keep all of my videos in the same folder, it would make it much cleaner and clear what I’m watching. I do it this way, so I can watch all of my videos in succession without having to play each individually.

You would have to break your videos into Video Groups by the channel to get the name in that field. That line always shows the name of the Video Group.

If I were to do it this way, would each video display in a separate folder or would they all show up together? When watching my videos, I don’t want to have to select each video in separate folders to play them. I hope that makes sense…

They’re in separate video groups, yes. We don’t consider things like this “folders”

You would have to select the video group to browse its videos.

We have plans for a playlist like feature that would incorporate rules like Library Collections. With that, you’d be able to pull the videos all together. There’s no timeline on that though.

1 Like

this is a great feature. would be awesome to see something more integrated like playon is.

2 Likes

Is there any reason the script wouldn't work if the files are imported as a tv show instead of under videos as long as the long key still points to the show? (edit: its not working for me under videos either. so im doing something wrong)

Using httparty on fedora linux.

I'm trying to import this playlist (he has hundreds of others that are great, highly recommend for a scifi virtual channel) https://www.youtube.com/playlist?list=PLIIOUpOge0Lupd8Xd1xPwkY6eEu2fpWGo

I'm using tubesync on my synology nas to download using the format
{title}{yyyy_mm_dd}{key}.{ext}

edit: under video group i have tried adding the prefix "video-_____" too and its not the issue.

edit2: im guessing the flaw is the files are on the synology nas and even though the linux computer has access via smb something is being blocked. ideas?

I'm kind of a noob at this so forgive me if this is completely unhelp, but I think tubesync uses a "_" as a delimiter and it should be: {title}_{yyyy_mm_dd}_{key}.{ext} . Hope this helps.

1 Like

Has anyone found a clever way to trigger this script other than cron?

I hate to post this because I know it's because I'm doing something stupid, but I am trying to run this on ubuntu linux. I have made sure, pearl, htttparty, and json are installed with no issues. However, I keep getting the following error:

phillip@sperryhouse:~/servers/Scripts$ ./fixyoutube.pl
./fixyoutube.pl: line 1: require: command not found
./fixyoutube.pl: line 2: require: command not found
./fixyoutube.pl: line 4: server_url: command not found
./fixyoutube.pl: line 5: video_group: command not found
./fixyoutube.pl: line 7: syntax error near unexpected token `('
./fixyoutube.pl: line 7: `source_files = HTTParty.get("#{server_url}/dvr/groups/#{video_group}/files")'

Somebody please tell me how I'm being stupid.

It's a Ruby script (not Perl).

:person_facepalming: Told you it was something stupid.

silly question but does this need to executed from the Synology NAS that is holding the tubesync files?

I have a one video playlist I am downloading using tubesync as a test

The Media format is

> {title}_{yyyy_mm_dd}_{key}.{ext}

the output file is

art-bell-and-richard-c-hoagland-on-space-anomalies-and-alien-architecture-coastt_2022-10-28_-_wkw2byNwM.mkv

I updated the ruby script on my laptop (not running on the nas itself) to have the same server_url as my channels dashboard and have the video id as videos-7147efdf6878206ea76603703d146d4c48e6999b869a0022dcfa63d882b5fbba

httparty is installed and working but the script doesnt seem to do anything. im running the command in terminal ruby fix_thumbnails.rb

i'm missing something obvious

edit: figured it out. editing this post in case someone else has the same problem. I was missing brackets around the date and key

in tubesync set it to {title_full}_({yyyy_mm_dd})_[{key}].{ext}

I use the fix thumbnails script in OliveTin and it seems to be working except a small percentage of my videos end up with a black thumbnail.

I assume the script is based on the work by @maddox so I'm posting it over here.
Any ideas of what is going on here?

For those who need to modify the presets in pinchflat

{{ channel }}/{{ title }}_({{ upload_yyyy_mm_dd }})_[{{ id }}].{{ ext }}

3 Likes

I've released a project that does sort of the same thing but a bit easier: