tsk-79: Create function to generate CoverArt filename (#80)
Closes #79 Reviewed-on: #80 Co-authored-by: phoenix <kundeng00@pm.me> Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
+1
-3
@@ -129,14 +129,12 @@ impl Song {
|
||||
}
|
||||
}
|
||||
|
||||
/// Generates a filename. In order to save a song to the filesystem, the song must have
|
||||
/// a directory and filename
|
||||
/// Generates a filename. In order to save a song to the filesystem
|
||||
pub fn generate_filename(typ: types::MusicTypes, randomize: bool) -> String {
|
||||
let file_extension = match typ {
|
||||
types::MusicTypes::DefaultMusicExtension => {
|
||||
String::from(constants::file_extensions::audio::DEFAULTMUSICEXTENSION)
|
||||
}
|
||||
|
||||
types::MusicTypes::WavExtension => {
|
||||
String::from(constants::file_extensions::audio::WAVEXTENSION)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user