Use Season Folder is set in config (also set per Series), default is true.

pull/4/head
markus101 14 years ago
parent 3b749a39a7
commit 165beda55b

@ -45,7 +45,11 @@ namespace NzbDrone.Core.Providers
var series = _seriesProvider.GetSeries(episodeFile.SeriesId); var series = _seriesProvider.GetSeries(episodeFile.SeriesId);
var erm = new EpisodeRenameModel(); var erm = new EpisodeRenameModel();
erm.SeriesName = series.Title; erm.SeriesName = series.Title;
erm.Folder = series.Path + Path.DirectorySeparatorChar + GetSeasonFolder(episodeFile.Episodes[0].SeasonNumber); erm.Folder = series.Path;
if (series.SeasonFolder)
erm.Folder += Path.DirectorySeparatorChar + GetSeasonFolder(episodeFile.Episodes[0].SeasonNumber);
erm.EpisodeFile = episodeFile; erm.EpisodeFile = episodeFile;
_epsToRename.Add(erm); _epsToRename.Add(erm);
StartRename(); StartRename();
@ -62,7 +66,12 @@ namespace NzbDrone.Core.Providers
{ {
var erm = new EpisodeRenameModel(); var erm = new EpisodeRenameModel();
erm.SeriesName = series.Title; erm.SeriesName = series.Title;
erm.Folder = series.Path + Path.DirectorySeparatorChar + GetSeasonFolder(episodeFile.Episodes[0].SeasonNumber);
erm.Folder = series.Path;
if (series.SeasonFolder)
erm.Folder += Path.DirectorySeparatorChar + GetSeasonFolder(episodeFile.Episodes[0].SeasonNumber);
erm.EpisodeFile = episodeFile; erm.EpisodeFile = episodeFile;
_epsToRename.Add(erm); _epsToRename.Add(erm);
StartRename(); StartRename();
@ -79,7 +88,12 @@ namespace NzbDrone.Core.Providers
{ {
var erm = new EpisodeRenameModel(); var erm = new EpisodeRenameModel();
erm.SeriesName = series.Title; erm.SeriesName = series.Title;
erm.Folder = series.Path + Path.DirectorySeparatorChar + GetSeasonFolder(episodeFile.Episodes[0].SeasonNumber);
erm.Folder = series.Path;
if (series.SeasonFolder)
erm.Folder += Path.DirectorySeparatorChar + GetSeasonFolder(episodeFile.Episodes[0].SeasonNumber);
erm.EpisodeFile = episodeFile; erm.EpisodeFile = episodeFile;
_epsToRename.Add(erm); _epsToRename.Add(erm);
StartRename(); StartRename();
@ -96,7 +110,12 @@ namespace NzbDrone.Core.Providers
var erm = new EpisodeRenameModel(); var erm = new EpisodeRenameModel();
erm.SeriesName = series.Title; erm.SeriesName = series.Title;
erm.Folder = series.Path + Path.DirectorySeparatorChar + GetSeasonFolder(episodeFile.Episodes[0].SeasonNumber);
erm.Folder = series.Path;
if (series.SeasonFolder)
erm.Folder += Path.DirectorySeparatorChar + GetSeasonFolder(episodeFile.Episodes[0].SeasonNumber);
erm.EpisodeFile = episodeFile; erm.EpisodeFile = episodeFile;
_epsToRename.Add(erm); _epsToRename.Add(erm);
StartRename(); StartRename();

@ -111,6 +111,11 @@ namespace NzbDrone.Core.Providers
repoSeries.CleanTitle = Parser.NormalizeTitle(series.SeriesName); repoSeries.CleanTitle = Parser.NormalizeTitle(series.SeriesName);
repoSeries.Monitored = true; //New shows should be monitored repoSeries.Monitored = true; //New shows should be monitored
repoSeries.QualityProfileId = Convert.ToInt32(_config.GetValue("DefaultQualityProfile", "1", true)); repoSeries.QualityProfileId = Convert.ToInt32(_config.GetValue("DefaultQualityProfile", "1", true));
repoSeries.SeasonFolder = true;
if (!Convert.ToBoolean(_config.GetValue("SeasonFolder", true, true)))
repoSeries.SeasonFolder = false;
_sonioRepo.Add(repoSeries); _sonioRepo.Add(repoSeries);
} }

@ -32,6 +32,8 @@ namespace NzbDrone.Core.Repository
public int QualityProfileId { get; set; } public int QualityProfileId { get; set; }
public bool SeasonFolder { get; set; }
[SubSonicToOneRelation(ThisClassContainsJoinKey = true)] [SubSonicToOneRelation(ThisClassContainsJoinKey = true)]
public virtual QualityProfile QualityProfile { get; private set; } public virtual QualityProfile QualityProfile { get; private set; }

Loading…
Cancel
Save