-
Notifications
You must be signed in to change notification settings - Fork 158
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
base: master
Are you sure you want to change the base?
Conversation
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)
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.
Thank you :) you should add some tests with new output of yt-dlp progress to prove that the callback is called now properly ;)
src/YoutubeDl.php
Outdated
@@ -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}))?#'; |
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.
Why removing i
modifier?
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.
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)
Put back /i modifier on regex by a mislead typo. |
Fix Fatal error on redo Finished Downloads
Fix trigger onProgress [~] another variations
CS Fix
@unilogica are you willing to add the test? :) |
Sure. I will do that in this Saturday |
yt-dlp is up to date ([email protected]) What is wrong for me? |
New yt-dlp update, new regex for anyone having this issue again. |
@UnicodeApocalypse so why not submitting a Pull request? :) |
So are is there anyone who is willing to finish this? |
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