From c5a5c8694dd8bcb4fdedb783e8002cd235b4f041 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 2 Oct 2023 08:25:50 +0200 Subject: exclude subtitles in jhls because they break it --- stream/src/jhls.rs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'stream') diff --git a/stream/src/jhls.rs b/stream/src/jhls.rs index 4488dac..d528c06 100644 --- a/stream/src/jhls.rs +++ b/stream/src/jhls.rs @@ -19,17 +19,22 @@ pub async fn jhls_stream( .tracks .iter() .enumerate() - .map(|(i, t)| { - let segments = jellyremuxer::snippet::snippet_index( + .filter_map(|(i, t)| { + if matches!(t.kind, jellycommon::SourceTrackKind::Subtitles) { + return None; + } + match jellyremuxer::snippet::snippet_index( &CONF.library_path, &node.public, &track_sources, i, - )?; - Ok::<_, anyhow::Error>(JhlsTrack { - info: t.to_owned(), - segments, - }) + ) { + Ok(segments) => Some(Ok::<_, anyhow::Error>(JhlsTrack { + info: t.to_owned(), + segments, + })), + Err(e) => Some(Err(e)), + } }) .try_collect::>() }) -- cgit v1.2.3-70-g09d2