Skip to content

Commit e0dcd1f

Browse files
authored
Fix/yt dlp ejs (#96)
* Fixes before weekend * why not
1 parent 915c139 commit e0dcd1f

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

MyMusicBoxApi/run

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ cd ..
2727
cd dev_database
2828
sudo docker compose up -d
2929

30+
# give enough time for containers to start
31+
sleep 15s
32+
3033
# run executable
3134
cd ..
3235
cd MyMusicBoxApi

MyMusicBoxApi/service/playlist.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func downloadPlaylist(
114114

115115
for id := range downloadCount {
116116
name := names[id]
117-
if canDownload(name) && !existInArchive(archiveFileName, ids[id]) {
117+
if canDownload(name) {
118118

119119
childTask, _ := tasklogTable.CreateChildTaskLog(parentTask)
120120

MyMusicBoxApi/service/ytdlpHotfix.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ func FlatPlaylistDownload(
3434
}
3535

3636
proc, _err := os.StartProcess(
37-
"/usr/bin/yt-dlp-mmb",
37+
"/usr/bin/yt-dlp_linux",
3838
[]string{
39-
"yt-dlp-mmb",
39+
"yt-dlp_linux",
4040
"--force-ipv4",
4141
"--no-keep-video",
4242
"--skip-download",
@@ -48,10 +48,9 @@ func FlatPlaylistDownload(
4848
"--print-to-file", "%(playlist_id)s", playlistIdFileName,
4949
"--print-to-file", "%(playlist_title)s", playlistTitleFileName,
5050
"--ignore-errors",
51-
"--extractor-args=youtube:player_js_variant=tv",
5251
fmt.Sprintf("--cookies=%s", cookiesPath),
53-
"--js-runtimes=deno:/home/admin/.deno/bin",
54-
"--remote-components=ejs:npm",
52+
"--js-runtimes=deno:/home/admin/.deno/bin/deno",
53+
"--remote-components=ejs:github",
5554
url,
5655
},
5756
&os.ProcAttr{
@@ -102,9 +101,9 @@ func FlatSingleDownload(
102101
}
103102

104103
proc, _err := os.StartProcess(
105-
"/usr/bin/yt-dlp-mmb",
104+
"/usr/bin/yt-dlp_linux",
106105
[]string{
107-
"yt-dlp-mmb",
106+
"yt-dlp_linux",
108107
"--force-ipv4",
109108
"--write-thumbnail",
110109
"--extract-audio",
@@ -122,10 +121,9 @@ func FlatSingleDownload(
122121
"--concurrent-fragments=20",
123122
"--ignore-errors",
124123
fmt.Sprintf("--download-archive=%s", archiveFileName),
125-
"--extractor-args=youtube:player_js_variant=tv",
126124
fmt.Sprintf("--cookies=%s", cookiesPath),
127-
"--js-runtimes=deno:/home/admin/.deno/bin",
128-
"--remote-components=ejs:npm",
125+
"--js-runtimes=deno:/home/admin/.deno/bin/deno",
126+
"--remote-components=ejs:github",
129127
url,
130128
},
131129
&os.ProcAttr{

0 commit comments

Comments
 (0)