youtube-dl-subscriptions icon indicating copy to clipboard operation
youtube-dl-subscriptions copied to clipboard

last.txt is updated when it shouldn't so that videos get skipped

Open T-vK opened this issue 6 years ago • 1 comments

I am running your script once per hour automatically in the background. And I noticed again and again, that lots of videos are missing. Apparently the issue is that the last.txt get's updated even when the server could not be reached (e.g. no Internet connection). So when I'm somewhere where I don't have have Internet or where it's very unstable (like on a train for instance), it just updates the last.txt to the current timestamp without downloading any of the new videos and thus a lot of new videos will never be downloaded...

I'm not really a Python guy, but it would seem that a simple if statement checking if any new videos have been found before writing to the last.txt would fix this bug.

Edit: It also seems that videos get skipped when a new video is released while other videos are still being downloaded.. I'm not 100% certain about that, though. I only know that videos sometimes get skipped even when I have an Internet connection.

T-vK avatar Mar 11 '18 20:03 T-vK

It might be due to videos appearing in rss with slight delay not at their publication date. The solution would be to store ids of videos that were already downloaded.

seler avatar May 28 '18 10:05 seler