diff options
author | metamuffin <metamuffin@disroot.org> | 2023-12-22 15:16:58 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-12-22 15:17:23 +0100 |
commit | 80e545d06c4a0f0841d4b40e3aff479ef8d864f9 (patch) | |
tree | 9a555ea9404f45fb7ebf617ebdfb1f8248332e05 /stream/src/webvtt.rs | |
parent | c644f3b2f7b93cba2c903fa2a5e30ea80d86ef13 (diff) | |
download | jellything-80e545d06c4a0f0841d4b40e3aff479ef8d864f9.tar jellything-80e545d06c4a0f0841d4b40e3aff479ef8d864f9.tar.bz2 jellything-80e545d06c4a0f0841d4b40e3aff479ef8d864f9.tar.zst |
rework import system pt. 5: local import and playback working again
Diffstat (limited to 'stream/src/webvtt.rs')
-rw-r--r-- | stream/src/webvtt.rs | 7 |
1 files changed, 2 insertions, 5 deletions
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<LocalTrack>, + local_tracks: Vec<LocalTrack>, 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() { |