aboutsummaryrefslogtreecommitdiff
path: root/server/src/routes/external_compat.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/routes/external_compat.rs')
-rw-r--r--server/src/routes/external_compat.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/src/routes/external_compat.rs b/server/src/routes/external_compat.rs
index 7babfa5..eda3537 100644
--- a/server/src/routes/external_compat.rs
+++ b/server/src/routes/external_compat.rs
@@ -5,6 +5,7 @@
*/
use super::ui::{account::session::Session, error::MyResult};
use crate::routes::ui::node::rocket_uri_macro_r_library_node;
+use crate::routes::ui::player::{rocket_uri_macro_r_player, PlayerConfig};
use anyhow::anyhow;
use jellybase::database::Database;
use rocket::{get, response::Redirect, State};
@@ -18,7 +19,10 @@ pub fn r_ext_youtube_watch(_session: Session, db: &State<Database>, v: &str) ->
Err(anyhow!("element not found"))?
};
let node = db.get_node(id)?.ok_or(anyhow!("node missing"))?;
- Ok(Redirect::to(rocket::uri!(r_library_node(&node.slug))))
+ Ok(Redirect::to(rocket::uri!(r_player(
+ &node.slug,
+ PlayerConfig::default()
+ ))))
}
#[get("/channel/<id>")]