diff --git a/.fluentci/src/jobs.ts b/.fluentci/src/jobs.ts index c4b7315..2b8fbc5 100644 --- a/.fluentci/src/jobs.ts +++ b/.fluentci/src/jobs.ts @@ -125,12 +125,26 @@ export const test = async (src = ".") => { .withExec(["cargo", "install", "--path", "."]) .withExec(["sh", "-c", "rm -rf target/*"]) .withExec(["music-player", "scan"]) + .withExec([ + "rm", + "-rf", + "addons/chromecast", + "addons/dlna", + "addons/kodi", + "addons/local", + "addons/mopidy", + "addons/mpd", + "addons/mpris", + "addons/squeezebox", + "addons/tunein", + ]) + .withExec(["cp", "Cargo.llvm-cov.toml", "Cargo.toml"]) .withExec([ "sh", "-c", "music-player & \ sleep 3 && \ - cargo llvm-cov --ignore-filename-regex addons --all-features --lib --workspace --lcov --output-path lcov.info && \ + cargo llvm-cov --all-features --lib --workspace --lcov --output-path lcov.info && \ killall -s TERM music-player", ]); diff --git a/Cargo.llvm-cov.toml b/Cargo.llvm-cov.toml new file mode 100644 index 0000000..5a2e298 --- /dev/null +++ b/Cargo.llvm-cov.toml @@ -0,0 +1,137 @@ +[package] +authors = ["Tsiry Sandratraina "] +categories = ["command-line-utilities"] +description = "An extensible music player daemon written in Rust" +edition = "2021" +keywords = ["tokio", "music", "daemon", "streaming", "player"] +license = "MIT" +name = "music-player" +readme = "README.md" +repository = "https://github.com/tsirysndr/music-player" +version = "0.2.0-alpha.13" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[workspace] + +members = [ + "addons", + "audio", + "client", + "discovery", + "entity", + "graphql", + "migration", + "playback", + "scanner", + "server", + "settings", + "storage", + "tracklist", + "types", + "webui", + "webui/musicplayer/src-tauri", + "common/", + "pdk", + "common", + "host_fn", +] + +[[bin]] +name = "music-player" +path = "src/main.rs" + +[dependencies.music-player-server] +path = "server" +version = "0.2.0" + +[dependencies.music-player-playback] +path = "playback" +version = "0.1.13" + +[dependencies.music-player-scanner] +path = "scanner" +version = "0.1.9" + +[dependencies.music-player-entity] +path = "entity" +version = "0.1.7" + +[dependencies.music-player-migration] +path = "migration" +version = "0.1.9" + +[dependencies.music-player-settings] +path = "settings" +version = "0.1.5" + +[dependencies.music-player-storage] +path = "storage" +version = "0.1.8" + +[dependencies.music-player-addons] +path = "addons" +version = "0.1.5" + +[dependencies.music-player-tracklist] +path = "tracklist" +version = "0.1.8" + +[dependencies.music-player-client] +path = "client" +version = "0.1.5" + +[dependencies.music-player-webui] +path = "webui" +version = "0.1.15" + +[dependencies.music-player-discovery] +path = "discovery" +version = "0.1.3" + +[dependencies.music-player-graphql] +path = "graphql" +version = "0.1.10" + +[dependencies.music-player-types] +path = "types" +version = "0.1.6" + +[dependencies.music-player-audio] +path = "audio" +version = "0.1.6" + +[dependencies.sea-orm-migration] +features = [ + # Enable at least one `ASYNC_RUNTIME` and `DATABASE_DRIVER` feature if you want to run migration via CLI. + # View the list of supported features at https://www.sea-ql.org/SeaORM/docs/install-and-config/database-and-async-runtime. + # e.g. + # "runtime-tokio-rustls", # `ASYNC_RUNTIME` feature + # "sqlx-postgres", # `DATABASE_DRIVER` feature + "runtime-tokio-rustls", + "sqlx-sqlite", +] +version = "^0.9.0" + +[dependencies] +anyhow = "1.0.67" +clap = "4.5.16" +crossterm = {version = "0.25.0", features = ["serde"]} +dirs = "4.0.0" +extism = "1.5.0" +futures = "0.3.24" +futures-channel = "0.3.24" +lofty = "0.9.0" +md5 = "0.7.0" +music-player-host-fn = {path = "host_fn", version = "0.1.0"} +owo-colors = "3.5.0" +reqwest = {version = "0.12.7", features = ["rustls-tls", "blocking"], default-features = false} +sea-orm = {version = "0.9.2", features = ["runtime-tokio-rustls", "sqlx-sqlite"]} +serde_json = "1.0.85" +spinners = "4.1.0" +tabled = "0.8.0" +time = "0.3.36" +tokio = {version = "1.21.0", features = ["full"]} +tui = {version = "0.19.0", features = ["crossterm", "serde"]} +tungstenite = "0.17.3" +ureq = "2.10.1" diff --git a/addons/src/lib.rs b/addons/src/lib.rs index a88fcdc..53448cb 100644 --- a/addons/src/lib.rs +++ b/addons/src/lib.rs @@ -349,6 +349,13 @@ pub fn load_plugin(module: &str, user_data: &UserData) -> Result>); fn play_next(); fn load(track: Json); - fn get_current_playback(); + fn get_current_track(); fn get_current_tracklist() -> Json; fn play_track_at(index: u32); fn remove_track_at(index: u32); @@ -85,7 +85,7 @@ impl Player { } pub fn get_current_playback(&self) -> Result<(), Error> { - unsafe { get_current_playback() } + unsafe { get_current_track() } } pub fn get_current_tracklist(&self) -> Result, Error> {