Skip to content

Instantly share code, notes, and snippets.

@arinoki
arinoki / yt-dlp-parallel-audio-playlist.ps1
Last active May 31, 2022 20:13
yt-dlp parallel download of audio playlist [powershell 7]
# add to ur Powershell profile
# needed to be installed/be in path - yt-dlp, ffmpeg, aria2, libwebp. maybe i forgot smth.
# adjust music path, also u can adjust number of parallel processes by editing "-ThrottleLimit" variable
Function parallel-music-playlist {
param (
$url_to_playlist
)
$playlist_name = yt-dlp -i -o "%(playlist)s" --get-filename --skip-download --playlist-end 1 $url_to_playlist
$download_folder = "C:\!!Downloads\Music\!!youtube\$playlist_name\"
Just inctruction how to make shortcut to any app (but for example i will use King's Raid game).
First - create text file with extension "ps1" - so for example "KingsRaid.ps1" with this text. Make sure to change path on first line
so it will point to the folder where ur LDPlayer installed. And, if for some reason u wanna use it for second, third, etc copy of LDPlayer u just need to change "index" to correct one. In coding first number is 0, so second - 1, and so on - keep it in mind.
cd 'C:\Games\LDPlayer_v3'
.\ldconsole.exe launch --index 0
while(!((.\ldconsole.exe isrunning --index 0) | Select-String "running")) {start-sleep 2}
.\ldconsole.exe runapp --index 0 --packagename com.vespainteractive.KingsRaid