meeb / tubesync

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

Download tasks never start #16

Closed winteriscariot closed 3 years ago

winteriscariot commented 3 years ago

I have a bunch of channels added, and it queues things up, but it never downloads anything.

image

When going to one of the episodes, it has all the pertinent details but the "Task will run..." time/date is in the past. It never downloaded the video:

image

Docker logs show that it says it's downloading files but no files hit the drive (snippet, the only other log entries were webserver access logs):

2020-12-18 11:17:33,588 [tubesync/DEBUG] [download] Downloading video 17 of 181
2020-12-18 11:17:33,589 [tubesync/DEBUG] [youtube] 6TpwIxIU7qM: Downloading webpage
2020-12-18 11:17:34,579 [tubesync/DEBUG] [download] Downloading video 18 of 181
2020-12-18 11:17:34,579 [tubesync/DEBUG] [youtube] fnQ01hViDNo: Downloading webpage
2020-12-18 11:17:35,565 [tubesync/DEBUG] [download] Downloading video 19 of 181
2020-12-18 11:17:35,565 [tubesync/DEBUG] [youtube] Zcj8ZG_V_14: Downloading webpage
2020-12-18 11:17:36,350 [tubesync/DEBUG] [download] Downloading video 20 of 181
2020-12-18 11:17:36,350 [tubesync/DEBUG] [youtube] u9TYS_J1udo: Downloading webpage
2020-12-18 11:17:37,575 [tubesync/DEBUG] [download] Downloading video 21 of 181
2020-12-18 11:17:37,575 [tubesync/DEBUG] [youtube] QfQf4BZRCmo: Downloading webpage

what would be the best way to go about troubleshooting this?

meeb commented 3 years ago

There's just one worker, it is "working" and there's nothing to troubleshoot.

The tasks have a priority, so what the worker does is index all the media first, then thumbnails, then downloads the videos. If you just leave it for a while media will start to eventually appear. The logs you show are youtube-dl indexing your channel to find the media to download which it does in a bulk task. What youtube-dl means by "downloading webpage" is it's extracting the metadata for a video, not the video file itself.

The "will run at" time is just the date when it be available to next run, the worker may run it after this time if the worker is busy with other higher priority tasks for a while first. Given the confusion here I might see if I can make the wording a bit clearer.

If you see "X tasks completed" then it is working, as a general rule.

meeb commented 3 years ago

Also, it's technically possible you may have added too many sources at too low an interval (e.g. index every hour) for the worker to keep track of. Try setting them all to 24 hours and see if that helps. If this is a common problem I'll look at adding more workers by default.

meeb commented 3 years ago

This should be resolved by commit 51cd942 and details in issue #19. The feature will be in the 0.7 release. I'll close this for now, but if your issue persists after upgrading to 0.7 re-open the issue.