Skip to content

best way to save what you love

api/youtube: add missing else to adaptive codec fallback

wukko3fe2bd3b7c04
diff --git a/api/src/processing/services/youtube.js b/api/src/processing/services/youtube.js
index e1b11a62..ae96ea0d 100644
--- a/api/src/processing/services/youtube.js
+++ b/api/src/processing/services/youtube.js
@@ -344,7 +344,7 @@ export default async function(o) {
if (noBestMedia()) {
if (codec === "av1") codec = "vp9";
- if (codec === "vp9") codec = "av1";
+ else if (codec === "vp9") codec = "av1";
// if there's no higher quality fallback, then use h264
if (noBestMedia()) codec = "h264";