sethleedy / GRC-SECURITY-NOW-PODCAST-DOWNLOAD-SCRIPT

Purpose of this BASH script is to allow easy downloading of Security Now (GRC.Com/SecurityNow) podcasts and files related to it.
27 stars 4 forks source link

Only download un-downloaded episodes #14

Open jroedel opened 6 years ago

jroedel commented 6 years ago

First off, great script!

It would be very helpful for me if this would only download files that weren't already in the download folder. Is that possible? Maybe I'm missing something.

Use case: I'm writing a script to download high quality audio and speed up the audio tempo 2x. I don't necessarily download every week and would love to say -ahq -ep 640:latest and have it bring me up to date.

sethleedy commented 6 years ago

I'll check into it. I had something like that already in the code. Guess it needs fixing. Thank you for bringing this to my attention :)

sethleedy commented 6 years ago

Well, I can modify the script further. As of right now, the wget program at the heart of the script, downloads the file with the '-N' option. This means it will check the date/time stamp and compare it to the servers. If different, it will download a new copy, else it gets skipped. Example if the '-qb' is removed,

HTTP request sent, awaiting response... 304 Not Modified
File ‘sn0650.mp3’ not modified on server. Omitting download.

I can add detection to see if the file exists. But in doing so, I cannot check for updates from Steve(corrections to transcripts or bad formatted files).

Unless needed, I intend to leave it as is. It is making a connection for each file, but not downloading them if they already exist.