Track Parsing Code (#10)

* We now have the ability to import local tracks into Lidarr. Switching to IDv3 tag reading over custom parsing for local tracks.

* Stable code for track refresh.

* RefreshArtist and RescanArtist events are working correctly. Need to add potential rejection decisions in future.

* Implemented code comments

* PR comments and fixing some odd db bugs.

* Fix some conflicts after Unit Test PR Merge

Fix some conflicts after Unit Test PR Merge

* Track/Album Add and Update Fixes

Track/Album Add and Update Fixes

* Fixed an issue with trackimport looking up trackId instead of artistId

* Add Handle to TrackService for TrackAddedEvent

Add Handle to TrackService for TrackAddedEvent

* Update Quality Regex, Store BitRateMode in TrackFile

Update Quality Regex, Store BitRateMode in TrackFile
This commit is contained in:
Joseph Milazzo
2017-07-03 13:39:06 -05:00
committed by GitHub
parent 4cfd39f7fe
commit ef4da4ac9f
99 changed files with 838 additions and 1023 deletions
@@ -55,7 +55,7 @@ namespace NzbDrone.Core.MediaFiles
public void Delete(TrackFile trackFile, DeleteMediaFileReason reason)
{
//Little hack so we have the tracks and artist attached for the event consumers
trackFile.Episodes.LazyLoad();
trackFile.Tracks.LazyLoad();
trackFile.Path = Path.Combine(trackFile.Artist.Value.Path, trackFile.RelativePath);
_mediaFileRepository.Delete(trackFile);
@@ -70,7 +70,6 @@ namespace NzbDrone.Core.MediaFiles
public List<string> FilterExistingFiles(List<string> files, Artist artist)
{
//var artistFiles = GetFilesByArtist(artist.ForeignArtistId).Select(f => Path.Combine(artist.Path, f.RelativePath)).ToList();
var artistFiles = GetFilesByArtist(artist.Id).Select(f => Path.Combine(artist.Path, f.RelativePath)).ToList();
if (!artistFiles.Any()) return files;
@@ -80,7 +79,6 @@ namespace NzbDrone.Core.MediaFiles
public TrackFile Get(int id)
{
// TODO: Should this be spotifyID or DB Id?
return _mediaFileRepository.Get(id);
}