aboutsummaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-04-14 13:41:42 +0200
committermetamuffin <metamuffin@disroot.org>2025-04-14 13:41:42 +0200
commita3afc2756a52f7d6fedc928b97c8ff3eb1ade338 (patch)
tree9bb043975a6b92e45bbc2f09e19641f1109950b1 /server/src
parent48a57a52d85d387efe122fb4d9fb113f577a0a98 (diff)
downloadjellything-a3afc2756a52f7d6fedc928b97c8ff3eb1ade338.tar
jellything-a3afc2756a52f7d6fedc928b97c8ff3eb1ade338.tar.bz2
jellything-a3afc2756a52f7d6fedc928b97c8ff3eb1ade338.tar.zst
lots of rewriting and removing dumb code
Diffstat (limited to 'server/src')
-rw-r--r--server/src/routes/ui/player.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/server/src/routes/ui/player.rs b/server/src/routes/ui/player.rs
index aa567ab..2cc2dd4 100644
--- a/server/src/routes/ui/player.rs
+++ b/server/src/routes/ui/player.rs
@@ -15,9 +15,10 @@ use crate::{
uri,
};
use anyhow::anyhow;
-use jellybase::{permission::PermissionSetExt, CONF};
+use jellybase::CONF;
use jellycommon::{
- user::{PermissionSet, PlayerKind, UserPermission},
+ stream::{StreamContainer, StreamSpec},
+ user::{PermissionSet, PlayerKind},
Node, NodeID, SourceTrackKind, TrackID,
};
use markup::DynRender;
@@ -45,15 +46,14 @@ impl PlayerConfig {
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 = "";
- // TODO
- // uri!(r_stream(
- // node,
- // StreamSpec {
- // format: StreamFormat::HlsMaster,
- // ..Default::default()
- // }
- // ));
+ let stream_url = format!(
+ "/n/{node}/stream{}",
+ StreamSpec::HlsMultiVariant {
+ segment: 0,
+ container: StreamContainer::Matroska
+ }
+ .to_query()
+ );
format!("jellynative://{action}/{secret}/{session}/{seek}/{protocol}://{host}{stream_url}",)
}