diff options
author | metamuffin <metamuffin@disroot.org> | 2024-04-13 16:09:36 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-04-13 16:09:36 +0200 |
commit | e503d5af484fb55a07125b3708ba658606e56c5d (patch) | |
tree | 25c0a081cdc651c69b44af88c6ac37c44d416188 /server/src/routes/ui/player.rs | |
parent | 489cd4d833fb106d4a5257532b340969805f3f5c (diff) | |
download | jellything-e503d5af484fb55a07125b3708ba658606e56c5d.tar jellything-e503d5af484fb55a07125b3708ba658606e56c5d.tar.bz2 jellything-e503d5af484fb55a07125b3708ba658606e56c5d.tar.zst |
start native player at time
Diffstat (limited to 'server/src/routes/ui/player.rs')
-rw-r--r-- | server/src/routes/ui/player.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/server/src/routes/ui/player.rs b/server/src/routes/ui/player.rs index 80386ad..69445ed 100644 --- a/server/src/routes/ui/player.rs +++ b/server/src/routes/ui/player.rs @@ -51,7 +51,7 @@ impl PlayerConfig { } } -fn jellynative_url(action: &str, secret: &str, node: &str, session: &str) -> String { +fn jellynative_url(action: &str, seek: f64, secret: &str, node: &str, session: &str) -> String { let protocol = if CONF.tls { "https" } else { "http" }; let host = &CONF.hostname; let stream_url = uri!(r_stream( @@ -61,7 +61,7 @@ fn jellynative_url(action: &str, secret: &str, node: &str, session: &str) -> Str ..Default::default() } )); - format!("jellynative://{action}/{secret}/{session}/{protocol}://{host}{stream_url}",) + format!("jellynative://{action}/{secret}/{session}/{seek}/{protocol}://{host}{stream_url}",) } #[get("/n/<id>/player?<conf..>", rank = 4)] @@ -84,6 +84,7 @@ pub fn r_player<'a>( } Ok(Either::Right(Redirect::temporary(jellynative_url( action, + conf.t.unwrap_or(0.), &sess.user.native_secret, id, &token::create( @@ -97,10 +98,10 @@ pub fn r_player<'a>( match conf.kind.unwrap_or(sess.user.player_preference) { PlayerKind::Browser => (), PlayerKind::Native => { - return native_session("player"); + return native_session("player-v2"); } PlayerKind::NativeFullscreen => { - return native_session("player-fullscreen"); + return native_session("player-fullscreen-v2"); } } |