diff options
Diffstat (limited to 'stream/src/lib.rs')
-rw-r--r-- | stream/src/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/stream/src/lib.rs b/stream/src/lib.rs index ca7578d..00338c1 100644 --- a/stream/src/lib.rs +++ b/stream/src/lib.rs @@ -13,6 +13,7 @@ use anyhow::{anyhow, bail, Context, Result}; use fragment::fragment_stream; use hls::{hls_master_stream, hls_variant_stream}; use jellybase::{ + assetfed::AssetInner, common::{ stream::{StreamFormat, StreamSpec}, user::{PermissionSet, UserPermission}, @@ -73,7 +74,9 @@ pub async fn stream( .ok_or(anyhow!("track does not exist"))? .source { - TrackSource::Local(t) => t.to_owned(), + TrackSource::Local(t) => AssetInner::deser(&t.0)? + .as_local_track() + .ok_or(anyhow!("asset not a track"))?, TrackSource::Remote(_) => bail!("track is not local"), }, ) |