-
-
Notifications
You must be signed in to change notification settings - Fork 553
Get the batch of working playlist videos and stop on the unavailable batch #922
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,4 +1,5 @@ | ||||||||||||
| using System.Net.Http; | ||||||||||||
| using System.Linq; | ||||||||||||
| using System.Net.Http; | ||||||||||||
| using System.Threading; | ||||||||||||
| using System.Threading.Tasks; | ||||||||||||
| using YoutubeExplode.Bridge; | ||||||||||||
|
|
@@ -126,6 +127,10 @@ await http.GetAsync( | |||||||||||
| continue; | ||||||||||||
| } | ||||||||||||
|
|
||||||||||||
| // If the response contains videos, proceed with them even if the playlist is marked unavailable | ||||||||||||
| if (playlistResponse.Videos.Any()) | ||||||||||||
|
Comment on lines
+130
to
+131
|
||||||||||||
| // If the response contains videos, proceed with them even if the playlist is marked unavailable | |
| if (playlistResponse.Videos.Any()) | |
| // If the response contains videos, proceed with them even if the playlist is marked unavailable, | |
| // but only on the final retry attempt. | |
| if (retriesRemaining == 0 && playlistResponse.Videos.Any()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we try the next batch still, until it's empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes!
I already tried that with jumping techniques instead of brute forcing every index, but it always misses some videos.
I can give it another round of trial.
But for this pr, it just returns with the available ones until an unavailable batch comes in.