diff options
| author | RblSb <msrblsb@gmail.com> | 2025-08-14 02:53:59 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2025-08-15 07:03:17 +0300 |
| commit | e01ed5f5431551f8b159b4fd491c670efeca57ee (patch) | |
| tree | 78737545fd27cce482cbfdd059aa72fe52ecc515 /src/server/cache/YoutubeCache.hx | |
| parent | 6b97957566fa8a01b7fa37fb735de19ee442c297 (diff) | |
Prefer original audio tracks
Diffstat (limited to 'src/server/cache/YoutubeCache.hx')
| -rw-r--r-- | src/server/cache/YoutubeCache.hx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/server/cache/YoutubeCache.hx b/src/server/cache/YoutubeCache.hx index cb3d954..5b94bbb 100644 --- a/src/server/cache/YoutubeCache.hx +++ b/src/server/cache/YoutubeCache.hx @@ -85,7 +85,11 @@ class YoutubeCache { function onGetInfo(info:VideoInfo):Void { trace('Get info with ${info.formats.length} formats'); - var aformats = info.formats.filter(f -> f.acodec != "none" && f.vcodec == "none"); + var aformats = info.formats.filter(f -> f.acodec != "none" + && f.vcodec == "none" && f.format_note?.contains("original")); + if (aformats.length == 0) { + aformats = info.formats.filter(f -> f.acodec != "none" && f.vcodec == "none"); + } if (aformats.length == 0) { aformats = info.formats.filter(f -> f.acodec != "none"); } @@ -136,6 +140,7 @@ class YoutubeCache { output: '${cache.cacheDir}/$inVideoName', remuxVideo: "mp4", cookies: useCookies ? getCookiesPathOrNull() : null, + forceIpv4: true, onProgress: p -> { final isFinished = p.status == "finished"; var ratio = if (isFinished) { |
