Skip to content

Commit 8d0b5f5

Browse files
committed
fix cargo llvm cov
fix cargo llvm cov fix cargo llvm cov
1 parent 9384b81 commit 8d0b5f5

File tree

4 files changed

+161
-3
lines changed

4 files changed

+161
-3
lines changed

.fluentci/src/jobs.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,26 @@ export const test = async (src = ".") => {
125125
.withExec(["cargo", "install", "--path", "."])
126126
.withExec(["sh", "-c", "rm -rf target/*"])
127127
.withExec(["music-player", "scan"])
128+
.withExec([
129+
"rm",
130+
"-rf",
131+
"addons/chromecast",
132+
"addons/dlna",
133+
"addons/kodi",
134+
"addons/local",
135+
"addons/mopidy",
136+
"addons/mpd",
137+
"addons/mpris",
138+
"addons/squeezebox",
139+
"addons/tunein",
140+
])
141+
.withExec(["cp", "Cargo.llvm-cov.toml", "Cargo.toml"])
128142
.withExec([
129143
"sh",
130144
"-c",
131145
"music-player & \
132146
sleep 3 && \
133-
cargo llvm-cov --ignore-filename-regex addons --all-features --lib --workspace --lcov --output-path lcov.info && \
147+
cargo llvm-cov --all-features --lib --workspace --lcov --output-path lcov.info && \
134148
killall -s TERM music-player",
135149
]);
136150

Cargo.llvm-cov.toml

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
[package]
2+
authors = ["Tsiry Sandratraina <[email protected]>"]
3+
categories = ["command-line-utilities"]
4+
description = "An extensible music player daemon written in Rust"
5+
edition = "2021"
6+
keywords = ["tokio", "music", "daemon", "streaming", "player"]
7+
license = "MIT"
8+
name = "music-player"
9+
readme = "README.md"
10+
repository = "https://github.com/tsirysndr/music-player"
11+
version = "0.2.0-alpha.13"
12+
13+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
14+
15+
[workspace]
16+
17+
members = [
18+
"addons",
19+
"audio",
20+
"client",
21+
"discovery",
22+
"entity",
23+
"graphql",
24+
"migration",
25+
"playback",
26+
"scanner",
27+
"server",
28+
"settings",
29+
"storage",
30+
"tracklist",
31+
"types",
32+
"webui",
33+
"webui/musicplayer/src-tauri",
34+
"common/",
35+
"pdk",
36+
"common",
37+
"host_fn",
38+
]
39+
40+
[[bin]]
41+
name = "music-player"
42+
path = "src/main.rs"
43+
44+
[dependencies.music-player-server]
45+
path = "server"
46+
version = "0.2.0"
47+
48+
[dependencies.music-player-playback]
49+
path = "playback"
50+
version = "0.1.13"
51+
52+
[dependencies.music-player-scanner]
53+
path = "scanner"
54+
version = "0.1.9"
55+
56+
[dependencies.music-player-entity]
57+
path = "entity"
58+
version = "0.1.7"
59+
60+
[dependencies.music-player-migration]
61+
path = "migration"
62+
version = "0.1.9"
63+
64+
[dependencies.music-player-settings]
65+
path = "settings"
66+
version = "0.1.5"
67+
68+
[dependencies.music-player-storage]
69+
path = "storage"
70+
version = "0.1.8"
71+
72+
[dependencies.music-player-addons]
73+
path = "addons"
74+
version = "0.1.5"
75+
76+
[dependencies.music-player-tracklist]
77+
path = "tracklist"
78+
version = "0.1.8"
79+
80+
[dependencies.music-player-client]
81+
path = "client"
82+
version = "0.1.5"
83+
84+
[dependencies.music-player-webui]
85+
path = "webui"
86+
version = "0.1.15"
87+
88+
[dependencies.music-player-discovery]
89+
path = "discovery"
90+
version = "0.1.3"
91+
92+
[dependencies.music-player-graphql]
93+
path = "graphql"
94+
version = "0.1.10"
95+
96+
[dependencies.music-player-types]
97+
path = "types"
98+
version = "0.1.6"
99+
100+
[dependencies.music-player-audio]
101+
path = "audio"
102+
version = "0.1.6"
103+
104+
[dependencies.sea-orm-migration]
105+
features = [
106+
# Enable at least one `ASYNC_RUNTIME` and `DATABASE_DRIVER` feature if you want to run migration via CLI.
107+
# View the list of supported features at https://www.sea-ql.org/SeaORM/docs/install-and-config/database-and-async-runtime.
108+
# e.g.
109+
# "runtime-tokio-rustls", # `ASYNC_RUNTIME` feature
110+
# "sqlx-postgres", # `DATABASE_DRIVER` feature
111+
"runtime-tokio-rustls",
112+
"sqlx-sqlite",
113+
]
114+
version = "^0.9.0"
115+
116+
[dependencies]
117+
anyhow = "1.0.67"
118+
clap = "4.5.16"
119+
crossterm = {version = "0.25.0", features = ["serde"]}
120+
dirs = "4.0.0"
121+
extism = "1.5.0"
122+
futures = "0.3.24"
123+
futures-channel = "0.3.24"
124+
lofty = "0.9.0"
125+
md5 = "0.7.0"
126+
music-player-host-fn = {path = "host_fn", version = "0.1.0"}
127+
owo-colors = "3.5.0"
128+
reqwest = {version = "0.12.7", features = ["rustls-tls", "blocking"], default-features = false}
129+
sea-orm = {version = "0.9.2", features = ["runtime-tokio-rustls", "sqlx-sqlite"]}
130+
serde_json = "1.0.85"
131+
spinners = "4.1.0"
132+
tabled = "0.8.0"
133+
time = "0.3.36"
134+
tokio = {version = "1.21.0", features = ["full"]}
135+
tui = {version = "0.19.0", features = ["crossterm", "serde"]}
136+
tungstenite = "0.17.3"
137+
ureq = "2.10.1"

addons/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,13 @@ pub fn load_plugin(module: &str, user_data: &UserData<State>) -> Result<Plugin,
349349
.with_function("get_settings", [], [PTR], user_data.clone(), get_settings)
350350
.with_function("get_addons", [], [PTR], user_data.clone(), get_addons)
351351
.with_function("call", [PTR], [], user_data.clone(), call)
352+
.with_function(
353+
"get_current_track",
354+
[],
355+
[PTR],
356+
user_data.clone(),
357+
get_current_track,
358+
)
352359
.build()?;
353360
Ok(plugin)
354361
}

pdk/src/player.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ extern "ExtismHost" {
1717
fn load_tracklist(tracks: Json<Vec<Track>>);
1818
fn play_next();
1919
fn load(track: Json<Track>);
20-
fn get_current_playback();
20+
fn get_current_track();
2121
fn get_current_tracklist() -> Json<Tracklist>;
2222
fn play_track_at(index: u32);
2323
fn remove_track_at(index: u32);
@@ -85,7 +85,7 @@ impl Player {
8585
}
8686

8787
pub fn get_current_playback(&self) -> Result<(), Error> {
88-
unsafe { get_current_playback() }
88+
unsafe { get_current_track() }
8989
}
9090

9191
pub fn get_current_tracklist(&self) -> Result<Json<Tracklist>, Error> {

0 commit comments

Comments
 (0)