meeb / tubesync

Syncs YouTube channels and playlists to a locally hosted media server
GNU Affero General Public License v3.0
1.96k stars 123 forks source link

This source has encountered permanent failures listed at the bottom of this page, check its settings #114

Open mkpstl opened 3 years ago

mkpstl commented 3 years ago

This happens to all of my sources after a few days.

E5C9C2C3-9FD0-4A76-A216-F9CFD0938447 8225B689-EC25-4D15-8471-13A7AC71EF72

meeb commented 3 years ago

Are you running the latest container image? Anything useful in your docker console logs?

mkpstl commented 3 years ago

Yes, I'm running v0.9.1

For logs see attached Image.

Bildschirmfoto 2021-04-30 um 11 33 52

Looks like I'm too dumb to add correct channel links(?)

Awesome Project btw.

meeb commented 3 years ago

No your channel appears to be added correctly. Make sure you're using the :latest tag and not :0.9.1. The :latest tag is more recent. If you've updated to :latest and still have issues let me know.

Spamuser00 commented 3 years ago

@meeb I have the same issue on the unraid docker app.

meeb commented 3 years ago

@Spamuser00 what image are you using? And is it up to date? What channel is it?

meeb commented 3 years ago

Hi, did you get a chance to look for the information I asked for above?

amuilyas commented 2 years ago

Hi I am having same issue with a channel as described. Here are screen grabs https://imgur.com/a/w3oNB8M

I am running ghcr.io/meeb/tubesync:latest on a Synology DSM 6.2.4-25556 Update 6

I have 3 other channels successfully added with no issues. Just this one specific channel not working.

Where do I find the log file? I looked in the config directory but could not see if

meeb commented 2 years ago

@amuilyas this is a different issue, this is #243

"aragusea" is not a YouTube channel, it's a user with a vanity URL, you can see this because https://www.youtube.com/c/aragusea returns a 404. The actual channel name for "aragusea" is "UC9_p50tH3WmMslWRWKnM7dQ".

You can add https://www.youtube.com/channel/UC9_p50tH3WmMslWRWKnM7dQ into TubeSync to make this channel work.

amuilyas commented 2 years ago

Thanks. The other channels I added used the vanity URL and worked.

For my education: So vanity URL is hit and miss? Im better off always using the channel ID?

meeb commented 2 years ago

The vanity URL term is one I've personally just started using to explain the behavior its not an official term. It seems that channels have channel IDs like the long string I pasted above, however not all channels work at /c/name URLs. As far I can tell you can have /name which can be auto-created as some sort of shortcut to a channel ID or a user page, but not have the name work by itself so /name works but /c/name doesn't but /c/long-id does in some situations.

This comment is really for #243

I don't really know much more than that as I've never created channels or used the back end of YouTube myself. I can only assume there's some sort of "choose your name" feature to pick the /name which you can select if it forwards to your user profile, a channel or a playlist etc.

What TubeSync does is just extract the name from /channel/name and see if the URL /c/name/videos has media on it. If this returns a 404 then the name isn't really a channel and you get the error you've seen so this only impacts "channels" where the channel name forwards to something that isn't a normal named channel. It seems internally these are also channels, but just with IDs and not a friendly name so I assume YouTube creates a channel with an ID and uses that to group media under even if it's a user page. The term "channel" could be replaced with "media group" where every group has an ID but not every group has a friendly name.

The current method to find the channel ID apparently isn't 100% effective and sometimes doesn't work (maybe created in some other process I don't know how it works internally at YouTube), plus having a channel key randomly change to a massive long ID isn't that obvious either which is why this isn't automated yet.

meeb commented 2 years ago

Oh and in answer to your specific question, to the best of my knowledge the channel ID should always work and is more explicit so yes, using a channel ID should avoid this issue if you can be bothered to manually find them for all channels you're adding to TubeSync.

amuilyas commented 2 years ago

Thanks mate, I appreciate the detailed answer and all your work on this project!

For any future folk, this is an easy way to find channel ID with a vanity URL. Paste'n'go https://commentpicker.com/youtube-channel-id.php

amuilyas commented 2 years ago

Hi mate back again unfortunately. I tried adding channels using the full channel ID but videos are not downloaded and source is never trawled. I verified each URL link within the app and it launches the right YT channel. I also reset all scheduled tasks and waited few days but still no activity. The app works as I do have channels added using vanity that have videos downloaded. image

meeb commented 2 years ago

What's in the container logs? Do you have TUBESYNC_WORKERS set to anything other than 1?

amuilyas commented 2 years ago

Thank you

I am pulling image from ghcr.io/meeb/tubesync:latest Do not have ENV variables set for tubesync_workers. So I assume its the default? Should I add it to the ENV list and specify 1?

Attached is the container log, it is 26MB CSV so I zipped it. tubesync.zip

meeb commented 2 years ago

No, don't adjust the ENV vars. I asked because a common cause of similar issues to this is people increasing the worker count which gets their IP throttled by YouTube.

You have a bunch of lock issues with using SQLite in your logs. Given the amount of media you're indexing and downloading it would probably be advisable to use Postgres or MySQL as a backend.

amuilyas commented 2 years ago

Many thanks @meeb I have installed mariadb but struggling to connect it to a fresh instance of TubeSync. I'm hard up on my wall of ignorance, so will just hit pause on this for now. Great app and thanks again for all your help

meeb commented 2 years ago

Did you see this guide?

https://github.com/meeb/tubesync/blob/main/docs/other-database-backends.md

You just need to create a MariaDB database (in the correct encoding) then pass the connection string to TubeSync, that's about it. Oh and make sure that the MariaDB and TubeSync containers can talk to each other.