mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 13:10:13 -07: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:
parent
8fe8aec97c
commit
166fc90454
95 changed files with 1590 additions and 723 deletions
|
@ -66,7 +66,7 @@ namespace NzbDrone.Core.MediaFiles
|
|||
var tracks = _trackService.GetTracksByFileId(trackFile.Id);
|
||||
var album = _albumService.GetAlbum(trackFile.AlbumId);
|
||||
var newFileName = _buildFileNames.BuildTrackFileName(tracks, artist, album, trackFile);
|
||||
var filePath = _buildFileNames.BuildTrackFilePath(artist, album, newFileName, Path.GetExtension(trackFile.RelativePath));
|
||||
var filePath = _buildFileNames.BuildTrackFilePath(artist, album, newFileName, Path.GetExtension(trackFile.Path));
|
||||
|
||||
EnsureTrackFolder(trackFile, artist, album, filePath);
|
||||
|
||||
|
@ -112,7 +112,7 @@ namespace NzbDrone.Core.MediaFiles
|
|||
Ensure.That(artist, () => artist).IsNotNull();
|
||||
Ensure.That(destinationFilePath, () => destinationFilePath).IsValidPath();
|
||||
|
||||
var trackFilePath = trackFile.Path ?? Path.Combine(artist.Path, trackFile.RelativePath);
|
||||
var trackFilePath = trackFile.Path;
|
||||
|
||||
if (!_diskProvider.FileExists(trackFilePath))
|
||||
{
|
||||
|
@ -126,7 +126,7 @@ namespace NzbDrone.Core.MediaFiles
|
|||
|
||||
_diskTransferService.TransferFile(trackFilePath, destinationFilePath, mode);
|
||||
|
||||
trackFile.RelativePath = artist.Path.GetRelativePath(destinationFilePath);
|
||||
trackFile.Path = destinationFilePath;
|
||||
|
||||
_updateTrackFileService.ChangeFileDateForFile(trackFile, artist, tracks);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue