mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-30 19:50:15 -07:00
Media Management settings are alive
This commit is contained in:
parent
943a05bc09
commit
3f6a6d53d5
29 changed files with 346 additions and 218 deletions
|
@ -72,25 +72,5 @@ namespace NzbDrone.Core.MediaFiles
|
|||
var files = GetFilesBySeries(message.Series.Id);
|
||||
_mediaFileRepository.DeleteMany(files);
|
||||
}
|
||||
|
||||
public FileInfo CalculateFilePath(Series series, int seasonNumber, string fileName, string extension)
|
||||
{
|
||||
string path = series.Path;
|
||||
if (series.SeasonFolder)
|
||||
{
|
||||
var seasonFolder = _configService.SortingSeasonFolderFormat
|
||||
.Replace("%sn", series.Title)
|
||||
.Replace("%s.n", series.Title.Replace(' ', '.'))
|
||||
.Replace("%s_n", series.Title.Replace(' ', '_'))
|
||||
.Replace("%0s", seasonNumber.ToString("00"))
|
||||
.Replace("%s", seasonNumber.ToString());
|
||||
|
||||
path = Path.Combine(path, seasonFolder);
|
||||
}
|
||||
|
||||
path = Path.Combine(path, fileName + extension);
|
||||
|
||||
return new FileInfo(path);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue