diff options
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) { |
