Skip to content

Commit

Permalink
fix transcoding cache
Browse files Browse the repository at this point in the history
- do not cache remuxed files
  • Loading branch information
izderadicka committed Feb 20, 2021
1 parent 8a627bb commit 059b0eb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/services/transcode/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)| {
Expand Down

0 comments on commit 059b0eb

Please sign in to comment.