Added file extension constant and updated constants module #17
14
src/song.rs
14
src/song.rs
@@ -128,12 +128,18 @@ impl Song {
|
|||||||
|
|
||||||
let file_extension = match typ {
|
let file_extension = match typ {
|
||||||
types::MusicTypes::DefaultMusicExtension => {
|
types::MusicTypes::DefaultMusicExtension => {
|
||||||
String::from(constants::DEFAULTMUSICEXTENSION)
|
String::from(constants::file_extensions::audio::DEFAULTMUSICEXTENSION)
|
||||||
}
|
}
|
||||||
|
|
||||||
types::MusicTypes::WavExtension => String::from(constants::WAVEXTENSION),
|
types::MusicTypes::WavExtension => {
|
||||||
types::MusicTypes::FlacExtension => String::from(constants::FLACEXTENSION),
|
String::from(constants::file_extensions::audio::WAVEXTENSION)
|
||||||
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 {
|
||||||
|
Reference in New Issue
Block a user