CalculateFilePath will use configured season folder, with tests.

MoveFile creates folder before move.
This commit is contained in:
Mark McDowall 2011-06-21 20:40:24 -07:00
commit 584a96a4f2
3 changed files with 33 additions and 6 deletions

View file

@ -83,7 +83,11 @@ namespace NzbDrone.Core.Providers
string path = series.Path;
if (series.SeasonFolder)
{
path = Path.Combine(path, "Season " + seasonNumber);
var seasonFolder = _configProvider.SeasonFolderFormat
.Replace("%0s", seasonNumber.ToString("00"))
.Replace("%s", seasonNumber.ToString());
path = Path.Combine(path, seasonFolder);
}
path = Path.Combine(path, fileName + extention);