aboutsummaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/HttpServer.hx1
-rw-r--r--src/server/cache/YoutubeCache.hx7
2 files changed, 7 insertions, 1 deletions
diff --git a/src/server/HttpServer.hx b/src/server/HttpServer.hx
index 4f283a4..f6fb27f 100644
--- a/src/server/HttpServer.hx
+++ b/src/server/HttpServer.hx
@@ -391,6 +391,7 @@ class HttpServer {
final matchVarString = ~/\${([A-z_]+)}/g;
function localizeHtml(data:String, lang:String):String {
+ if (!data.contains("<!-- localization-template -->")) return data;
if (lang != null && matchLang.match(lang)) {
lang = matchLang.matched(0);
} else lang = "en";
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) {
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage