Rename preview for full series and season

New: Preview before renaming files
This commit is contained in:
Mark McDowall
2013-11-26 00:06:28 -08:00
parent bb37444a99
commit e42ac25657
29 changed files with 449 additions and 111 deletions

View File

@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using NLog;
@@ -17,6 +18,7 @@ namespace NzbDrone.Core.MediaFiles
List<EpisodeFile> GetFilesBySeason(int seriesId, int seasonNumber);
List<string> FilterExistingFiles(List<string> files, int seriesId);
EpisodeFile Get(int id);
List<EpisodeFile> Get(IEnumerable<int> ids);
}
public class MediaFileService : IMediaFileService, IHandleAsync<SeriesDeletedEvent>
@@ -75,6 +77,11 @@ namespace NzbDrone.Core.MediaFiles
return _mediaFileRepository.Get(id);
}
public List<EpisodeFile> Get(IEnumerable<int> ids)
{
return _mediaFileRepository.Get(ids).ToList();
}
public void HandleAsync(SeriesDeletedEvent message)
{
var files = GetFilesBySeries(message.Series.Id);