From a4301140d8e29d5ac5176c9b95ac0c5648af4fa8 Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Tue, 30 Dec 2025 16:12:30 +0100 Subject: [PATCH] =?UTF-8?q?Migration=20vers=20une=20forme=20unifi=C3=A9e?= =?UTF-8?q?=20des=20cargos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 34 +++----- Cargo.toml | 32 ++++++++ PMOMusic/Cargo.toml | 4 +- PMOMusic/Cargo.toml.backup | 25 ++++++ pmoapp/Cargo.toml.backup | 15 ++++ pmoaudio-ext/Cargo.toml | 6 +- pmoaudio/Cargo.toml | 8 +- pmoaudio/Cargo.toml.backup | 29 +++++++ pmoaudiocache/Cargo.toml | 16 ++-- pmoaudiocache/Cargo.toml.backup | 57 +++++++++++++ pmoaudiocache/src/track_metadata.rs | 2 +- pmocache/Cargo.toml | 14 ++-- pmocache/Cargo.toml.backup | 53 ++++++++++++ pmoconfig/Cargo.toml | 12 +-- pmoconfig/Cargo.toml.backup | 32 ++++++++ pmocontrol/Cargo.toml | 18 ++--- pmocontrol/Cargo.toml.backup | 48 +++++++++++ pmocovers/Cargo.toml | 10 +-- pmocovers/Cargo.toml.backup | 51 ++++++++++++ pmodidl/Cargo.toml | 4 +- pmodidl/Cargo.toml.backup | 14 ++++ pmodidl/src/lib.rs | 5 +- pmoflac/Cargo.toml | 8 +- pmoflac/Cargo.toml.backup | 29 +++++++ pmomediarenderer/Cargo.toml | 2 +- pmomediarenderer/Cargo.toml.backup | 13 +++ pmomediaserver/Cargo.toml | 14 ++-- pmomediaserver/Cargo.toml.backup | 54 +++++++++++++ pmometadata/Cargo.toml | 4 +- pmometadata/Cargo.toml.backup | 13 +++ pmometadata/src/lib.rs | 2 +- pmoparadise/Cargo.toml | 18 ++--- pmoparadise/Cargo.toml.backup | 121 ++++++++++++++++++++++++++++ pmoplaylist/Cargo.toml | 14 ++-- pmoplaylist/Cargo.toml.backup | 46 +++++++++++ pmoqobuz/Cargo.toml | 16 ++-- pmoqobuz/Cargo.toml.backup | 91 +++++++++++++++++++++ pmoserver/Cargo.toml | 12 +-- pmoserver/Cargo.toml.backup | 26 ++++++ pmosource/Cargo.toml | 12 +-- pmosource/Cargo.toml.backup | 54 +++++++++++++ pmoupnp/Cargo.toml | 18 ++--- pmoupnp/Cargo.toml.backup | 50 ++++++++++++ pmoutils/Cargo.toml | 2 +- pmoutils/Cargo.toml.backup | 13 +++ 45 files changed, 989 insertions(+), 132 deletions(-) create mode 100644 PMOMusic/Cargo.toml.backup create mode 100644 pmoapp/Cargo.toml.backup create mode 100755 pmoaudio/Cargo.toml.backup create mode 100644 pmoaudiocache/Cargo.toml.backup create mode 100644 pmocache/Cargo.toml.backup create mode 100644 pmoconfig/Cargo.toml.backup create mode 100644 pmocontrol/Cargo.toml.backup create mode 100644 pmocovers/Cargo.toml.backup create mode 100644 pmodidl/Cargo.toml.backup create mode 100755 pmoflac/Cargo.toml.backup create mode 100644 pmomediarenderer/Cargo.toml.backup create mode 100644 pmomediaserver/Cargo.toml.backup create mode 100644 pmometadata/Cargo.toml.backup create mode 100644 pmoparadise/Cargo.toml.backup create mode 100644 pmoplaylist/Cargo.toml.backup create mode 100644 pmoqobuz/Cargo.toml.backup create mode 100644 pmoserver/Cargo.toml.backup create mode 100644 pmosource/Cargo.toml.backup create mode 100644 pmoupnp/Cargo.toml.backup create mode 100644 pmoutils/Cargo.toml.backup diff --git a/Cargo.lock b/Cargo.lock index 4071b75d..2fb78f6f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3642,7 +3642,7 @@ dependencies = [ "pmoflac", "pmometadata", "pmoserver", - "quick-xml 0.37.5", + "quick-xml", "rusqlite", "serde", "serde_json", @@ -3721,7 +3721,7 @@ dependencies = [ "pmodidl", "pmoserver", "pmoupnp", - "quick-xml 0.38.4", + "quick-xml", "ratatui", "rust_cast", "rustls", @@ -3769,7 +3769,7 @@ dependencies = [ "bevy_reflect", "bevy_reflect_derive", "pmoutils", - "quick-xml 0.38.4", + "quick-xml", "serde", "utoipa", "utoipa-swagger-ui", @@ -3790,7 +3790,7 @@ dependencies = [ "opus", "pmometadata", "tempfile", - "thiserror 1.0.69", + "thiserror 2.0.17", "tokio", "tracing", ] @@ -3804,7 +3804,7 @@ dependencies = [ "once_cell", "pmodidl", "pmoupnp", - "quick-xml 0.38.4", + "quick-xml", ] [[package]] @@ -3827,10 +3827,10 @@ dependencies = [ "pmosource", "pmoupnp", "pmoutils", - "quick-xml 0.38.4", + "quick-xml", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.17", "tokio", "tokio-util", "tracing", @@ -3909,7 +3909,7 @@ dependencies = [ "rusqlite", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.17", "tokio", "tokio-stream", "tracing", @@ -3946,7 +3946,7 @@ dependencies = [ "serde_yaml", "sha1", "tempfile", - "thiserror 1.0.69", + "thiserror 2.0.17", "tokio", "tokio-test", "tracing", @@ -3998,7 +3998,7 @@ dependencies = [ "pmoupnp", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.17", "tokio", "tokio-stream", "tracing", @@ -4030,7 +4030,7 @@ dependencies = [ "pmoplaylist", "pmoserver", "pmoutils", - "quick-xml 0.37.5", + "quick-xml", "reqwest", "serde", "serde_json", @@ -4053,7 +4053,7 @@ dependencies = [ "get_if_addrs", "netstat2", "os_info", - "quick-xml 0.38.4", + "quick-xml", "sysinfo", "users", "xmltree 0.10.3", @@ -4337,16 +4337,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" -[[package]] -name = "quick-xml" -version = "0.37.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "quick-xml" version = "0.38.4" diff --git a/Cargo.toml b/Cargo.toml index 8575c4c1..a2989378 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,3 +21,35 @@ members = [ "pmoflac", "pmometadata", "pmocontrol", ] + +[workspace.dependencies] +# Core +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +serde_yaml = "0.9" + +# Async runtime +tokio = { version = "1.35", features = ["full"] } +tokio-util = { version = "0.7", features = ["io"] } +async-trait = "0.1" + +# Error handling +anyhow = "1.0" +thiserror = "2.0" # ⚠️ Unifier sur 2.0 (vous avez 1.0 et 2.0) + +# Logging +tracing = "0.1.41" +tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] } + +# HTTP/XML +reqwest = { version = "0.12", default-features = false } +ureq = "3.1" +quick-xml = { version = "0.38", features = ["serialize"] } # ⚠️ Unifier 0.37→0.38 + +# Utilities +chrono = { version = "0.4", features = ["serde"] } +uuid = { version = "1.18", features = ["v4"] } +crossbeam-channel = "0.5" + +# Testing +tokio-test = "0.4" \ No newline at end of file diff --git a/PMOMusic/Cargo.toml b/PMOMusic/Cargo.toml index b17201d9..2955dd5c 100644 --- a/PMOMusic/Cargo.toml +++ b/PMOMusic/Cargo.toml @@ -16,8 +16,8 @@ pmoaudio-ext = { path = "../pmoaudio-ext", features = ["all"] } pmoapp = { path = "../pmoapp", features = ["pmoserver"] } pmocontrol = { path = "../pmocontrol", features = ["pmoserver"] } -tokio = { version = "1.35", features = ["rt-multi-thread", "macros", "sync", "time","signal"] } -tracing = "0.1.41" +tokio = { workspace = true, features = ["rt-multi-thread", "macros", "sync", "time", "signal"] } +tracing = { workspace = true } tracing-subscriber = "0.3.20" axum = "0.8.4" serde_json = "1.0.145" diff --git a/PMOMusic/Cargo.toml.backup b/PMOMusic/Cargo.toml.backup new file mode 100644 index 00000000..b17201d9 --- /dev/null +++ b/PMOMusic/Cargo.toml.backup @@ -0,0 +1,25 @@ +[package] +name = "PMOMusic" +version = "0.1.0" +edition = "2024" + +[dependencies] +pmoconfig = { path = "../pmoconfig" } +pmoupnp = { path = "../pmoupnp"} +pmomediarenderer = { path = "../pmomediarenderer" } +pmomediaserver = { path = "../pmomediaserver", features = ["qobuz", "paradise", "paradise-api", "api"] } +pmosource = { path = "../pmosource", features = ["server"] } +pmoserver = { path = "../pmoserver" } +pmocovers = { path = "../pmocovers", features = ["pmoserver"] } +pmoaudiocache = { path = "../pmoaudiocache", features = ["pmoserver"]} +pmoaudio-ext = { path = "../pmoaudio-ext", features = ["all"] } +pmoapp = { path = "../pmoapp", features = ["pmoserver"] } +pmocontrol = { path = "../pmocontrol", features = ["pmoserver"] } + +tokio = { version = "1.35", features = ["rt-multi-thread", "macros", "sync", "time","signal"] } +tracing = "0.1.41" +tracing-subscriber = "0.3.20" +axum = "0.8.4" +serde_json = "1.0.145" +utoipa = "5.4" +console-subscriber = "0.4.1" diff --git a/pmoapp/Cargo.toml.backup b/pmoapp/Cargo.toml.backup new file mode 100644 index 00000000..8b18b4e2 --- /dev/null +++ b/pmoapp/Cargo.toml.backup @@ -0,0 +1,15 @@ +[package] +name = "pmoapp" +version = "0.1.0" +edition = "2021" + +[dependencies] +rust-embed = "8.5.0" + +[dependencies.pmoserver] +path = "../pmoserver" +optional = true + +[features] +default = [] +pmoserver = ["dep:pmoserver"] diff --git a/pmoaudio-ext/Cargo.toml b/pmoaudio-ext/Cargo.toml index e78cc9a9..1ae36392 100644 --- a/pmoaudio-ext/Cargo.toml +++ b/pmoaudio-ext/Cargo.toml @@ -18,7 +18,7 @@ pmoplaylist = { path = "../pmoplaylist", optional = true } pmocache = { path = "../pmocache", optional = true } # Async runtime -tokio = { version = "1.0", features = ["full"] } +tokio = { workspace = true } tokio-util = { version = "0.7" } async-trait = "0.1" @@ -28,8 +28,8 @@ rand = "0.8" # HTTP streaming dependencies bytes = { version = "1.0", optional = true } -serde = { version = "1.0", features = ["derive"], optional = true } -serde_json = { version = "1.0", optional = true } +serde = { workspace = true, optional = true } +serde_json = { workspace = true, optional = true } [features] default = [] diff --git a/pmoaudio/Cargo.toml b/pmoaudio/Cargo.toml index 720d58ce..d264e4d3 100755 --- a/pmoaudio/Cargo.toml +++ b/pmoaudio/Cargo.toml @@ -8,9 +8,9 @@ default = [] simd = [] [dependencies] -tokio = { version = "1.42", features = ["full"] } +tokio = { workspace = true } tokio-util = { version = "0.7", features = ["io"] } -async-trait = "0.1" +async-trait = { workspace = true } futures-util = "0.3" pmoflac = { path = "../pmoflac" } pmometadata = { path = "../pmometadata" } @@ -18,7 +18,7 @@ paste = "1" soxr = "0.6.0" bytemuck = "1.24.0" reqwest = { version = "0.12", features = ["stream"] } -tracing = "0.1" +tracing = { workspace = true } cpal = "0.15" once_cell = "1.20" @@ -26,4 +26,4 @@ once_cell = "1.20" tokio-test = "0.4" tempfile = "3" wiremock = "0.6" -tracing-subscriber = { version = "0.3", features = ["env-filter"] } +tracing-subscriber = { workspace = true } diff --git a/pmoaudio/Cargo.toml.backup b/pmoaudio/Cargo.toml.backup new file mode 100755 index 00000000..720d58ce --- /dev/null +++ b/pmoaudio/Cargo.toml.backup @@ -0,0 +1,29 @@ +[package] +name = "pmoaudio" +version = "0.1.0" +edition = "2021" + +[features] +default = [] +simd = [] + +[dependencies] +tokio = { version = "1.42", features = ["full"] } +tokio-util = { version = "0.7", features = ["io"] } +async-trait = "0.1" +futures-util = "0.3" +pmoflac = { path = "../pmoflac" } +pmometadata = { path = "../pmometadata" } +paste = "1" +soxr = "0.6.0" +bytemuck = "1.24.0" +reqwest = { version = "0.12", features = ["stream"] } +tracing = "0.1" +cpal = "0.15" +once_cell = "1.20" + +[dev-dependencies] +tokio-test = "0.4" +tempfile = "3" +wiremock = "0.6" +tracing-subscriber = { version = "0.3", features = ["env-filter"] } diff --git a/pmoaudiocache/Cargo.toml b/pmoaudiocache/Cargo.toml index 49dc679e..e3139df2 100644 --- a/pmoaudiocache/Cargo.toml +++ b/pmoaudiocache/Cargo.toml @@ -16,7 +16,7 @@ pmometadata = { path = "../pmometadata" } # Base de données rusqlite = { version = "0.37", features = ["bundled"] } -chrono = "0.4" +chrono = { workspace = true } # Métadonnées audio lofty = "0.22" @@ -26,15 +26,15 @@ futures-util = "0.3" bytes = "1.0" # Utilitaires -anyhow = "1.0" -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -quick-xml = { version = "0.37", features = ["serialize"] } +anyhow = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +quick-xml = { workspace = true } paste = "1.0" -async-trait = "0.1" +async-trait = { workspace = true } # Async -tokio = { version = "1.0", features = ["full"] } +tokio = { workspace = true } # Singleton once_cell = "1.20" @@ -45,7 +45,7 @@ pmoconfig = { path = "../pmoconfig", optional = true } axum = { version = "0.8", optional = true } utoipa = { version = "5.3", features = ["axum_extras"], optional = true } -tracing = "0.1.41" +tracing = { workspace = true } [dev-dependencies] tracing-subscriber = "0.3" diff --git a/pmoaudiocache/Cargo.toml.backup b/pmoaudiocache/Cargo.toml.backup new file mode 100644 index 00000000..0b3c8524 --- /dev/null +++ b/pmoaudiocache/Cargo.toml.backup @@ -0,0 +1,57 @@ +[package] +name = "pmoaudiocache" +version = "0.1.0" +edition = "2021" + +[dependencies] +# Cache générique +pmocache = { path = "../pmocache" } + +# DIDL-Lite pour UPnP +pmodidl = { path = "../pmodidl" } + +# Streaming FLAC asynchrone +pmoflac = { path = "../pmoflac" } +pmometadata = { path = "../pmometadata" } + +# Base de données +rusqlite = { version = "0.37", features = ["bundled"] } +chrono = "0.4" + +# Métadonnées audio +lofty = "0.22" + +# Outils de streaming +futures-util = "0.3" +bytes = "1.0" + +# Utilitaires +anyhow = "1.0" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +quick-xml = { version = "0.38", features = ["serialize"] } +paste = "1.0" +async-trait = "0.1" + +# Async +tokio = { version = "1.0", features = ["full"] } + +# Singleton +once_cell = "1.20" + +# Serveur HTTP (optionnel pour l'extension) +pmoserver = { path = "../pmoserver", optional = true } +pmoconfig = { path = "../pmoconfig", optional = true } +axum = { version = "0.8", optional = true } +utoipa = { version = "5.3", features = ["axum_extras"], optional = true } + +tracing = "0.1.41" + +[dev-dependencies] +tracing-subscriber = "0.3" +tempfile = "3" + +[features] +default = ["pmoserver"] +pmoconfig = ["dep:pmoconfig", "pmocache/pmoconfig"] +pmoserver = ["pmoconfig", "dep:pmoserver", "dep:axum", "dep:utoipa", "pmocache/pmoserver", "pmocache/openapi"] diff --git a/pmoaudiocache/src/track_metadata.rs b/pmoaudiocache/src/track_metadata.rs index 7a7eff55..2e454066 100644 --- a/pmoaudiocache/src/track_metadata.rs +++ b/pmoaudiocache/src/track_metadata.rs @@ -394,7 +394,7 @@ impl TrackMetadata for AudioCacheTrackMetadata { } async fn touch(&mut self) -> MetadataResult<()> { - self.write_timestamp(Instant::now())?; + self.write_timestamp(SystemTime::now())?; Ok(Some(())) } } diff --git a/pmocache/Cargo.toml b/pmocache/Cargo.toml index 61870502..c188ee87 100644 --- a/pmocache/Cargo.toml +++ b/pmocache/Cargo.toml @@ -17,21 +17,21 @@ sha2 = "0.10" hex = "0.4" # Utilitaires -anyhow = "1.0" -async-trait = "0.1" -chrono = "0.4" -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" +anyhow = { workspace = true } +async-trait = { workspace = true } +chrono = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } bytes = "1.6" paste = "1.0" pmoflac = { path = "../pmoflac" } # Async -tokio = { version = "1.0", features = ["full"] } +tokio = { workspace = true } tokio-util = { version = "0.7", features = ["io"] } # Logging -tracing = "0.1" +tracing = { workspace = true } # Feature pour OpenAPI utoipa = { version = "5.3", optional = true } diff --git a/pmocache/Cargo.toml.backup b/pmocache/Cargo.toml.backup new file mode 100644 index 00000000..61870502 --- /dev/null +++ b/pmocache/Cargo.toml.backup @@ -0,0 +1,53 @@ +[package] +name = "pmocache" +version = "0.1.0" +edition = "2021" + +[dependencies] +# Base de données +rusqlite = { version = "0.37.0", features = ["bundled"] } + +# HTTP client +reqwest = { version = "0.12", features = ["blocking", "stream"] } +futures-util = "0.3" + +# Cryptographie +sha1 = "0.10" +sha2 = "0.10" +hex = "0.4" + +# Utilitaires +anyhow = "1.0" +async-trait = "0.1" +chrono = "0.4" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +bytes = "1.6" +paste = "1.0" +pmoflac = { path = "../pmoflac" } + +# Async +tokio = { version = "1.0", features = ["full"] } +tokio-util = { version = "0.7", features = ["io"] } + +# Logging +tracing = "0.1" + +# Feature pour OpenAPI +utoipa = { version = "5.3", optional = true } + +# Feature pour pmoserver (extension HTTP) +axum = { version = "0.8", optional = true } + +# Feature pour pmoconfig (extension de configuration) +pmoconfig = { path = "../pmoconfig", optional = true } +serde_yaml = { version = "0.9", optional = true } + +[dev-dependencies] +tempfile = "3" + +[features] +default = [] +openapi = ["dep:utoipa"] +pmoserver = ["dep:axum"] +pmoconfig = ["dep:pmoconfig", "dep:serde_yaml"] diff --git a/pmoconfig/Cargo.toml b/pmoconfig/Cargo.toml index 4dcb974c..81f85369 100644 --- a/pmoconfig/Cargo.toml +++ b/pmoconfig/Cargo.toml @@ -7,21 +7,21 @@ edition = "2021" [dependencies] pmoutils ={ path = "../pmoutils" } -serde = { version = "1.0", features = ["derive"] } -serde_yaml = "0.9.33" -serde_json = "1.0" +serde = { workspace = true } +serde_yaml = { workspace = true } +serde_json = { workspace = true } lazy_static = "1.4.0" dirs = "6.0.0" log = "0.4.20" anyhow = "1.0.75" -uuid = { version = "1.18.1", features = ["v4"] } -tracing = "0.1.41" +uuid = { workspace = true } +tracing = { workspace = true } aes-gcm = "0.10" sha2 = "0.10" base64 = "0.22" # Async -tokio = { version = "1.0", features = ["full"], optional = true } +tokio = { workspace = true, optional = true } # Serveur HTTP (pour l'API REST) axum = { version = "0.8", optional = true } diff --git a/pmoconfig/Cargo.toml.backup b/pmoconfig/Cargo.toml.backup new file mode 100644 index 00000000..4dcb974c --- /dev/null +++ b/pmoconfig/Cargo.toml.backup @@ -0,0 +1,32 @@ + +[package] +name = "pmoconfig" +version = "0.1.0" +edition = "2021" + +[dependencies] +pmoutils ={ path = "../pmoutils" } + +serde = { version = "1.0", features = ["derive"] } +serde_yaml = "0.9.33" +serde_json = "1.0" +lazy_static = "1.4.0" +dirs = "6.0.0" +log = "0.4.20" +anyhow = "1.0.75" +uuid = { version = "1.18.1", features = ["v4"] } +tracing = "0.1.41" +aes-gcm = "0.10" +sha2 = "0.10" +base64 = "0.22" + +# Async +tokio = { version = "1.0", features = ["full"], optional = true } + +# Serveur HTTP (pour l'API REST) +axum = { version = "0.8", optional = true } +utoipa = { version = "5.3", features = ["axum_extras"], optional = true } + +[features] +default = [] +api = ["dep:tokio", "dep:axum", "dep:utoipa"] \ No newline at end of file diff --git a/pmocontrol/Cargo.toml b/pmocontrol/Cargo.toml index 68e7d90a..b828d5f3 100644 --- a/pmocontrol/Cargo.toml +++ b/pmocontrol/Cargo.toml @@ -6,13 +6,13 @@ edition = "2024" [dependencies] pmoupnp = { path = "../pmoupnp" } pmodidl = { path = "../pmodidl" } -quick-xml = "0.38.4" -thiserror = "2.0.17" +quick-xml = { workspace = true } +thiserror = { workspace = true } ureq = "3.1.4" -tracing = "0.1.41" +tracing = { workspace = true } tracing-subscriber = "0.3" tracing-log = "0.1" -anyhow = "1.0" +anyhow = { workspace = true } xmltree = "0.11.0" crossbeam-channel = "0.5" ratatui = { version = "0.26", default-features = false, features = ["crossterm"] } @@ -28,9 +28,9 @@ smol = "2.0" pmoserver = { path = "../pmoserver", optional = true } utoipa = { version = "5.4.0", optional = true } axum = { version = "0.8.4", optional = true } -serde = { version = "1.0", features = ["derive"], optional = true } -serde_json = { version = "1.0", optional = true } -tokio = { version = "1", features = ["sync", "rt"], optional = true } +serde = { workspace = true, optional = true } +serde_json = { workspace = true, optional = true } +tokio = { workspace = true, features = ["sync", "rt"], optional = true } tokio-util = { version = "0.7", optional = true } async-trait = { version = "0.1", optional = true } tokio-stream = { version = "0.1", features = ["sync"], optional = true } @@ -38,8 +38,8 @@ async-stream = { version = "0.3", optional = true } chrono = { version = "0.4", features = ["serde"], optional = true } [dev-dependencies] -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" +serde = { workspace = true } +serde_json = { workspace = true } percent-encoding = "2.3" [features] diff --git a/pmocontrol/Cargo.toml.backup b/pmocontrol/Cargo.toml.backup new file mode 100644 index 00000000..68e7d90a --- /dev/null +++ b/pmocontrol/Cargo.toml.backup @@ -0,0 +1,48 @@ +[package] +name = "pmocontrol" +version = "0.1.0" +edition = "2024" + +[dependencies] +pmoupnp = { path = "../pmoupnp" } +pmodidl = { path = "../pmodidl" } +quick-xml = "0.38.4" +thiserror = "2.0.17" +ureq = "3.1.4" +tracing = "0.1.41" +tracing-subscriber = "0.3" +tracing-log = "0.1" +anyhow = "1.0" +xmltree = "0.11.0" +crossbeam-channel = "0.5" +ratatui = { version = "0.26", default-features = false, features = ["crossterm"] } +crossterm = "0.27" +rust_cast = "0.19" +rustls = { version = "0.23", features = ["aws-lc-rs"] } +mdns = "3.0" +async-std = "1.12" +futures-util = "0.3" +smol = "2.0" + +# pmoserver extension support (optional) +pmoserver = { path = "../pmoserver", optional = true } +utoipa = { version = "5.4.0", optional = true } +axum = { version = "0.8.4", optional = true } +serde = { version = "1.0", features = ["derive"], optional = true } +serde_json = { version = "1.0", optional = true } +tokio = { version = "1", features = ["sync", "rt"], optional = true } +tokio-util = { version = "0.7", optional = true } +async-trait = { version = "0.1", optional = true } +tokio-stream = { version = "0.1", features = ["sync"], optional = true } +async-stream = { version = "0.3", optional = true } +chrono = { version = "0.4", features = ["serde"], optional = true } + +[dev-dependencies] +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +percent-encoding = "2.3" + +[features] +default = [] +# Active l'API REST pmoserver +pmoserver = ["dep:pmoserver", "dep:utoipa", "dep:axum", "dep:serde", "dep:serde_json", "dep:tokio", "dep:tokio-util", "dep:async-trait", "dep:tokio-stream", "dep:async-stream", "dep:chrono"] diff --git a/pmocovers/Cargo.toml b/pmocovers/Cargo.toml index 804c3a31..336ebf69 100644 --- a/pmocovers/Cargo.toml +++ b/pmocovers/Cargo.toml @@ -15,12 +15,12 @@ webp = "0.3" reqwest = { version = "0.12", features = ["blocking"] } # Utilitaires -anyhow = "1.0" -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" +anyhow = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } # Async -tokio = { version = "1.0", features = ["full"] } +tokio = { workspace = true } # Singleton once_cell = "1.20" @@ -32,7 +32,7 @@ async-trait = { version = "0.1", optional = true } axum = { version = "0.8", optional = true } utoipa = { version = "5.3", features = ["axum_extras"], optional = true } -tracing = "0.1.41" +tracing = { workspace = true } [dev-dependencies] tempfile = "3" diff --git a/pmocovers/Cargo.toml.backup b/pmocovers/Cargo.toml.backup new file mode 100644 index 00000000..804c3a31 --- /dev/null +++ b/pmocovers/Cargo.toml.backup @@ -0,0 +1,51 @@ +[package] +name = "pmocovers" +version = "0.1.0" +edition = "2021" + +[dependencies] +# Cache générique +pmocache = { path = "../pmocache" } + +# Gestion d'images +image = "0.25" +webp = "0.3" + +# HTTP client +reqwest = { version = "0.12", features = ["blocking"] } + +# Utilitaires +anyhow = "1.0" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" + +# Async +tokio = { version = "1.0", features = ["full"] } + +# Singleton +once_cell = "1.20" + +# Serveur HTTP (optionnel pour l'extension) +pmoserver = { path = "../pmoserver", optional = true } +pmoconfig = { path = "../pmoconfig", optional = true } +async-trait = { version = "0.1", optional = true } +axum = { version = "0.8", optional = true } +utoipa = { version = "5.3", features = ["axum_extras"], optional = true } + +tracing = "0.1.41" + +[dev-dependencies] +tempfile = "3" + +[features] +default = ["pmoserver"] +pmoconfig = ["dep:pmoconfig", "pmocache/pmoconfig"] +pmoserver = [ + "pmoconfig", + "dep:pmoserver", + "dep:axum", + "dep:utoipa", + "pmocache/openapi", + "pmocache/pmoserver", + "dep:async-trait", +] diff --git a/pmodidl/Cargo.toml b/pmodidl/Cargo.toml index d9fa43db..baf5a6bc 100644 --- a/pmodidl/Cargo.toml +++ b/pmodidl/Cargo.toml @@ -4,10 +4,10 @@ version = "0.1.0" edition = "2024" [dependencies] -serde = "1.0.228" +serde = { workspace = true } utoipa = { version = "5.4.0", features = ["axum_extras"] } utoipa-swagger-ui = { version = "9.0.2", features = ["axum"] } -quick-xml = { version = "0.38.3", features = ["serialize"] } +quick-xml = { workspace = true } bevy_reflect = "0.17.1" bevy_reflect_derive = "0.17.1" pmoutils = { path = "../pmoutils" } diff --git a/pmodidl/Cargo.toml.backup b/pmodidl/Cargo.toml.backup new file mode 100644 index 00000000..d9fa43db --- /dev/null +++ b/pmodidl/Cargo.toml.backup @@ -0,0 +1,14 @@ +[package] +name = "pmodidl" +version = "0.1.0" +edition = "2024" + +[dependencies] +serde = "1.0.228" +utoipa = { version = "5.4.0", features = ["axum_extras"] } +utoipa-swagger-ui = { version = "9.0.2", features = ["axum"] } +quick-xml = { version = "0.38.3", features = ["serialize"] } +bevy_reflect = "0.17.1" +bevy_reflect_derive = "0.17.1" +pmoutils = { path = "../pmoutils" } +xmltree = "0.10" diff --git a/pmodidl/src/lib.rs b/pmodidl/src/lib.rs index c6963cd8..1f1afda2 100644 --- a/pmodidl/src/lib.rs +++ b/pmodidl/src/lib.rs @@ -5,6 +5,7 @@ use bevy_reflect::Reflect; use pmoutils::ToXmlElement; use serde::{Deserialize, Serialize}; +use std::time::SystemTime; use std::{borrow::Cow, time::Instant}; use std::collections::HashSet; use std::fmt::Write; @@ -36,7 +37,7 @@ pub struct ParsedMetadata { /// Timestamp du parsing (exclu de la réflexion car SystemTime n'implémente pas Reflect) #[reflect(ignore)] #[serde(skip_serializing_if = "Option::is_none")] - pub parsed_at: Option, + pub parsed_at: Option, } impl ParsedMetadata { @@ -44,7 +45,7 @@ impl ParsedMetadata { Self { format: format.into(), data, - parsed_at: Some(Instant::now()), + parsed_at: Some(SystemTime::now()), } } diff --git a/pmoflac/Cargo.toml b/pmoflac/Cargo.toml index f22df6e0..9919892e 100755 --- a/pmoflac/Cargo.toml +++ b/pmoflac/Cargo.toml @@ -20,10 +20,10 @@ lofty = "0.22" minimp3 = "0.5" opus = "0.3" pmometadata = { path = "../pmometadata" } -thiserror = "1.0" -tokio = { version = "1.37", features = ["rt", "rt-multi-thread", "macros", "sync", "io-util", "fs"] } -tracing = "0.1" +thiserror = { workspace = true } +tokio = { workspace = true, features = ["rt", "rt-multi-thread", "macros", "sync", "io-util", "fs"] } +tracing = { workspace = true } [dev-dependencies] tempfile = "3.10" -tokio = { version = "1.37", features = ["rt", "rt-multi-thread", "macros", "sync", "io-util", "time", "fs"] } +tokio = { workspace = true, features = ["rt", "rt-multi-thread", "macros", "sync", "io-util", "time", "fs"] } diff --git a/pmoflac/Cargo.toml.backup b/pmoflac/Cargo.toml.backup new file mode 100755 index 00000000..aa69993c --- /dev/null +++ b/pmoflac/Cargo.toml.backup @@ -0,0 +1,29 @@ +[package] +name = "pmoflac" +version = "0.1.0" +edition = "2021" +authors = ["PMOMusic"] +description = "Asynchronous FLAC <-> PCM streaming utilities" +license = "MIT" + +[lib] +name = "pmoflac" +path = "src/lib.rs" + +[dependencies] +bytes = "1.6" +claxon = "0.4" +lewton = "0.10" +libc = "0.2" +libflac-sys = { version = "0.3.3", default-features = false, features = ["build-flac"] } +lofty = "0.22" +minimp3 = "0.5" +opus = "0.3" +pmometadata = { path = "../pmometadata" } +thiserror = "2.0" +tokio = { version = "1.37", features = ["rt", "rt-multi-thread", "macros", "sync", "io-util", "fs"] } +tracing = "0.1" + +[dev-dependencies] +tempfile = "3.10" +tokio = { version = "1.37", features = ["rt", "rt-multi-thread", "macros", "sync", "io-util", "time", "fs"] } diff --git a/pmomediarenderer/Cargo.toml b/pmomediarenderer/Cargo.toml index 688ba978..5121ef6a 100644 --- a/pmomediarenderer/Cargo.toml +++ b/pmomediarenderer/Cargo.toml @@ -10,4 +10,4 @@ pmodidl = { path = "../pmodidl" } once_cell = "1.20" bevy_reflect = "0.17.1" htmlescape = "0.3" -quick-xml = "0.38.3" +quick-xml = { workspace = true } diff --git a/pmomediarenderer/Cargo.toml.backup b/pmomediarenderer/Cargo.toml.backup new file mode 100644 index 00000000..688ba978 --- /dev/null +++ b/pmomediarenderer/Cargo.toml.backup @@ -0,0 +1,13 @@ +[package] +name = "pmomediarenderer" +version = "0.1.0" +edition = "2024" + +[dependencies] +pmoupnp = { path = "../pmoupnp" } +pmodidl = { path = "../pmodidl" } + +once_cell = "1.20" +bevy_reflect = "0.17.1" +htmlescape = "0.3" +quick-xml = "0.38.3" diff --git a/pmomediaserver/Cargo.toml b/pmomediaserver/Cargo.toml index 9852d980..9e8fe81c 100644 --- a/pmomediaserver/Cargo.toml +++ b/pmomediaserver/Cargo.toml @@ -11,13 +11,13 @@ pmoserver = { path = "../pmoserver" } once_cell = "1.20" bevy_reflect = "0.17.1" -tokio = { version = "1", features = ["sync"] } -async-trait = "0.1" -tracing = "0.1" -quick-xml = { version = "0.38.3", features = ["serialize"] } -thiserror = "1.0" -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" +tokio = { workspace = true, features = ["sync"] } +async-trait = { workspace = true } +tracing = { workspace = true } +quick-xml = { workspace = true } +thiserror = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } pmoutils = { path = "../pmoutils" } # Optional dependencies diff --git a/pmomediaserver/Cargo.toml.backup b/pmomediaserver/Cargo.toml.backup new file mode 100644 index 00000000..01523f88 --- /dev/null +++ b/pmomediaserver/Cargo.toml.backup @@ -0,0 +1,54 @@ +[package] +name = "pmomediaserver" +version = "0.1.0" +edition = "2024" + +[dependencies] +pmoupnp = { path = "../pmoupnp" } +pmodidl = { path = "../pmodidl" } +pmosource = { path = "../pmosource" } +pmoserver = { path = "../pmoserver" } + +once_cell = "1.20" +bevy_reflect = "0.17.1" +tokio = { version = "1", features = ["sync"] } +async-trait = "0.1" +tracing = "0.1" +quick-xml = { version = "0.38.3", features = ["serialize"] } +thiserror = "2.0" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +pmoutils = { path = "../pmoutils" } + +# Optional dependencies +axum = { version = "0.8", optional = true } +utoipa = { version = "5.3", optional = true } +pmoqobuz = { path = "../pmoqobuz", optional = true } +pmoparadise = { path = "../pmoparadise", optional = true } +pmoconfig = { path = "../pmoconfig", optional = true } +anyhow = { version = "1.0", optional = true } +pmoaudiocache = { path = "../pmoaudiocache", optional = true } +pmocovers = { path = "../pmocovers", optional = true, features = ["pmoserver"] } +pmoplaylist = { path = "../pmoplaylist", optional = true } +tokio-util = { version = "0.7", features = ["io"], optional = true } + +[features] +default = ["pmosource/server"] +# Feature pour activer l'API REST de gestion des sources +api = ["dep:axum", "dep:utoipa", "pmosource/server"] +# Feature pour activer le support Qobuz configuré +qobuz = ["api", "dep:pmoqobuz", "dep:pmoconfig", "pmoqobuz/server"] +# Feature pour activer le support Radio Paradise +paradise = [ + "api", + "dep:pmoparadise", + "pmoparadise/full", + "dep:anyhow", + "dep:pmoaudiocache", + "dep:pmocovers", + "pmocovers/pmoserver", + "dep:pmoplaylist", + "dep:tokio-util" +] +# Feature pour activer l'API REST de Radio Paradise (en plus de la source UPnP) +paradise-api = ["paradise", "pmoparadise/pmoserver"] diff --git a/pmometadata/Cargo.toml b/pmometadata/Cargo.toml index 83a4d8df..bd7c0a18 100644 --- a/pmometadata/Cargo.toml +++ b/pmometadata/Cargo.toml @@ -6,8 +6,8 @@ edition = "2024" [dependencies] async-trait = "0.1.89" paste = "1" -thiserror = "2.0.17" -tokio = { version = "1", features = ["full"] } +thiserror = { workspace = true } +tokio = { workspace = true } [dev-dependencies] tokio-test = "0.4" diff --git a/pmometadata/Cargo.toml.backup b/pmometadata/Cargo.toml.backup new file mode 100644 index 00000000..83a4d8df --- /dev/null +++ b/pmometadata/Cargo.toml.backup @@ -0,0 +1,13 @@ +[package] +name = "pmometadata" +version = "0.1.0" +edition = "2024" + +[dependencies] +async-trait = "0.1.89" +paste = "1" +thiserror = "2.0.17" +tokio = { version = "1", features = ["full"] } + +[dev-dependencies] +tokio-test = "0.4" diff --git a/pmometadata/src/lib.rs b/pmometadata/src/lib.rs index 9ebbe747..7243a45b 100755 --- a/pmometadata/src/lib.rs +++ b/pmometadata/src/lib.rs @@ -840,7 +840,7 @@ impl TrackMetadata for MemoryTrackMetadata { } async fn touch(&mut self) -> MetadataResult<()> { - self.updated_at = Some()); + self.updated_at = Some(SystemTime::now()); Ok(Some(())) } } diff --git a/pmoparadise/Cargo.toml b/pmoparadise/Cargo.toml index 26a23d78..79c970cf 100644 --- a/pmoparadise/Cargo.toml +++ b/pmoparadise/Cargo.toml @@ -14,16 +14,16 @@ categories = ["multimedia", "api-bindings"] reqwest = { version = "0.12", features = ["json", "stream"] } # Gestion asynchrone -tokio = { version = "1", features = ["full"] } +tokio = { workspace = true } # Sérialisation/Désérialisation JSON -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -serde_yaml = "0.9.33" +serde = { workspace = true } +serde_json = { workspace = true } +serde_yaml = { workspace = true } # Helpers -chrono = { version = "0.4", features = ["serde"] } -async-trait = "0.1" +chrono = { workspace = true } +async-trait = { workspace = true } sha2 = "0.10" hex = "0.4" tokio-util = { version = "0.7", features = ["io"] } @@ -32,8 +32,8 @@ rusqlite = { version = "0.37", features = ["bundled"] } once_cell = "1.20" # Gestion des erreurs -thiserror = "2.0.17" -anyhow = "1.0" +thiserror = { workspace = true } +anyhow = { workspace = true } # Streaming de bytes bytes = "1.5" @@ -41,7 +41,7 @@ futures = "0.3" flacenc = "0.5.0" # Logging -tracing = "0.1" +tracing = { workspace = true } # URL manipulation url = "2.5" diff --git a/pmoparadise/Cargo.toml.backup b/pmoparadise/Cargo.toml.backup new file mode 100644 index 00000000..26a23d78 --- /dev/null +++ b/pmoparadise/Cargo.toml.backup @@ -0,0 +1,121 @@ +[package] +name = "pmoparadise" +version = "0.1.0" +edition = "2021" +authors = ["PMOMusic Contributors"] +description = "Rust client for Radio Paradise streaming service" +license = "MIT OR Apache-2.0" +repository = "https://github.com/yourusername/pmomusic" +keywords = ["radio", "paradise", "streaming", "music", "flac"] +categories = ["multimedia", "api-bindings"] + +[dependencies] +# HTTP client pour les requêtes à l'API Radio Paradise +reqwest = { version = "0.12", features = ["json", "stream"] } + +# Gestion asynchrone +tokio = { version = "1", features = ["full"] } + +# Sérialisation/Désérialisation JSON +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +serde_yaml = "0.9.33" + +# Helpers +chrono = { version = "0.4", features = ["serde"] } +async-trait = "0.1" +sha2 = "0.10" +hex = "0.4" +tokio-util = { version = "0.7", features = ["io"] } +async-stream = "0.3" +rusqlite = { version = "0.37", features = ["bundled"] } +once_cell = "1.20" + +# Gestion des erreurs +thiserror = "2.0.17" +anyhow = "1.0" + +# Streaming de bytes +bytes = "1.5" +futures = "0.3" +flacenc = "0.5.0" + +# Logging +tracing = "0.1" + +# URL manipulation +url = "2.5" + +# Audio decoding/encoding +symphonia = { version = "0.5", features = ["all"] } + +# Audio decoding - claxon for FLAC streaming +claxon = "0.4" + +# pmoaudio-ext with playlist support (optional for examples) +pmoaudio-ext = { path = "../pmoaudio-ext", optional = true, features = ["playlist", "http-stream", "cache-sink"] } + +# Common music source traits +pmosource = { path = "../pmosource" } + +# Playlist management for FIFO support +pmoplaylist = { path = "../pmoplaylist" } +pmoconfig = { path = "../pmoconfig", optional = true } + +# Cache support (OBLIGATOIRE - architecture refactorisée) +pmocovers = { path = "../pmocovers" } +pmoaudiocache = { path = "../pmoaudiocache" } + +# pmoserver extension support +pmoserver = { path = "../pmoserver", optional = true } +utoipa = { version = "5.4.0", optional = true } +axum = { version = "0.8.4", optional = true } + +# pmoaudio node support +pmoaudio = { path = "../pmoaudio", optional = true } +pmoflac = { path = "../pmoflac", optional = true } +pmometadata = { path = "../pmometadata", optional = true } +futures-util = { version = "0.3", optional = true } + +[features] +default = ["metadata-only", "pmoconfig", "playlist"] +# Mode métadonnées seules (pas de décodage FLAC) +metadata-only = [] +# Active l'API REST pmoserver +pmoserver = ["dep:pmoserver", "dep:utoipa", "dep:axum", "server"] +# Feature pour activer le support serveur (cache registry) +server = ["pmosource/server", "pmoconfig"] +# Feature pour activer le support de pmoconfig +pmoconfig = ["dep:pmoconfig"] +# Feature pour activer le support des playlists d'historique +playlist = [] +# Feature cache (deprecated - toujours actif maintenant) +cache = [] +# Active le support pmoaudio node (RadioParadiseStreamSource) +pmoaudio = ["dep:pmoaudio", "dep:pmoflac", "dep:pmometadata", "dep:futures-util", "dep:pmoaudio-ext"] +# Active le support complet avec playlist (pour les exemples avancés) +full = ["pmoaudio", "dep:pmoaudio-ext", "pmoconfig", "pmoserver", "playlist"] + +[dev-dependencies] +# Tests +tokio-test = "0.4" +wiremock = "0.6" +# Pour les exemples avec logging +tracing-subscriber = "0.3" +# Pour l'exemple with_cache +pmocovers = { path = "../pmocovers" } +pmoaudiocache = { path = "../pmoaudiocache" } + +[[example]] +name = "now_playing" +path = "examples/now_playing.rs" + +[[example]] +name = "stream_block" +path = "examples/stream_block.rs" +required-features = ["full"] + +[[example]] +name = "single_channel_server" +path = "examples/single_channel_server.rs" +required-features = ["full"] diff --git a/pmoplaylist/Cargo.toml b/pmoplaylist/Cargo.toml index 0c96c3f1..b7146096 100644 --- a/pmoplaylist/Cargo.toml +++ b/pmoplaylist/Cargo.toml @@ -21,20 +21,20 @@ pmoconfig = { path = "../pmoconfig", optional = true } rusqlite = { version = "0.37", features = ["bundled"] } # Utilitaires -anyhow = "1.0" -thiserror = "1.0" -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" +anyhow = { workspace = true } +thiserror = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } # Async -tokio = { version = "1.0", features = ["full"] } +tokio = { workspace = true } # Singleton once_cell = "1.20" # Logging -tracing = "0.1" -chrono = { version = "0.4", features = ["serde"] } +tracing = { workspace = true } +chrono = { workspace = true } axum = { version = "0.8", optional = true, features = ["macros", "json"] } tokio-stream = { version = "0.1", optional = true, features = ["sync"] } utoipa = { version = "5.4", optional = true, features = ["axum_extras", "chrono"] } diff --git a/pmoplaylist/Cargo.toml.backup b/pmoplaylist/Cargo.toml.backup new file mode 100644 index 00000000..eff6d063 --- /dev/null +++ b/pmoplaylist/Cargo.toml.backup @@ -0,0 +1,46 @@ +[package] +name = "pmoplaylist" +version = "0.1.0" +edition = "2021" + +[dependencies] +# Caches PMO +pmoaudiocache = { path = "../pmoaudiocache" } +pmocache = { path = "../pmocache" } + +# Métadonnées +pmometadata = { path = "../pmometadata" } + +# DIDL-Lite pour UPnP +pmodidl = { path = "../pmodidl" } + +# Configuration (optionnelle) +pmoconfig = { path = "../pmoconfig", optional = true } + +# Base de données +rusqlite = { version = "0.37", features = ["bundled"] } + +# Utilitaires +anyhow = "1.0" +thiserror = "2.0" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" + +# Async +tokio = { version = "1.0", features = ["full"] } + +# Singleton +once_cell = "1.20" + +# Logging +tracing = "0.1" +chrono = { version = "0.4", features = ["serde"] } +axum = { version = "0.8", optional = true, features = ["macros", "json"] } +tokio-stream = { version = "0.1", optional = true, features = ["sync"] } +utoipa = { version = "5.4", optional = true, features = ["axum_extras", "chrono"] } +async-stream = { version = "0.3", optional = true } + +[features] +default = ["pmoconfig"] +pmoconfig = ["dep:pmoconfig"] +pmoserver = ["dep:axum", "dep:tokio-stream", "dep:utoipa", "dep:async-stream"] diff --git a/pmoqobuz/Cargo.toml b/pmoqobuz/Cargo.toml index 6cfeec7d..3156cc03 100644 --- a/pmoqobuz/Cargo.toml +++ b/pmoqobuz/Cargo.toml @@ -13,16 +13,16 @@ async-trait = { version = "0.1", optional = true } reqwest = { version = "0.12", features = ["json", "cookies"] } # Gestion asynchrone -tokio = { version = "1", features = ["full"] } +tokio = { workspace = true } # Sérialisation/Désérialisation JSON -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -serde_yaml = "0.9" +serde = { workspace = true } +serde_json = { workspace = true } +serde_yaml = { workspace = true } # Gestion des erreurs -anyhow = "1.0" -thiserror = "1.0" +anyhow = { workspace = true } +thiserror = { workspace = true } # Hashing pour les clés de cache et signatures sha1 = "0.10" @@ -33,10 +33,10 @@ md-5 = "0.10" moka = { version = "0.12", features = ["future"] } # Logging -tracing = "0.1" +tracing = { workspace = true } # Gestion du temps -chrono = { version = "0.4", features = ["serde"] } +chrono = { workspace = true } # Configuration pmoconfig = { path = "../pmoconfig" } diff --git a/pmoqobuz/Cargo.toml.backup b/pmoqobuz/Cargo.toml.backup new file mode 100644 index 00000000..adda2924 --- /dev/null +++ b/pmoqobuz/Cargo.toml.backup @@ -0,0 +1,91 @@ +[package] +name = "pmoqobuz" +version = "0.1.0" +edition = "2021" + +[dependencies] +regex = "1.12" +base64 = "0.22" +indexmap = "2.0" +async-trait = { version = "0.1", optional = true } + +# HTTP client pour les requêtes à l'API Qobuz +reqwest = { version = "0.12", features = ["json", "cookies"] } + +# Gestion asynchrone +tokio = { version = "1", features = ["full"] } + +# Sérialisation/Désérialisation JSON +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +serde_yaml = "0.9" + +# Gestion des erreurs +anyhow = "1.0" +thiserror = "2.0" + +# Hashing pour les clés de cache et signatures +sha1 = "0.10" +hex = "0.4" +md-5 = "0.10" + +# Cache en mémoire avec TTL +moka = { version = "0.12", features = ["future"] } + +# Logging +tracing = "0.1" + +# Gestion du temps +chrono = { version = "0.4", features = ["serde"] } + +# Configuration +pmoconfig = { path = "../pmoconfig" } + +# Intégration avec pmocovers pour le cache d'images (OBLIGATOIRE) +pmocovers = { path = "../pmocovers" } + +# Intégration avec pmoaudiocache pour le cache audio (OBLIGATOIRE) +pmoaudiocache = { path = "../pmoaudiocache" } + +# Intégration avec pmodidl pour l'export DIDL +pmodidl = { path = "../pmodidl" } + +# Intégration avec pmoserver pour l'API HTTP +pmoserver = { path = "../pmoserver", optional = true } +axum = { version = "0.8", optional = true } +rusqlite = { version = "0.37", features = ["bundled"], optional = true } + +# Documentation OpenAPI +utoipa = { version = "5.3", optional = true } + +# Common music source traits +pmosource = { path = "../pmosource" } + +# Playlist management +pmoplaylist = { path = "../pmoplaylist" } +pmocache = { path = "../pmocache" } + +[features] +default = ["async-trait-support"] +# Feature pour activer les extensions pmoserver +pmoserver = ["dep:pmoserver", "dep:axum", "dep:utoipa"] +# Feature pour activer le support serveur (cache registry) +server = ["pmosource/server"] +# Feature cache (deprecated - toujours actif maintenant) +cache = [] +async-trait-support = ["dep:async-trait"] +disk-cache = ["dep:rusqlite", "dep:async-trait"] + +[dev-dependencies] +# Tests +tokio-test = "0.4" +mockito = "1.0" +tempfile = "3.0" +# Pour les exemples +tracing-subscriber = "0.3" +# Pour l'exemple spoofer + +# Specify that the with_cache example requires the cache feature +[[example]] +name = "with_cache" +required-features = ["cache"] diff --git a/pmoserver/Cargo.toml b/pmoserver/Cargo.toml index 27a34529..74c457e5 100644 --- a/pmoserver/Cargo.toml +++ b/pmoserver/Cargo.toml @@ -6,16 +6,16 @@ edition = "2024" [dependencies] pmoconfig = { path = "../pmoconfig", features = ["api"] } -anyhow = "1.0" +anyhow = { workspace = true } axum = "0.8.4" -tokio = { version = "1.35", features = ["rt-multi-thread", "macros", "sync", "time", "signal"] } +tokio = { workspace = true, features = ["rt-multi-thread", "macros", "sync", "time", "signal"] } tokio-stream = "0.1" tokio-util = "0.7" futures-util = "0.3" -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -tracing = "0.1" -tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] } +serde = { workspace = true } +serde_json = { workspace = true } +tracing = { workspace = true } +tracing-subscriber = { workspace = true } futures = "0.3" async-stream = "0.3.6" axum-server = "0.7.2" diff --git a/pmoserver/Cargo.toml.backup b/pmoserver/Cargo.toml.backup new file mode 100644 index 00000000..27a34529 --- /dev/null +++ b/pmoserver/Cargo.toml.backup @@ -0,0 +1,26 @@ +[package] +name = "pmoserver" +version = "0.1.0" +edition = "2024" + +[dependencies] +pmoconfig = { path = "../pmoconfig", features = ["api"] } + +anyhow = "1.0" +axum = "0.8.4" +tokio = { version = "1.35", features = ["rt-multi-thread", "macros", "sync", "time", "signal"] } +tokio-stream = "0.1" +tokio-util = "0.7" +futures-util = "0.3" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +tracing = "0.1" +tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] } +futures = "0.3" +async-stream = "0.3.6" +axum-server = "0.7.2" +axum-embed = "0.1.0" +rust-embed = "8.7.2" +utoipa = { version = "5.4.0", features = ["axum_extras"] } +utoipa-swagger-ui = { version = "9.0.2", features = ["axum", "vendored"] } +once_cell = "1.19" diff --git a/pmosource/Cargo.toml b/pmosource/Cargo.toml index b6f7fc6c..3d452f9f 100644 --- a/pmosource/Cargo.toml +++ b/pmosource/Cargo.toml @@ -11,14 +11,14 @@ categories = ["multimedia"] [dependencies] # Gestion des erreurs -thiserror = "1.0" -anyhow = "1.0" +thiserror = { workspace = true } +anyhow = { workspace = true } # Async traits -async-trait = "0.1" +async-trait = { workspace = true } # Async runtime -tokio = { version = "1.0", features = ["sync", "time"] } +tokio = { workspace = true, features = ["sync", "time"] } # DIDL-Lite support pmodidl = { path = "../pmodidl" } @@ -32,8 +32,8 @@ pmocovers = { path = "../pmocovers", optional = true } pmocache = { path = "../pmocache", optional = true } # Serialization (required for cache metadata) -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" +serde = { workspace = true } +serde_json = { workspace = true } # Server extension (optional) pmoserver = { path = "../pmoserver", optional = true } diff --git a/pmosource/Cargo.toml.backup b/pmosource/Cargo.toml.backup new file mode 100644 index 00000000..d541f70b --- /dev/null +++ b/pmosource/Cargo.toml.backup @@ -0,0 +1,54 @@ +[package] +name = "pmosource" +version = "0.1.0" +edition = "2021" +authors = ["PMOMusic Contributors"] +description = "Common traits and types for PMOMusic sources" +license = "MIT OR Apache-2.0" +repository = "https://github.com/yourusername/pmomusic" +keywords = ["music", "source", "streaming"] +categories = ["multimedia"] + +[dependencies] +# Gestion des erreurs +thiserror = "2.0" +anyhow = "1.0" + +# Async traits +async-trait = "0.1" + +# Async runtime +tokio = { version = "1.0", features = ["sync", "time"] } + +# DIDL-Lite support +pmodidl = { path = "../pmodidl" } + +# Playlist/FIFO support +pmoplaylist = { path = "../pmoplaylist" } + +# Optional cache integrations +pmoaudiocache = { path = "../pmoaudiocache", optional = true } +pmocovers = { path = "../pmocovers", optional = true } +pmocache = { path = "../pmocache", optional = true } + +# Serialization (required for cache metadata) +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" + +# Server extension (optional) +pmoserver = { path = "../pmoserver", optional = true } +pmoconfig = { path = "../pmoconfig", optional = true } +pmoupnp = { path = "../pmoupnp", optional = true } + +# Web framework for API (optional) +axum = { version = "0.8", optional = true } +utoipa = { version = "5.3", optional = true } +tracing = { version = "0.1", optional = true } +lazy_static = { version = "1.4", optional = true } +tokio-stream = { version = "0.1", optional = true, features = ["time"] } +futures = { version = "0.3", optional = true } + +[features] +default = ["cache"] +cache = ["pmoaudiocache", "pmocovers", "pmocache"] +server = ["pmoserver", "pmoconfig", "pmoupnp", "axum", "utoipa", "tracing", "lazy_static", "tokio-stream", "futures"] diff --git a/pmoupnp/Cargo.toml b/pmoupnp/Cargo.toml index 00bb1bfb..99453bb2 100644 --- a/pmoupnp/Cargo.toml +++ b/pmoupnp/Cargo.toml @@ -13,24 +13,24 @@ pmoaudiocache = { path = "../pmoaudiocache", features = ["pmoserver"] } pmoplaylist = { path = "../pmoplaylist", optional = true, features = ["pmoserver"] } pmocache = { path = "../pmocache" } -async-trait = "0.1" +async-trait = { workspace = true } async-recursion = "1.1" url = "2.5.7" uuid = "1.18.1" hex = "0.4.3" base64 = "0.22.1" -thiserror = "2.0.16" -anyhow = "1.0" +thiserror = { workspace = true } +anyhow = { workspace = true } xmltree = "0.11.0" axum = "0.8.4" -tokio = { version = "1.35", features = ["rt-multi-thread", "macros", "sync"] } -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -quick-xml = { version = "0.37.5", features = ["serialize"] } +tokio = { workspace = true, features = ["rt-multi-thread", "macros", "sync"] } +serde = { workspace = true } +serde_json = { workspace = true } +quick-xml = { workspace = true } chrono = { version = "0.4.42", features = ["serde"] } once_cell = "1.20" parking_lot = "0.12" -tracing = "0.1" +tracing = { workspace = true } tracing-subscriber = "0.3" bevy_reflect = "0.17.1" bevy_reflect_derive = "0.17.1" @@ -38,7 +38,7 @@ reqwest = "0.12.23" utoipa = { version = "5.3", features = ["axum_extras"] } socket2 = "0.5" get_if_addrs = "0.5" -serde_yaml = "0.9" +serde_yaml = { workspace = true } [features] default = ["server"] diff --git a/pmoupnp/Cargo.toml.backup b/pmoupnp/Cargo.toml.backup new file mode 100644 index 00000000..25f7b73f --- /dev/null +++ b/pmoupnp/Cargo.toml.backup @@ -0,0 +1,50 @@ +[package] +name = "pmoupnp" +version = "0.1.0" +edition = "2024" + +[dependencies] +pmoconfig = { path = "../pmoconfig" } +pmodidl = { path = "../pmodidl"} +pmoutils = { path = "../pmoutils" } +pmoserver = { path = "../pmoserver" } +pmocovers = { path = "../pmocovers", features = ["pmoserver"] } +pmoaudiocache = { path = "../pmoaudiocache", features = ["pmoserver"] } +pmoplaylist = { path = "../pmoplaylist", optional = true, features = ["pmoserver"] } +pmocache = { path = "../pmocache" } + +async-trait = "0.1" +async-recursion = "1.1" +url = "2.5.7" +uuid = "1.18.1" +hex = "0.4.3" +base64 = "0.22.1" +thiserror = "2.0.16" +anyhow = "1.0" +xmltree = "0.11.0" +axum = "0.8.4" +tokio = { version = "1.35", features = ["rt-multi-thread", "macros", "sync"] } +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +quick-xml = { version = "0.38.3", features = ["serialize"] } +chrono = { version = "0.4.42", features = ["serde"] } +once_cell = "1.20" +parking_lot = "0.12" +tracing = "0.1" +tracing-subscriber = "0.3" +bevy_reflect = "0.17.1" +bevy_reflect_derive = "0.17.1" +reqwest = "0.12.23" +utoipa = { version = "5.3", features = ["axum_extras"] } +socket2 = "0.5" +get_if_addrs = "0.5" +serde_yaml = "0.9" + +[features] +default = ["server"] +server = ["pmoplaylist"] +paradise = [] +qobuz = [] + +[target.'cfg(unix)'.dependencies] +libc = "0.2" diff --git a/pmoutils/Cargo.toml b/pmoutils/Cargo.toml index 49e86a59..dc3e22e3 100644 --- a/pmoutils/Cargo.toml +++ b/pmoutils/Cargo.toml @@ -9,5 +9,5 @@ os_info = "3.8" netstat2 = "0.11" sysinfo = "0.30" users = "0.11" -quick-xml = "0.38.3" +quick-xml = { workspace = true } xmltree = "0.10" diff --git a/pmoutils/Cargo.toml.backup b/pmoutils/Cargo.toml.backup new file mode 100644 index 00000000..49e86a59 --- /dev/null +++ b/pmoutils/Cargo.toml.backup @@ -0,0 +1,13 @@ +[package] +name = "pmoutils" +version = "0.1.0" +edition = "2024" + +[dependencies] +get_if_addrs = "0.5.3" +os_info = "3.8" +netstat2 = "0.11" +sysinfo = "0.30" +users = "0.11" +quick-xml = "0.38.3" +xmltree = "0.10"