Compare commits
1 Commits
v0.1.14-de
...
v0.1.14-v0
Author | SHA1 | Date | |
---|---|---|---|
2b2e96c02d |
@@ -1,14 +1,5 @@
|
||||
pub mod file_extensions {
|
||||
pub mod audio {
|
||||
pub const DEFAULTMUSICEXTENSION: &str = FLACEXTENSION;
|
||||
pub const FLACEXTENSION: &str = ".flac";
|
||||
pub const WAVEXTENSION: &str = ".wav";
|
||||
pub const MPTHREEEXTENSION: &str = ".mp3";
|
||||
}
|
||||
|
||||
pub mod image {
|
||||
pub const JPGEXTENSION: &str = ".jpg";
|
||||
pub const JPEGEXTENSION: &str = ".jpeg";
|
||||
pub const PNGEXTENSION: &str = ".png";
|
||||
}
|
||||
}
|
||||
pub const DEFAULTMUSICEXTENSION: &str = FLACEXTENSION;
|
||||
pub const FLACEXTENSION: &str = ".flac";
|
||||
pub const WAVEXTENSION: &str = ".wav";
|
||||
pub const MPTHREEEXTENSION: &str = ".mp3";
|
||||
pub const JPGEXTENSION: &str = ".jpg";
|
||||
|
@@ -2,7 +2,7 @@ use std::io::Read;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[derive(Debug, Clone, Deserialize, Serialize)]
|
||||
pub struct CoverArt {
|
||||
pub id: i32,
|
||||
pub title: String,
|
||||
|
14
src/song.rs
14
src/song.rs
@@ -128,18 +128,12 @@ impl Song {
|
||||
|
||||
let file_extension = match typ {
|
||||
types::MusicTypes::DefaultMusicExtension => {
|
||||
String::from(constants::file_extensions::audio::DEFAULTMUSICEXTENSION)
|
||||
String::from(constants::DEFAULTMUSICEXTENSION)
|
||||
}
|
||||
|
||||
types::MusicTypes::WavExtension => {
|
||||
String::from(constants::file_extensions::audio::WAVEXTENSION)
|
||||
}
|
||||
types::MusicTypes::FlacExtension => {
|
||||
String::from(constants::file_extensions::audio::FLACEXTENSION)
|
||||
}
|
||||
types::MusicTypes::MPThreeExtension => {
|
||||
String::from(constants::file_extensions::audio::MPTHREEEXTENSION)
|
||||
}
|
||||
types::MusicTypes::WavExtension => String::from(constants::WAVEXTENSION),
|
||||
types::MusicTypes::FlacExtension => String::from(constants::FLACEXTENSION),
|
||||
types::MusicTypes::MPThreeExtension => String::from(constants::MPTHREEEXTENSION),
|
||||
};
|
||||
|
||||
if randomize {
|
||||
|
Reference in New Issue
Block a user