mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-01-28 03:26:32 +00:00
New: Only scan files that are new or updated (#760)
* New: Only scan files that are new or updated Pass through filter correctly Add more tests Add tests for migration 30 * Fix windows disk provider * Don't publish deleted event for unmapped file * Fix test on windows
This commit is contained in:
@@ -150,7 +150,6 @@ namespace Lidarr.Api.V1.TrackFiles
|
||||
}
|
||||
|
||||
var artist = trackFile.Artist.Value;
|
||||
var fullPath = Path.Combine(artist.Path, trackFile.RelativePath);
|
||||
|
||||
_mediaFileDeletionService.DeleteTrackFile(artist, trackFile);
|
||||
}
|
||||
@@ -163,8 +162,6 @@ namespace Lidarr.Api.V1.TrackFiles
|
||||
|
||||
foreach (var trackFile in trackFiles)
|
||||
{
|
||||
var fullPath = Path.Combine(artist.Path, trackFile.RelativePath);
|
||||
|
||||
_mediaFileDeletionService.DeleteTrackFile(artist, trackFile);
|
||||
}
|
||||
|
||||
@@ -173,6 +170,12 @@ namespace Lidarr.Api.V1.TrackFiles
|
||||
|
||||
public void Handle(TrackFileAddedEvent message)
|
||||
{
|
||||
// don't process files that are added but not matched
|
||||
if (message.TrackFile.AlbumId == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
BroadcastResourceChange(ModelAction.Updated, message.TrackFile.ToResource(message.TrackFile.Artist.Value, _upgradableSpecification));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user