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

Bugfix onProgress regex pattern trigger (~) #201

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

unilogica
Copy link

@unilogica unilogica commented Mar 12, 2023

Fixed Download Progress event on yt-dlp v2023.03.04

Before download info was:
[download] 0.1% of ~820.00MiB at 599.88KiB/s ETA 23:18 (frag 0/82)

Now it prints as:
[download] 0.1% of ~ 820.00MiB at 599.88KiB/s ETA 23:18 (frag 0/82)

Closes #200

Fixed Download Progress event on yt-dlp v2023.03.04 

Before download info was:
[download]   0.1% of 820.00MiB at  599.88KiB/s ETA 23:18 (frag 0/82)

Now it prints as:
[download]   0.1% of ~ 820.00MiB at  599.88KiB/s ETA 23:18 (frag 0/82)
Copy link
Owner

@norkunas norkunas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you :) you should add some tests with new output of yt-dlp progress to prove that the callback is called now properly ;)

@@ -36,7 +36,7 @@

class YoutubeDl
{
public const PROGRESS_PATTERN = '#\[download\]\s+(?<percentage>\d+(?:\.\d+)?%)\s+of\s+(?<size>[~]?\d+(?:\.\d+)?(?:K|M|G)iB)(?:\s+at\s+(?<speed>(\d+(?:\.\d+)?(?:K|M|G)iB/s)|Unknown speed))?(?:\s+ETA\s+(?<eta>([\d:]{2,8}|Unknown ETA)))?(\s+in\s+(?<totalTime>[\d:]{2,8}))?#i';
public const PROGRESS_PATTERN = '#\[download\]\s+(?<percentage>\d+(?:\.\d+)?%)\s+of\s+(?<size>[~]?[\s+]?\d+(?:\.\d+)?(?:K|M|G)iB)(?:\s+at\s+(?<speed>(\d+(?:\.\d+)?(?:K|M|G)iB/s)|Unknown speed))?(?:\s+ETA\s+(?<eta>([\d:]{2,8}|Unknown ETA)))?(\s+in\s+(?<totalTime>[\d:]{2,8}))?#';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why removing i modifier?

Copy link
Author

@unilogica unilogica Mar 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo. Copy and Paste from regex debugger.

Fixed Download Progress event on yt-dlp v2023.03.04

Before download info was:
[download] 0.1% of ~820.00MiB at 599.88KiB/s ETA 23:18 (frag 0/82)

Now it prints as:
[download] 0.1% of ~ 820.00MiB at 599.88KiB/s ETA 23:18 (frag 0/82)
@unilogica
Copy link
Author

Put back /i modifier on regex by a mislead typo.

Fix Fatal error on redo Finished Downloads
Fix trigger onProgress [~] another variations
@norkunas
Copy link
Owner

@unilogica are you willing to add the test? :)

@unilogica
Copy link
Author

@unilogica are you willing to add the test? :)

Sure. I will do that in this Saturday

@Pljushevij
Copy link

Pljushevij commented May 22, 2023

Error downloading video: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output..

yt-dlp is up to date ([email protected])

What is wrong for me?

@UnicodeApocalypse
Copy link

UnicodeApocalypse commented Sep 25, 2023

New yt-dlp update, new regex for anyone having this issue again.
\[download\]\s+(?<percentage>\d+(?:\.\d+)?%)\s+of\s+(?<size>[~]?[\s\d]*\d+(?:\.\d+)?(?:KiB|MiB|GiB|B))(?:\s+at\s+(?<speed>(\d+(?:\.\d+)?(?:K|M|G)iB/s)|Unknown speed))?(?:\s+ETA\s+(?<eta>([\d:]{2,8}|Unknown ETA)))?(\s+in\s+(?<totalTime>[\d:]{2,8}))?

Demo : https://regex101.com/r/dm1fIB/1

@norkunas
Copy link
Owner

norkunas commented Oct 2, 2023

@UnicodeApocalypse so why not submitting a Pull request? :)

@norkunas
Copy link
Owner

So are is there anyone who is willing to finish this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bugfix onProgress event for yt-dlp not triggering some videos before 100%
4 participants