Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Channel download: optimization when using `dateafter` cutoff #23706

Closed
isaksky opened this issue Jan 11, 2020 · 3 comments
Closed

Channel download: optimization when using `dateafter` cutoff #23706

isaksky opened this issue Jan 11, 2020 · 3 comments

Comments

@isaksky
Copy link

@isaksky isaksky commented Jan 11, 2020

Checklist

  • I'm reporting a feature request
  • I've verified that I'm running youtube-dl version 2020.01.01
  • I've searched the bugtracker for similar feature requests including closed ones

Description

Let's say one uses youtube-dl like this:

  • --batch-file, watching 5 channels
  • Filtering videos with --dateafter 20200101
  • Each channel has hundreds of total videos

With the current strategy, youtube-dl will just loop through every channel, then every video of that channel, even when the date of the videos is decreasing below the dateafter cutoff. I assume there is a reason for this (like the order of the videos is not guaranteed to be ordered by date), but it would be nice to be able to use a less thorough but faster strategy.

The current strategy leads to making hundreds of requests for something that could often be done in a small fraction of that. Maybe it isn't guaranteed to yield the same results, but empirically speaking it has always been the case for me.

A feature that would solve the problem would be an option that let's you break the 'get-videos-for-channel-loop' as soon as you encounter one that is below the dateafter cutoff.

@isaksky isaksky added the request label Jan 11, 2020
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 11, 2020

the order of the videos is not guaranteed to be ordered by date

--download-archive.

@dstftw dstftw closed this Jan 11, 2020
@dstftw dstftw added the duplicate label Jan 11, 2020
@isaksky
Copy link
Author

@isaksky isaksky commented Jan 11, 2020

I already use --download-archive, it doesn't solve the problem. Looks like you haven't understood the issue.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 11, 2020

  1. I'm not a telepathist to guess whether you already use download archive or not - you did not mention anything about thus assuming not using. Download archive allows to skip each video processing completely when id is known from playlist pages.
  2. As for dateafter cutoff, again: this will not work reliably as you have no guarantees on ordering. And I will not accept any features with unpredictable behavior.
@ytdl-org ytdl-org locked and limited conversation to collaborators Jan 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.