Code formatting

This commit is contained in:
phoenix
2025-03-15 18:03:05 -04:00
parent 554be00bce
commit 083556ccd0
3 changed files with 15 additions and 8 deletions
+4 -4
View File
@@ -501,7 +501,7 @@ impl CommitManager {
// Apply directory
for song in &mut album.songs {
let dir = &song.directory;
song.directory = directory.clone();
song.directory = directory.clone();
}
// Apply filename
@@ -513,9 +513,9 @@ impl CommitManager {
}
for song in &mut album.songs {
song.album = album.title.clone();
song.genre = (album.genre.clone());
song.year = (album.year.clone());
song.album = album.title.clone();
song.genre = (album.genre.clone());
song.year = (album.year.clone());
}
}
+10 -3
View File
@@ -56,10 +56,13 @@ impl Upload {
let mut new_song = self.initialize_song(&song, &album);
match song.song_path() {
Ok(p) => {
new_song.songpath = p;
new_song.songpath = p;
}
Err(er) => {
return Err(std::io::Error::new(std::io::ErrorKind::Other, "Error with song path"));
return Err(std::io::Error::new(
std::io::ErrorKind::Other,
"Error with song path",
));
}
}
let access_token = token.bearer_token();
@@ -179,7 +182,11 @@ impl Upload {
return url;
}
fn initialize_song(&self, song: &icarus_models::song::Song, album: &models::song::Album) -> Song {
fn initialize_song(
&self,
song: &icarus_models::song::Song,
album: &models::song::Album,
) -> Song {
let dur = song.duration.clone();
println!("Duration: {}", dur);