chore(bazel): fix bazel build issue

This commit is contained in:
Tsiry Sandratraina
2023-02-10 20:34:21 +03:00
parent 9d4b75f0eb
commit e3fcdbe350
10 changed files with 6593 additions and 2874 deletions

1
BUILD
View File

@@ -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

File diff suppressed because it is too large Load Diff

View File

@@ -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"]
)]

View File

@@ -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",

View File

@@ -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"

View File

@@ -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!()
}

View File

@@ -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

View File

@@ -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(),
)

View File

@@ -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(),
)