From c6ac0878a72f500ea0c64f1fb24cb05af8f8c7b9 Mon Sep 17 00:00:00 2001 From: Qstick Date: Wed, 21 Jun 2017 21:45:07 -0400 Subject: [PATCH] Fix Crash due to ForeignArtistId not being in DB for TrackFile Table Fix Crash due to ForeignArtistId not being in DB for TrackFile Table --- src/NzbDrone.Core/MediaFiles/TrackFile.cs | 4 ++-- .../MediaFiles/TrackImport/ImportApprovedTracks.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core/MediaFiles/TrackFile.cs b/src/NzbDrone.Core/MediaFiles/TrackFile.cs index 6f46eaee7..9aab9a655 100644 --- a/src/NzbDrone.Core/MediaFiles/TrackFile.cs +++ b/src/NzbDrone.Core/MediaFiles/TrackFile.cs @@ -12,8 +12,8 @@ namespace NzbDrone.Core.MediaFiles { public class TrackFile : ModelBase { - public string ForeignTrackId { get; set; } - public string ForeignArtistId { get; set; } + //public string ForeignTrackId { get; set; } + //public string ForeignArtistId { get; set; } public int AlbumId { get; set; } public int ArtistId { get; set; } public string RelativePath { get; set; } diff --git a/src/NzbDrone.Core/MediaFiles/TrackImport/ImportApprovedTracks.cs b/src/NzbDrone.Core/MediaFiles/TrackImport/ImportApprovedTracks.cs index fe45e064a..e38c27ca8 100644 --- a/src/NzbDrone.Core/MediaFiles/TrackImport/ImportApprovedTracks.cs +++ b/src/NzbDrone.Core/MediaFiles/TrackImport/ImportApprovedTracks.cs @@ -73,7 +73,7 @@ namespace NzbDrone.Core.MediaFiles.TrackImport var trackFile = new TrackFile(); trackFile.DateAdded = DateTime.UtcNow; - trackFile.ForeignArtistId = localTrack.Artist.ForeignArtistId; + trackFile.ArtistId = localTrack.Artist.Id; trackFile.Path = localTrack.Path.CleanFilePath(); trackFile.Size = _diskProvider.GetFileSize(localTrack.Path); trackFile.Quality = localTrack.Quality;