Last active
April 17, 2022 10:58
-
-
Save pynappo/cacc17922b16a6a93ab5d5b12c441daa to your computer and use it in GitHub Desktop.
WIP (not functional) PowerShell script for syncing a youtube playlist to the containing folder with youtube-dl.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param ( | |
[Parameter(Mandatory, HelpMessage = "Please provide a youtube-dl compatible link")] | |
[string]$URL | |
) | |
Param ( | |
[Parameter(Mandatory, HelpMessage = "Please provide a youtube-dl compatible link")] | |
[string]$URL | |
) | |
Param ( | |
[Parameter(Mandatory, HelpMessage = "Please provide a youtube-dl compatible link")] | |
[string]$URL | |
) | |
function Download { | |
if(Get-Command yt-dlp) { yt-dlp $URL --download-archive "archive.txt" | |
elseif (Get-Command youtube-dl) { | |
"yt-dlp not found, using youtube-dl instead" | |
youtube-dl | |
} | |
else{ | |
Write-Error "Neither yt-dlp nor youtube-dl" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment