From 059b0ebc272f89a126d4dbcec3f0e04a12e175a8 Mon Sep 17 00:00:00 2001 From: Ivan Date: Sat, 20 Feb 2021 21:01:24 +0100 Subject: [PATCH] fix transcoding cache - do not cache remuxed files --- src/services/transcode/mod.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/services/transcode/mod.rs b/src/services/transcode/mod.rs index b8428b77..568d2c8c 100644 --- a/src/services/transcode/mod.rs +++ b/src/services/transcode/mod.rs @@ -326,8 +326,12 @@ impl Transcoder { use std::io; let is_transcoded = matches!(file, AudioFilePath::Transcoded(_)); - if is_transcoded || seek.is_some() || get_config().transcoding.cache.disabled { - debug!("Shoud not add to cache as is already transcoded, seeking or cache is disabled"); + if is_transcoded + || seek.is_some() + || quality == QualityLevel::Passthrough + || get_config().transcoding.cache.disabled + { + debug!("Shoud not add to cache as is already transcoded, seeking, remuxing or cache is disabled"); return Box::pin(future::ready( self.transcode_inner(file, seek, span, counter) .map(|(stream, f)| {