tsk-79: Create function to generate CoverArt filename (#80)
All checks were successful
Release Tagging / release (push) Successful in 31s
Rust Build / Check (push) Successful in 34s
Rust Build / Test Suite (push) Successful in 50s
Rust Build / Rustfmt (push) Successful in 23s
Rust Build / Clippy (push) Successful in 33s
Rust Build / build (push) Successful in 43s

Closes #79

Reviewed-on: #80
Co-authored-by: phoenix <kundeng00@pm.me>
Co-committed-by: phoenix <kundeng00@pm.me>
This commit was merged in pull request #80.
This commit is contained in:
2025-10-24 16:19:38 +00:00
committed by phoenix
parent 860d684e7b
commit 02b6157e0d
5 changed files with 48 additions and 5 deletions

View File

@@ -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)
}