Skip to content

Instantly share code, notes, and snippets.

@pynappo
Last active April 17, 2022 10:58

Revisions

  1. pynappo revised this gist Apr 17, 2022. No changes.
  2. pynappo revised this gist Apr 17, 2022. No changes.
  3. pynappo revised this gist Apr 17, 2022. No changes.
  4. pynappo revised this gist Apr 17, 2022. No changes.
  5. pynappo revised this gist Apr 17, 2022. 1 changed file with 23 additions and 1 deletion.
    24 changes: 23 additions & 1 deletion youtube-sync.ps1
    Original file line number Diff line number Diff line change
    @@ -1 +1,23 @@
    ‎‎​
    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"
    }
    }
  6. pynappo created this gist Apr 17, 2022.
    1 change: 1 addition & 0 deletions youtube-sync.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    ‎‎​