aboutsummaryrefslogtreecommitdiff
path: root/server/src/routes/ui/player.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/routes/ui/player.rs')
-rw-r--r--server/src/routes/ui/player.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/server/src/routes/ui/player.rs b/server/src/routes/ui/player.rs
index e3c5cb2..62f014c 100644
--- a/server/src/routes/ui/player.rs
+++ b/server/src/routes/ui/player.rs
@@ -5,7 +5,7 @@
*/
use super::{account::session::Session, layout::LayoutPage};
use crate::{
- database::Database,
+ database::DataAcid,
routes::{
stream::rocket_uri_macro_r_stream,
ui::{
@@ -17,6 +17,7 @@ use crate::{
uri,
};
use anyhow::anyhow;
+use jellybase::database::{TableExt, T_NODE};
use jellycommon::{
stream::{StreamFormat, StreamSpec},
Node, SourceTrackKind, TrackID,
@@ -44,14 +45,11 @@ impl PlayerConfig {
#[get("/n/<id>/player?<conf..>", rank = 4)]
pub fn r_player<'a>(
_sess: Session,
- db: &'a State<Database>,
+ db: &'a State<DataAcid>,
id: &'a str,
conf: PlayerConfig,
) -> MyResult<DynLayoutPage<'a>> {
- let item = db
- .node
- .get(&id.to_string())?
- .ok_or(anyhow!("node does not exist"))?;
+ let item = T_NODE.get(db, id)?.ok_or(anyhow!("node does not exist"))?;
let spec = StreamSpec {
tracks: None