Updated icarus-model #33
@@ -501,7 +501,7 @@ impl CommitManager {
|
|||||||
// Apply directory
|
// Apply directory
|
||||||
for song in &mut album.songs {
|
for song in &mut album.songs {
|
||||||
let dir = &song.directory;
|
let dir = &song.directory;
|
||||||
song.directory = directory.clone();
|
song.directory = directory.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply filename
|
// Apply filename
|
||||||
@@ -513,9 +513,9 @@ impl CommitManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for song in &mut album.songs {
|
for song in &mut album.songs {
|
||||||
song.album = album.title.clone();
|
song.album = album.title.clone();
|
||||||
song.genre = (album.genre.clone());
|
song.genre = (album.genre.clone());
|
||||||
song.year = (album.year.clone());
|
song.year = (album.year.clone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -54,7 +54,7 @@ impl Default for Album {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
impl Default for Song {
|
impl Default for Song {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Song {
|
Song {
|
||||||
|
|||||||
+10
-3
@@ -56,10 +56,13 @@ impl Upload {
|
|||||||
let mut new_song = self.initialize_song(&song, &album);
|
let mut new_song = self.initialize_song(&song, &album);
|
||||||
match song.song_path() {
|
match song.song_path() {
|
||||||
Ok(p) => {
|
Ok(p) => {
|
||||||
new_song.songpath = p;
|
new_song.songpath = p;
|
||||||
}
|
}
|
||||||
Err(er) => {
|
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();
|
let access_token = token.bearer_token();
|
||||||
@@ -179,7 +182,11 @@ impl Upload {
|
|||||||
return url;
|
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();
|
let dur = song.duration.clone();
|
||||||
println!("Duration: {}", dur);
|
println!("Duration: {}", dur);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user