Open victorjzsun opened 4 years ago
These come back as error in the debugger and should therefore not update the timestamp, which means we add them on the next execution.
Should also handle videos that can't be found (private) as described in #92
These come back as error in the debugger and should therefore not update the timestamp, which means we add them on the next execution.
Yes, but that could mean adding the first few over and over again. It would be better if the script noticed the error, stopped the process and updated the timestamp to just after the last video that was added, so that it does not produce a thousand error messages, but only one, and can resume without user input the next time. This would also make the currently somewhat hardcoded limit of 200 videos unnecessary in many situations (but it could be nice to keep for other usecases). Possible problem: If the script checks for new videos in one channel, adds them all and only then checks the next channel, older videos on the later channels would be skipped. If that is the current logic, it would have to be changed to query all channels first and then add videos in chronological order. I have no idea how complicated that would be to implement.
That is possible at least for getting videos for a channel. With an extra API call, we can retrieve the publish timestamp for each video and as you said, add videos in chronological order. This would require an extra quota usage of 200, aka 4 videos worth, but could be combined with other video-related filters (excluding shorts) that require the API call. For videos added to a playlist, there still needs to be a custom solution to catch those videos.
I think I've finished implementing this feature here !127, but I would still like to do more testing since I can only really test quota exceeded stuff once a day ;(
My implementation "stores" vids failed due to quota by dynamically updating last updated timestamp and making sure we always add videos to playlist oldest first.
Catch vids not added to playlist on error and store somewhere.
Then add vids first on next run