diff options
Diffstat (limited to 'stream/src')
-rw-r--r-- | stream/src/jhls.rs | 19 |
1 files changed, 12 insertions, 7 deletions
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::<Vec<_>>() }) |