Skip to content

Commit 5b6672c

Browse files
authored
Add files via upload
1 parent 246e524 commit 5b6672c

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#Warn
2+
#SingleInstance
3+
#NoEnv
4+
5+
; Initialise variables
6+
Youtube := ""
7+
Spotify := ""
8+
9+
Gui, Add, GroupBox, x22 y340 w430 h90 vMyGroupBox, Batch output
10+
Gui, Add, Edit, ReadOnly x32 y355 w410 h70 vOutput,
11+
12+
Gui, Add, GroupBox, x2 y19 w250 h30 , Youtube
13+
Gui, Add, Edit, x2 y34 w250 h20 vYoutube gYTDLP
14+
15+
Gui, Add, GroupBox, x300 y19 w250 h30 , Spotify
16+
Gui, Add, Edit, x300 y34 w250 h20 vSpotify gSpotYoutube
17+
; Add a button to execute the command
18+
Gui, Add, Button, x32 y435 w100 h30 gRunCmd, Run Command
19+
20+
Gui, Show, h480 w640, YT & Spotify Downloader
21+
Return
22+
23+
; The GUI fields and buttons
24+
YTDLP:
25+
GuiControlGet, Youtube
26+
; Add "yt-dlp.exe" in front of the input text
27+
Cmd := "yt-dlp.exe --paths %userprofile%\Music -f ""bv*[height=1080]+ba/b"" --merge-output-format mp4 " . Youtube
28+
; Update the GroupBox with the combined text
29+
GuiControl,, Output, % Cmd
30+
return
31+
; The GUI fields and buttons
32+
SpotYoutube:
33+
GuiControlGet, Spotify
34+
; Add "spotdl" in front of the input text
35+
Cmd := "spotdl download " Spotify " --output %userprofile%\Music --preload --sponsor-block --threads 16 "
36+
; Update the GroupBox with the combined text
37+
GuiControl,, Output, % Cmd
38+
return
39+
40+
; Function to execute the command in cmd
41+
RunCmd:
42+
GuiControlGet, Cmd, , Output
43+
Run, %ComSpec% /c %Cmd%
44+
return
45+
46+
GuiClose:
47+
ExitApp

0 commit comments

Comments
 (0)