Skip to content

Archive

Tzahi12345 edited this page Jun 24, 2022 · 2 revisions

What?

youtube-dl's archive feature allows you to skip downloading already-downloaded videos.

We use the --download-archive <archive path> arg, where we modify depending on how the video is being downloaded. We keep separate archives because different users shouldn't use the same archive (otherwise they could not download the same video).

The following table summarizes where we store the archive:

Single-user mode Multi-user mode
One-off download appdata/archives users/<username>/<type>/archives
Subscription download subscriptions/archives/<sub name> users/<username>/subscriptions/archives/<sub name>

In each folder you can find 3 types of text files:

  • archive_<type>.txt
    • Running list of downloaded files
  • blacklist_<type>.txt
    • "Blacklisted" videos go here, where they are removed from the archive_<type>.txt but inserted into here. This allows you to keep a clean archive but still avoid redownloading a video (most useful for subscriptions)
  • merged_<type>.txt
    • This file is autogenerated, and simply a combination of the archive and blacklist

Why?

There's a few reasons why you may want to use the archive.

If you delete a subscription video without archiving functionality, that video will be downloaded again as long as that video is within the time scope of the subscription.

This may also be useful if you primarily use YoutubeDL-Material as a downloader rather than a library.