mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fixed Episode to EpisodeFile relationship (So getting the EpisodeFIle gets associated Episode(s) as well.
This commit is contained in:
@@ -85,11 +85,11 @@ namespace NzbDrone.Core.Providers
|
||||
string episodeList = String.Empty;
|
||||
foreach (var ep in episodes)
|
||||
{
|
||||
ep.FileId = fileId;
|
||||
ep.EpisodeFileId = fileId;
|
||||
_episodeProvider.UpdateEpisode(ep);
|
||||
episodeList += String.Format(", {0}", ep.EpisodeId).Trim(' ', ',');
|
||||
}
|
||||
Logger.Trace("File {0}:{1} attached to episode(s): '{2}'", episodeFile.FileId, filePath, episodeList);
|
||||
Logger.Trace("File {0}:{1} attached to episode(s): '{2}'", episodeFile.EpisodeFileId, filePath, episodeList);
|
||||
|
||||
return episodeFile;
|
||||
}
|
||||
@@ -148,6 +148,11 @@ namespace NzbDrone.Core.Providers
|
||||
return _repository.Single<EpisodeFile>(episodeFileId);
|
||||
}
|
||||
|
||||
public List<EpisodeFile> GetEpisodeFiles()
|
||||
{
|
||||
return _repository.All<EpisodeFile>().ToList();
|
||||
}
|
||||
|
||||
private List<string> GetMediaFileList(string path)
|
||||
{
|
||||
Logger.Debug("Scanning '{0}' for episodes", path);
|
||||
|
Reference in New Issue
Block a user