diff --git a/MyMusicBoxApi/run b/MyMusicBoxApi/run index 27b74d2..114944e 100755 --- a/MyMusicBoxApi/run +++ b/MyMusicBoxApi/run @@ -27,6 +27,9 @@ cd .. cd dev_database sudo docker compose up -d +# give enough time for containers to start +sleep 15s + # run executable cd .. cd MyMusicBoxApi diff --git a/MyMusicBoxApi/service/playlist.go b/MyMusicBoxApi/service/playlist.go index d351407..a2ff3c7 100644 --- a/MyMusicBoxApi/service/playlist.go +++ b/MyMusicBoxApi/service/playlist.go @@ -114,7 +114,7 @@ func downloadPlaylist( for id := range downloadCount { name := names[id] - if canDownload(name) && !existInArchive(archiveFileName, ids[id]) { + if canDownload(name) { childTask, _ := tasklogTable.CreateChildTaskLog(parentTask) diff --git a/MyMusicBoxApi/service/ytdlpHotfix.go b/MyMusicBoxApi/service/ytdlpHotfix.go index b289145..342b07d 100644 --- a/MyMusicBoxApi/service/ytdlpHotfix.go +++ b/MyMusicBoxApi/service/ytdlpHotfix.go @@ -34,9 +34,9 @@ func FlatPlaylistDownload( } proc, _err := os.StartProcess( - "/usr/bin/yt-dlp-mmb", + "/usr/bin/yt-dlp_linux", []string{ - "yt-dlp-mmb", + "yt-dlp_linux", "--force-ipv4", "--no-keep-video", "--skip-download", @@ -48,10 +48,9 @@ func FlatPlaylistDownload( "--print-to-file", "%(playlist_id)s", playlistIdFileName, "--print-to-file", "%(playlist_title)s", playlistTitleFileName, "--ignore-errors", - "--extractor-args=youtube:player_js_variant=tv", fmt.Sprintf("--cookies=%s", cookiesPath), - "--js-runtimes=deno:/home/admin/.deno/bin", - "--remote-components=ejs:npm", + "--js-runtimes=deno:/home/admin/.deno/bin/deno", + "--remote-components=ejs:github", url, }, &os.ProcAttr{ @@ -102,9 +101,9 @@ func FlatSingleDownload( } proc, _err := os.StartProcess( - "/usr/bin/yt-dlp-mmb", + "/usr/bin/yt-dlp_linux", []string{ - "yt-dlp-mmb", + "yt-dlp_linux", "--force-ipv4", "--write-thumbnail", "--extract-audio", @@ -122,10 +121,9 @@ func FlatSingleDownload( "--concurrent-fragments=20", "--ignore-errors", fmt.Sprintf("--download-archive=%s", archiveFileName), - "--extractor-args=youtube:player_js_variant=tv", fmt.Sprintf("--cookies=%s", cookiesPath), - "--js-runtimes=deno:/home/admin/.deno/bin", - "--remote-components=ejs:npm", + "--js-runtimes=deno:/home/admin/.deno/bin/deno", + "--remote-components=ejs:github", url, }, &os.ProcAttr{