1

I'm not completely unfamiliar with the command line but this task is above my understanding.

My goal is to be able to add YouTube vids to a single playlist and have my living room pc download the vids automatically on a schedule, say once or twice a day. I'd like it to ignore duplicates, so it only downloads the vids added since the last time it ran the download. Basically I'm lazy.

Any help appreciated!

I'm on Ubuntu 18.04.2 LTS

1 Answer 1

1

Assuming you are only downloading from a specific playlist/channel, youtube-dl already has options that can be used to only download videos it hasn't already downloaded before.

$ youtube-dl --download-archive <filename>.txt http://youtube.com/...

This will record the files it has downloaded already and avoid re-downloading them in the future.

As for downloading it on a schedule, you can place all of your youtube-dl commands into a BASH script and have it run on a cronjob. Basically, this allows you to schedule when to run a script (e.g. every day at 2am). The file to look at is /etc/crontab, where you would add a line similar to this:

0 2 * * * /bin/bash /home/username/daily_youtube_download.sh

Basically, this would run a script called "daily_youtube_download.sh" at minute 0, hour 2, every day of the month, every month of the year, every day of the week (i.e., 2am everyday).

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .