Code formatting
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ impl Default for Album {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
impl Default for Song {
|
||||
fn default() -> Self {
|
||||
Song {
|
||||
|
||||
+10
-3
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user