question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[bug] `-N` skipping fragments?

See original GitHub issue

Sometimes file will fail to download (or merge, I’m really not sure since I haven’t seen any errors, though maybe I just missed them). This happened before I started using --path temp:D:\Temp\ but since using that, temporary files are getting left behind there for files that didn’t completely download (in this case fragments 377-745 and respective .part and .ytdl files. I understand the default is to resume downloads with previously downloaded fragments but it should still clear up all the fragments for that respective download on completion. The skipping of download might not be a bug but I was curious as to what --fragment-retries “infinite” really does since I have it set, I assume it is regarding that fragment as unavailable and by default getting skipped but I want it to retry until it finds it instead (at least for a minute).

Command (temporary switched back to batch files since the frontend I was using didn’t like some stuff):

yt-dlp -a "CR todownload - valarian.txt" -o "crunchyroll.com\%%(series)s - S%%(season_number)sE%%(episode_number)s - %%(episode)s - %%(epoch)s.%%(ext)s" --embed-subs --sub-lang en --cookies cookies-crunchyroll-com.txt --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0" --fragment-retries "infinite" -N 3 --no-mtime --download-archive archive.txt --path temp:D:\Temp\

_Originally posted by @Jules-A in https://github.com/yt-dlp/yt-dlp/issues/359#issuecomment-853906485_

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
pukkandancommented, Jun 12, 2021

I need some way to check if mytitle contains a certain string so it can use the fallback but I’m hopeless at this… -o “%%(extractor)s%%(mytitle|title)s - %%(myindex)s.%%(ext)s” --parse-metadata “webpage_url:#%%(myindex)s” --parse-metadata “%%(series)s - S%%(season_number)sE%%(episode_number)s:%%(mytitle)s”

You were on the right track. But there are 2 issues

  1. Even if the fields are absent, mytitle will still be popylated with something like NA - SNAENA
  2. The right side of | is treated literally, not as the name of a field

This is what you want:

$ yt-dlp "https://www.zee5.com/movies/details/krishna-the-birth/0-0-63098#50" "https://zee5.com/tvshows/details/krishna-balram/0-6-1871/episode-1-the-test-of-bramha/0-1-233402#20" -O "%(extractor)s\%(title)s - %(myindex)s.%(ext)s" --parse-metadata "webpage_url:#%(myindex)s" --parse-metadata "%(series)s - S%(season_number)sE%(episode_number)s:^(?P<title>.+ - S\d+E\d+)$" --output-na-placeholder ""
WARNING: Could not interpret video %(series)s - S%(season_number)sE%(episode_number)s as "^(?P<title>.+ - S\d+E\d+)$"
Zee5\Krishna - The Birth - 50.mp4
Zee5\Krishna Balram - S1E1 - 20.mp4

This will use %(series)s - S%(season_number)sE%(episode_number)s if all 3 of these fields are present, else it will use %(title)s. ofc, change -O to -o and escape the % as needed

0reactions
Jules-Acommented, Jun 12, 2021

I see, thanks a tonne! Still can’t seem to wrap my head around Python regex (regex in general gives me headaches so I usually try to avoid it even in other languages…).

Read more comments on GitHub >

github_iconTop Results From Across the Web

DevTools shouldn't skip over keyed Fragments in the tree ...
We filter out fragments because they tend to be useless. But this one is important! Keys are crucial and we should show anything...
Read more >
Bungie Disables Fragment Due To Bug! + More ... - YouTube
Bungie Disables Fragment Due To Bug ! + More Bugs In Season 17! ... Trap Planted By The Witness and Connection To The...
Read more >
android - Skip some fragments onBackPressed - Stack Overflow
However, in my current code, my problem is that even though it goes back to Frag1, Frag3 does not disappear from the screen....
Read more >
Fragment of the Firelands Quest Can't Be Completed - Battle.net
Fire elemental segment of the Fragment of the Firelands quest becomes unresponsive. Unable to cast any of the fire elemental's abilities during the...
Read more >
Genshin Impact - Chi Of Guyun Guide, Bug Fix, And Solution
Now double back counterclockwise, skip one statue and interact with the one next to number two. Genshin-Impact-Chi-Guyun-third-fragment-statue- ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found