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

Cache the audio and video #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tpenguinltg
Copy link

@tpenguinltg tpenguinltg commented Jul 14, 2016

Warning: This was only tested on Linux.

On Linux, the cached copies are stored in $XDG_CACHE_HOME (or its
default, ~/.cache) according to the XDG specification.
On Mac, the cache dir is ~/Library/Caches.
On Windows, the cache dir remains /tmp.
In all cases, a new subfolder under the cache dir named "astley" is made
and the files are stored there.

The integrity of the cached copies is verified using MD5 hashes.

Mac has md5 and Linux and Cygwin should have md5sum as part of
coreutils. This catches the case where the file was only partially
downloaded, and if so, it will refetch the file.

Resolves #14

On Linux, the cached copies are stored in $XDG_CACHE_HOME (or its
default, ~/.cache) according to the XDG specification.
On Mac, the cache dir is ~/Library/Caches.
On Windows, the cache dir remains /tmp.
In all cases, a new subfolder under the cache dir named "astley" is made
and the files are stored there.

The integrity of the cached copies is verified using MD5 hashes.

Mac has md5 and Linux and Cygwin should have md5sum as part of
coreutils. This catches the case where the file was only partially
downloaded, and if so, it will refetch the file.
@tpenguinltg
Copy link
Author

Re-fetching could be avoided if curl's -C flag or wget's -c flag were used, but I don't know how to do that if we're piping the data to stdout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant