Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ecd025346c | |||
| 74184fa022 | |||
| c2a2ca049d |
@@ -2,9 +2,9 @@ name: Rust
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "master" ]
|
branches: [ "main" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "master", "icarus_v2_support" ]
|
branches: [ "main" ]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
@@ -15,9 +15,9 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
- name: Install Rust version
|
- name: Install Rust version
|
||||||
run: rustup install 1.88.0 && rustup default 1.88.0
|
run: rustup install 1.90.0 && rustup default 1.90.0
|
||||||
|
|
||||||
- name: Debug secret
|
- name: Debug secret
|
||||||
run: echo "${{ secrets.MYREPO_TOKEN }}" | head -c 10 ; echo "..."
|
run: echo "${{ secrets.MYREPO_TOKEN }}" | head -c 10 ; echo "..."
|
||||||
|
|||||||
Generated
+332
-300
File diff suppressed because it is too large
Load Diff
+9
-9
@@ -1,17 +1,17 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "icarus-dm"
|
name = "icarus-dm"
|
||||||
version = "0.7.0"
|
version = "0.8.0"
|
||||||
rust-version = "1.88"
|
rust-version = "1.90"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
[dependencies]
|
[dependencies]
|
||||||
futures = { version = "0.3.31" }
|
futures = { version = "0.3.31" }
|
||||||
http = { version = "1.3.1" }
|
http = { version = "1.3.1" }
|
||||||
reqwest = { version = "0.12.20", features = ["json", "blocking", "multipart", "stream"] }
|
reqwest = { version = "0.12.23", features = ["json", "blocking", "multipart", "stream"] }
|
||||||
serde = { version = "1.0.219", features = ["derive"] }
|
serde = { version = "1.0.228", features = ["derive"] }
|
||||||
serde_json = "1.0.140"
|
serde_json = "1.0.145"
|
||||||
tokio = { version = "1.45.1", features = ["full"] }
|
tokio = { version = "1.47.1", features = ["full"] }
|
||||||
tokio-util = { version = "0.7.15", features = ["codec"] }
|
tokio-util = { version = "0.7.16", features = ["codec"] }
|
||||||
uuid = { version = "1.17.0", features = ["v4", "serde"] }
|
uuid = { version = "1.18.1", features = ["v4", "serde"] }
|
||||||
icarus_models = { git = "ssh://git@git.kundeng.us/phoenix/icarus_models.git", tag = "v0.5.6" }
|
icarus_models = { git = "ssh://git@git.kundeng.us/phoenix/icarus_models.git", tag = "v0.7.0-70-f0a716b243-111" }
|
||||||
|
|||||||
+1
-1
@@ -63,7 +63,7 @@ mod tests {
|
|||||||
match managers::commit_manager::retrieve_song(
|
match managers::commit_manager::retrieve_song(
|
||||||
&album, track, disc, &directory, &filename,
|
&album, track, disc, &directory, &filename,
|
||||||
) {
|
) {
|
||||||
Ok(song) => match song.to_data() {
|
Ok(song) => match icarus_models::song::io::to_data(&song) {
|
||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
print!("Success");
|
print!("Success");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -373,15 +373,16 @@ impl CommitManager {
|
|||||||
println!("Directory: {:?}", s.directory);
|
println!("Directory: {:?}", s.directory);
|
||||||
println!("Filename: {:?}", s.filename);
|
println!("Filename: {:?}", s.filename);
|
||||||
println!("Path: {:?}", s.song_path());
|
println!("Path: {:?}", s.song_path());
|
||||||
s.data = s.to_data().unwrap();
|
s.data = icarus_models::song::io::to_data(&s).unwrap();
|
||||||
|
|
||||||
cover_art.data = cover_art.to_data().unwrap();
|
cover_art.data =
|
||||||
|
icarus_models::coverart::io::to_data(&cover_art).unwrap();
|
||||||
|
|
||||||
let members = UploadSongMembers {
|
let members = UploadSongMembers {
|
||||||
song: s,
|
song: s,
|
||||||
coverart: cover_art,
|
coverart: cover_art,
|
||||||
token: token,
|
token,
|
||||||
album: album,
|
album,
|
||||||
};
|
};
|
||||||
|
|
||||||
match self.upload_song_process(&members).await {
|
match self.upload_song_process(&members).await {
|
||||||
@@ -547,14 +548,14 @@ impl CommitManager {
|
|||||||
let host = self.ica_action.retrieve_flag_value(&String::from("-h"));
|
let host = self.ica_action.retrieve_flag_value(&String::from("-h"));
|
||||||
up.set_api(&host);
|
up.set_api(&host);
|
||||||
|
|
||||||
cover_art.data = cover_art.to_data().unwrap();
|
cover_art.data = icarus_models::coverart::io::to_data(&cover_art).unwrap();
|
||||||
|
|
||||||
match self.get_songs(&metadatapath, sourcepath) {
|
match self.get_songs(&metadatapath, sourcepath) {
|
||||||
Ok(sngs) => match icarus_models::album::collection::parse_album(&metadatapath) {
|
Ok(sngs) => match icarus_models::album::collection::parse_album(&metadatapath) {
|
||||||
Ok(album) => {
|
Ok(album) => {
|
||||||
for song in sngs {
|
for song in sngs {
|
||||||
let members = UploadSongMembers {
|
let members = UploadSongMembers {
|
||||||
song: song,
|
song,
|
||||||
coverart: cover_art.clone(),
|
coverart: cover_art.clone(),
|
||||||
token: token.clone(),
|
token: token.clone(),
|
||||||
album: album.clone(),
|
album: album.clone(),
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
pub mod api;
|
pub mod api;
|
||||||
pub mod flags;
|
pub mod flags;
|
||||||
pub mod icarus_action;
|
pub mod icarus_action;
|
||||||
pub mod upload_form;
|
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
use std::default::Default;
|
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
#[derive(Debug, Default, Deserialize, Serialize)]
|
|
||||||
pub struct UploadForm {
|
|
||||||
pub url: Option<String>,
|
|
||||||
pub filepath: Option<String>,
|
|
||||||
}
|
|
||||||
@@ -1,32 +1,3 @@
|
|||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize)]
|
|
||||||
pub struct Checks {}
|
|
||||||
|
|
||||||
impl Checks {
|
|
||||||
pub fn _is_numeric(text: &str) -> bool {
|
|
||||||
text.parse::<f64>().is_ok()
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn _index_of_item_in_container<F>(container: &str, item: &char, func: F) -> i32
|
|
||||||
where
|
|
||||||
F: Fn(&char, &char) -> bool,
|
|
||||||
{
|
|
||||||
let mut index = -1;
|
|
||||||
|
|
||||||
for c in container.chars() {
|
|
||||||
if func(&c, item) {
|
|
||||||
index += 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
index += 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
index
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn exit_program(code: i32) {
|
pub fn exit_program(code: i32) {
|
||||||
std::process::exit(code);
|
std::process::exit(code);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user