Add quable flag to library children
This commit is contained in:
parent
25e2e3ff83
commit
258d45a29e
|
|
@ -46,8 +46,12 @@ impl LibraryNode {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl LibraryNodeChild {
|
impl LibraryNodeChild {
|
||||||
pub fn new(uuid: String, title: String) -> Self {
|
pub fn new(uuid: String, title: String, is_queable: bool) -> Self {
|
||||||
Self { uuid, title }
|
Self {
|
||||||
|
uuid,
|
||||||
|
title,
|
||||||
|
is_queable,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ impl ProviderClient for ProviderOrchestrator {
|
||||||
#[instrument(skip(self))]
|
#[instrument(skip(self))]
|
||||||
fn get_lib_root(&self) -> LibraryNode {
|
fn get_lib_root(&self) -> LibraryNode {
|
||||||
let mut root_node = LibraryNode::new();
|
let mut root_node = LibraryNode::new();
|
||||||
let child = LibraryNodeChild::new("node:tidal".to_owned(), "tidal".to_owned());
|
let child = LibraryNodeChild::new("node:tidal".to_owned(), "tidal".to_owned(), false);
|
||||||
root_node.children.push(child);
|
root_node.children.push(child);
|
||||||
root_node
|
root_node
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,7 @@ impl crabidy_core::ProviderClient for Client {
|
||||||
let children = vec![crabidy_core::proto::crabidy::LibraryNodeChild::new(
|
let children = vec![crabidy_core::proto::crabidy::LibraryNodeChild::new(
|
||||||
"node:userplaylists".to_string(),
|
"node:userplaylists".to_string(),
|
||||||
"playlists".to_string(),
|
"playlists".to_string(),
|
||||||
|
false,
|
||||||
)];
|
)];
|
||||||
crabidy_core::proto::crabidy::LibraryNode {
|
crabidy_core::proto::crabidy::LibraryNode {
|
||||||
uuid: "node:tidal".to_string(),
|
uuid: "node:tidal".to_string(),
|
||||||
|
|
@ -118,6 +119,7 @@ impl crabidy_core::ProviderClient for Client {
|
||||||
let child = crabidy_core::proto::crabidy::LibraryNodeChild::new(
|
let child = crabidy_core::proto::crabidy::LibraryNodeChild::new(
|
||||||
format!("node:playlist:{}", playlist.playlist.uuid),
|
format!("node:playlist:{}", playlist.playlist.uuid),
|
||||||
playlist.playlist.title,
|
playlist.playlist.title,
|
||||||
|
true,
|
||||||
);
|
);
|
||||||
node.children.push(child);
|
node.children.push(child);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue