When song is uploaded the response returned is info about the song and a response

This commit is contained in:
kdeng00
2019-10-22 20:30:43 -04:00
parent 5fefc451d5
commit e764bc45de
4 changed files with 8 additions and 23 deletions
+1
View File
@@ -31,6 +31,7 @@ namespace dto { namespace conversion {
result->album = (!song.album.empty()) ? song.album.c_str() : "";
result->artist = (!song.artist.empty()) ? song.artist.c_str() : "";
result->genre = (!song.genre.empty()) ? song.genre.c_str() : "";
result->duration = (song.duration != 0) ? song.duration : 0;
result->year = (song.year != 0) ? song.year : 0;
result->track = (song.track != 0) ? song.track : 0;
result->disc = (song.disc != 0) ? song.disc : 0;
+1
View File
@@ -83,6 +83,7 @@ void manager::SongManager::saveSong(model::Song& song)
database::SongRepository songRepo(m_bConf);
songRepo.saveRecord(song);
song = songRepo.retrieveRecord(song, type::SongFilter::title);
}
void manager::SongManager::deleteSong(model::Song& song)