From a51b5624873f260e2e5b0225905df2d2a1f01991 Mon Sep 17 00:00:00 2001 From: Paul Lietar Date: Thu, 3 Aug 2017 20:10:48 +0100 Subject: [PATCH] Create new librespot-metadata crate --- Cargo.lock | 13 +++++++++++++ Cargo.toml | 7 ++++--- metadata/Cargo.toml | 15 +++++++++++++++ src/album_cover.rs => metadata/src/cover.rs | 0 src/metadata.rs => metadata/src/lib.rs | 12 ++++++++++-- metadata/src/metadata.rs | 0 src/lib.rs | 3 +-- 7 files changed, 43 insertions(+), 7 deletions(-) create mode 100644 metadata/Cargo.toml rename src/album_cover.rs => metadata/src/cover.rs (100%) rename src/metadata.rs => metadata/src/lib.rs (96%) create mode 100644 metadata/src/metadata.rs diff --git a/Cargo.lock b/Cargo.lock index 2e5ac65..575e3cb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -254,6 +254,7 @@ dependencies = [ "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "libpulse-sys 0.0.0 (git+https://github.com/astro/libpulse-sys)", "librespot-core 0.1.0", + "librespot-metadata 0.1.0", "librespot-protocol 0.1.0", "linear-map 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -325,6 +326,18 @@ dependencies = [ "vorbis 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "librespot-metadata" +version = "0.1.0" +dependencies = [ + "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "librespot-core 0.1.0", + "librespot-protocol 0.1.0", + "linear-map 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "linear-map" version = "1.1.0" diff --git a/Cargo.toml b/Cargo.toml index 6199505..248cbd0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,11 +20,12 @@ name = "librespot" path = "src/main.rs" doc = false -[dependencies.librespot-protocol] -path = "protocol" - [dependencies.librespot-core] path = "core" +[dependencies.librespot-metadata] +path = "metadata" +[dependencies.librespot-protocol] +path = "protocol" [dependencies] base64 = "0.5.0" diff --git a/metadata/Cargo.toml b/metadata/Cargo.toml new file mode 100644 index 0000000..40b23fc --- /dev/null +++ b/metadata/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "librespot-metadata" +version = "0.1.0" +authors = ["Paul Lietar "] + +[dependencies] +byteorder = "1.0" +futures = "0.1.8" +linear-map = "1.0" +protobuf = "1.1" + +[dependencies.librespot-core] +path = "../core" +[dependencies.librespot-protocol] +path = "../protocol" diff --git a/src/album_cover.rs b/metadata/src/cover.rs similarity index 100% rename from src/album_cover.rs rename to metadata/src/cover.rs diff --git a/src/metadata.rs b/metadata/src/lib.rs similarity index 96% rename from src/metadata.rs rename to metadata/src/lib.rs index d1aee40..283e8b5 100644 --- a/src/metadata.rs +++ b/metadata/src/lib.rs @@ -1,9 +1,17 @@ +pub extern crate librespot_core as core; +pub extern crate librespot_protocol as protocol; + +extern crate byteorder; +extern crate futures; +extern crate linear_map; +extern crate protobuf; + +pub mod cover; + use futures::{Future, BoxFuture}; use linear_map::LinearMap; -use protobuf; use core::mercury::MercuryError; -use protocol; use core::session::Session; use core::util::{SpotifyId, FileId, StrChunksExt}; diff --git a/metadata/src/metadata.rs b/metadata/src/metadata.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/lib.rs b/src/lib.rs index f070a07..37caeed 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -34,6 +34,7 @@ extern crate uuid; pub extern crate librespot_core as core; pub extern crate librespot_protocol as protocol; +pub extern crate librespot_metadata as metadata; #[cfg(not(feature = "with-tremor"))] extern crate vorbis; @@ -49,13 +50,11 @@ extern crate portaudio_rs; #[cfg(feature = "libpulse-sys")] extern crate libpulse_sys; -pub mod album_cover; pub mod audio_backend; pub mod audio_decrypt; pub mod audio_file; pub mod discovery; pub mod keymaster; -pub mod metadata; pub mod mixer; pub mod player;