From 80e545d06c4a0f0841d4b40e3aff479ef8d864f9 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Fri, 22 Dec 2023 15:16:58 +0100 Subject: rework import system pt. 5: local import and playback working again --- stream/src/webvtt.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'stream/src/webvtt.rs') diff --git a/stream/src/webvtt.rs b/stream/src/webvtt.rs index faf0cd3..b1eed2f 100644 --- a/stream/src/webvtt.rs +++ b/stream/src/webvtt.rs @@ -12,7 +12,7 @@ use tokio::io::{AsyncWriteExt, DuplexStream}; pub async fn webvtt_stream( node: Node, - track_sources: Vec, + local_tracks: Vec, spec: StreamSpec, mut b: DuplexStream, ) -> Result<()> { @@ -21,10 +21,7 @@ pub async fn webvtt_stream( // TODO should use snippets too? big films take too long... let tracki = *spec.tracks.get(0).ok_or(anyhow!("no track selected"))?; - let local_track = track_sources - .get(tracki) - .ok_or(anyhow!("track does not exist"))? - .clone(); + let local_track = local_tracks.get(0).ok_or(anyhow!("no tracks"))?.clone(); let track = &node.public.media.unwrap().tracks[tracki]; match track.codec.as_str() { -- cgit v1.2.3-70-g09d2