mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -07:00
Fixed Episode to EpisodeFile relationship (So getting the EpisodeFIle gets associated Episode(s) as well.
This commit is contained in:
parent
568a9d1d24
commit
e7cabfe235
5 changed files with 15 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue