Stack Johan
Stack Johan

Reputation: 379

Why don't variables work for saving youtube-dl archive files?

When saving files from Youtube playlists , I'm about to use variables such as %(playlist_title)s to create save directories for the videos.

However, I don't understand why I can't use the same variable to save an archive file.

Like so:

Videos\Online Videos\Comics Explained\%(playlist_title)s\%(playlist_title)s Archive.txt

Upvotes: 0

Views: 306

Answers (1)

anon
anon

Reputation:

In general, the output template parameters (e.g. the video description) are calculated from the result of the extraction. When I wrote the --download-archive code, the main design goal was to be able to skip the time-consuming extraction whenever possible.

In this case, playlist_title is one of the few fields that could be available, but adding template parameter substitution would likely be quite tricky in the general case. Remember that all features start at -100 points.

However, the download archive is small enough that it should be perfectly fine to use just one common archive for all playlists. Simply pass in

--download-archive "Videos/Online Videos/Comics Explained/archive.txt"

Upvotes: 1

Related Questions