miércoles, 10 de marzo de 2010

Automatically store music loaded into cache

The following script will allow you to automatically move music files from the firefox cache to any directory.
This should be in a single line, and you must edit both the [random folder name] and desired path/to/target to fit your needs:
file --mime-type home/[your username]/.mozilla/firefoz/[random folder name]/Cache/* | grep -i audio | cut -d':' -f1 | xargs -I{} mv {} /path/to/target/


It will identify Audio files regardless their extension (if present) and move them to the directory you specify in the end.

Depending on the page you are using, your cache may or may not be automatically deleted when the audio file is no longer needed. You can avoid that by using Proxomitron, which runs perfectly under Wine. Just install it, load it, and point your firefox to use proxy localhost, port 8080.

One last thing you might want is to point your preferred audio player to automatically scan your target directory, since the files wont have a descriptive name.

No hay comentarios:

Publicar un comentario