Continuing work on updating a song's record whenever attributes or metadata are updated. Running into an issue where the Song record is deleted during an update after the other records have been updated (artist record, album record, genre record, etc.). I believe I have narrowed it down to the Genre id and Year Id of the song not being updated. #37

This commit is contained in:
amazing-username
2019-05-19 21:48:03 -04:00
parent 991d2e0d6a
commit c9e8e2c6da
7 changed files with 289 additions and 33 deletions
-17
View File
@@ -127,23 +127,6 @@ namespace Icarus.Controllers
yearStore);
return Ok("song exists");
var oldSongRecord = context.GetSong(id);
song.SongPath = oldSongRecord.SongPath;
MetadataRetriever updateMetadata = new MetadataRetriever();
updateMetadata.UpdateMetadata(song, oldSongRecord);
var updatedSong = updateMetadata.UpdatedSongRecord;
context.UpdateSong(updatedSong);
SongResult songResult = new SongResult
{
Message = updateMetadata.Message,
SongTitle = updatedSong.Title
};
return Ok(songResult);
}
}
}