mirror of
https://github.com/tsirysndr/music-player.git
synced 2026-01-08 20:58:07 -05:00
chore(bazel): fix bazel build issue
This commit is contained in:
1
BUILD
1
BUILD
@@ -31,6 +31,7 @@ rust_binary(
|
||||
],
|
||||
deps = [
|
||||
"//addons:music_player_addons",
|
||||
"//audio:music_player_audio",
|
||||
"//client:music_player_client",
|
||||
"//discovery:music_player_discovery",
|
||||
"//entity:music_player_entity",
|
||||
|
||||
1031
Cargo.lock
generated
1031
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
11
WORKSPACE
11
WORKSPACE
@@ -145,17 +145,6 @@ load("@rules_rust//crate_universe:defs.bzl", "crate", "crates_repository", "rend
|
||||
crates_repository(
|
||||
name = "crate_index",
|
||||
annotations = {
|
||||
"curl-sys": [crate.annotation(
|
||||
gen_build_script = False,
|
||||
data = [
|
||||
"@curl.dev//:curl",
|
||||
"@libnghttp2.dev//:libnghttp2",
|
||||
],
|
||||
deps = [
|
||||
"@curl.dev//:curl",
|
||||
"@libnghttp2.dev//:libnghttp2",
|
||||
],
|
||||
)],
|
||||
"rust-embed": [crate.annotation(
|
||||
crate_features = ["debug-embed", "actix"]
|
||||
)]
|
||||
|
||||
@@ -6,8 +6,11 @@ load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||
rust_library(
|
||||
name = "music_player_addons",
|
||||
srcs = [
|
||||
"src/airplay.rs",
|
||||
"src/chromecast.rs",
|
||||
"src/datpiff.rs",
|
||||
"src/deezer.rs",
|
||||
"src/dlna.rs",
|
||||
"src/genius.rs",
|
||||
"src/kodi.rs",
|
||||
"src/lastfm.rs",
|
||||
@@ -20,6 +23,9 @@ rust_library(
|
||||
deps = [
|
||||
"//client:music_player_client",
|
||||
"//types:music_player_types",
|
||||
"@crate_index//:upnp-client",
|
||||
"@crate_index//:local-ip-addr",
|
||||
"@crate_index//:rust_cast",
|
||||
] + all_crate_deps(),
|
||||
proc_macro_deps = [
|
||||
"@crate_index//:async-trait",
|
||||
|
||||
@@ -25,4 +25,4 @@ jsonrpsee = { version = "0.16.2", features = ["jsonrpsee-ws-client", "jsonrpsee-
|
||||
url = "2.3.1"
|
||||
md5 = "0.7.0"
|
||||
local-ip-addr = "0.1.1"
|
||||
upnp-client = "0.1.2"
|
||||
upnp-client = "0.1.3"
|
||||
|
||||
@@ -56,26 +56,44 @@ impl Addon for Dlna {
|
||||
#[async_trait]
|
||||
impl Player for Dlna {
|
||||
async fn play(&mut self) -> Result<(), Error> {
|
||||
if let Some(client) = &self.client {
|
||||
client.play().await?;
|
||||
}
|
||||
todo!()
|
||||
}
|
||||
|
||||
async fn pause(&mut self) -> Result<(), Error> {
|
||||
if let Some(client) = &self.client {
|
||||
client.pause().await?;
|
||||
}
|
||||
todo!()
|
||||
}
|
||||
|
||||
async fn stop(&mut self) -> Result<(), Error> {
|
||||
if let Some(client) = &self.client {
|
||||
client.stop().await?;
|
||||
}
|
||||
todo!()
|
||||
}
|
||||
|
||||
async fn next(&mut self) -> Result<(), Error> {
|
||||
if let Some(client) = &self.client {
|
||||
// client.next().await?;
|
||||
}
|
||||
todo!()
|
||||
}
|
||||
|
||||
async fn previous(&mut self) -> Result<(), Error> {
|
||||
if let Some(client) = &self.client {
|
||||
// client.previous().await?;
|
||||
}
|
||||
todo!()
|
||||
}
|
||||
|
||||
async fn seek(&mut self, position: u32) -> Result<(), Error> {
|
||||
if let Some(client) = &self.client {
|
||||
client.seek(position as u64).await?;
|
||||
}
|
||||
todo!()
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||
rust_library(
|
||||
name = "music_player_audio",
|
||||
srcs = [
|
||||
"src/decoder/mod.rs",
|
||||
"src/decoder/symphonia_decoder.rs",
|
||||
"src/fetch/mod.rs",
|
||||
"src/fetch/cache.rs",
|
||||
"src/fetch/client.rs",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -50,5 +50,7 @@ rust_library(
|
||||
"@crate_index//:futures-util",
|
||||
"@crate_index//:once_cell",
|
||||
"@crate_index//:url",
|
||||
"@crate_index//:upnp-client",
|
||||
"@crate_index//:local-ip-addr"
|
||||
] + all_crate_deps(),
|
||||
)
|
||||
|
||||
@@ -11,8 +11,11 @@ rust_library(
|
||||
],
|
||||
deps = [
|
||||
"//discovery:music_player_discovery",
|
||||
"//settings:music_player_settings",
|
||||
"@crate_index//:tantivy",
|
||||
"@crate_index//:mdns-sd",
|
||||
"@crate_index//:local-ip-addr"
|
||||
"@crate_index//:local-ip-addr",
|
||||
"@crate_index//:upnp-client",
|
||||
"@crate_index//:url",
|
||||
] + all_crate_deps(),
|
||||
)
|
||||
Reference in New Issue
Block a user