Compare commits

..

1 Commits

Author SHA1 Message Date
2b2e96c02d Merge pull request 'devel' (#16) from devel into main
All checks were successful
Rust Build / Check (push) Successful in 26s
Rust Build / Test Suite (push) Successful in 26s
Rust Build / Rustfmt (push) Successful in 26s
Rust Build / Clippy (push) Successful in 26s
Rust Build / build (push) Successful in 26s
Release Tagging / release (push) Successful in 28s
Reviewed-on: phoenix/icarus-models#16
2025-03-22 21:24:15 +00:00
3 changed files with 10 additions and 25 deletions

View File

@@ -1,14 +1,5 @@
pub mod file_extensions { pub const DEFAULTMUSICEXTENSION: &str = FLACEXTENSION;
pub mod audio { pub const FLACEXTENSION: &str = ".flac";
pub const DEFAULTMUSICEXTENSION: &str = FLACEXTENSION; pub const WAVEXTENSION: &str = ".wav";
pub const FLACEXTENSION: &str = ".flac"; pub const MPTHREEEXTENSION: &str = ".mp3";
pub const WAVEXTENSION: &str = ".wav"; pub const JPGEXTENSION: &str = ".jpg";
pub const MPTHREEEXTENSION: &str = ".mp3";
}
pub mod image {
pub const JPGEXTENSION: &str = ".jpg";
pub const JPEGEXTENSION: &str = ".jpeg";
pub const PNGEXTENSION: &str = ".png";
}
}

View File

@@ -2,7 +2,7 @@ use std::io::Read;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Default, Deserialize, Serialize)] #[derive(Debug, Clone, Deserialize, Serialize)]
pub struct CoverArt { pub struct CoverArt {
pub id: i32, pub id: i32,
pub title: String, pub title: String,

View File

@@ -128,18 +128,12 @@ impl Song {
let file_extension = match typ { let file_extension = match typ {
types::MusicTypes::DefaultMusicExtension => { types::MusicTypes::DefaultMusicExtension => {
String::from(constants::file_extensions::audio::DEFAULTMUSICEXTENSION) String::from(constants::DEFAULTMUSICEXTENSION)
} }
types::MusicTypes::WavExtension => { types::MusicTypes::WavExtension => String::from(constants::WAVEXTENSION),
String::from(constants::file_extensions::audio::WAVEXTENSION) types::MusicTypes::FlacExtension => String::from(constants::FLACEXTENSION),
} types::MusicTypes::MPThreeExtension => String::from(constants::MPTHREEEXTENSION),
types::MusicTypes::FlacExtension => {
String::from(constants::file_extensions::audio::FLACEXTENSION)
}
types::MusicTypes::MPThreeExtension => {
String::from(constants::file_extensions::audio::MPTHREEEXTENSION)
}
}; };
if randomize { if randomize {