yt-dlp / yt-dlp

A feature-rich command-line audio/video downloader
https://discord.gg/H5MNcFW63r
The Unlicense
86.98k stars 6.78k forks source link

Template prefix syntax in readme #9603

Open KAMKillJoy opened 7 months ago

KAMKillJoy commented 7 months ago

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

Checklist

Please make sure the question is worded well enough to be understood

Manual says:

# Prefix playlist index with " - " separator, but only if it is available
$ yt-dlp -o "%(playlist_index&{} - |)s%(title)s.%(ext)s" BaW_jenozKc "https://www.youtube.com/user/TheLinuxFoundation/playlists"

But is it a prefix? I guess prefix is $ yt-dlp -o "%(playlist_index& - {}|)s%(title)s.%(ext)s" BaW_jenozKc "https://www.youtube.com/user/TheLinuxFoundation/playlists"

Int trying to look smart, I'm really curious. I've tried to make prefix with this example and it took some time to figure out whats wrong.

Provide verbose output that clearly demonstrates the problem

Complete Verbose Output

No response

bashonly commented 7 months ago

You're right, should be "suffix"

KAMKillJoy commented 7 months ago

Ok, tnx. I can sleep now.

bashonly commented 7 months ago

Gonna keep this open 'til it's fixed. Thanks

pukkandan commented 7 months ago

It was supposed to be Prefix with playlist index and " - " separator. But something like Prefix filename with playlist index using " - " seperator would be clearer?

KAMKillJoy commented 7 months ago

I guess the whole point of this is how to place something (e.g. string) near "special sequence" like %(NAME)s. This is the only place in manual where this scenario is covered. So, I think it is more about suffix of (playlist_index)s than prefix of filename. I had a really hard time figuring out how to add space before playlist title only if there is one. (playlist_title& {}|)s If you use just " (playlist_title)s" you will have extra spaces if there is no playlist title.