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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user