Skip to content
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

Download video also when archived (cli option) #15812

Closed
bas080 opened this issue Mar 10, 2018 · 2 comments
Closed

Download video also when archived (cli option) #15812

bas080 opened this issue Mar 10, 2018 · 2 comments

Comments

@bas080
Copy link

@bas080 bas080 commented Mar 10, 2018

I have not seen this feature in the man pages but it might be a feature already.

Is it possible use the archive option but have it download also when the video has been archived.

My reason for this is because I want to log what I have downloaded but also download if the video is not present.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 10, 2018

Not possible. Such option will break the whole point of download archive. If you want to log - do log not download archive.

@dstftw dstftw closed this Mar 10, 2018
@bas080
Copy link
Author

@bas080 bas080 commented Mar 16, 2018

You have a valid point @dstftw, I came up with the following solution in case someone is interested. I archive and then append the archive to a log file before removing the archive file.

npo-download() {
  local tmp_archive="$(mktemp)"
  local log_file="$HOME/youtube.log"

  youtube-dl --download-archive "$tmp_archive" "$@"

  cat $tmp_archive >> $log_file
  rm $tmp_archive # optional
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.