Ubuntu: youtube-dl delete files that are no longer in a playlist


I have a watch later playlist on YouTube. I both add videos to it and remove watched ones constantly. I use

youtube-dl <playlist_url>  

to download the entire playlist into a current folder. The idea is to keep this folder in sync with the playlist, in other words to delete videos from the local folder that are no longer in the playlist. Is there a simple way to do it?


Rather than writing it yourself, you can use this script to keep a folder in sync with a playlist:


To set it up you run:

yps.py --init <playlist url> --dir <folder>  

To sync you run:

yps.py --sync <folder>  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »