mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
Allow scene name to be used for renaming
New: Added option to use scene name for episodefiles
This commit is contained in:
parent
38eeda8c37
commit
bee6914062
15 changed files with 647 additions and 511 deletions
|
@ -142,8 +142,22 @@ namespace NzbDrone.Core.Providers
|
|||
}
|
||||
}
|
||||
|
||||
public virtual string GetNewFilename(IList<Episode> episodes, string seriesTitle, QualityTypes quality, bool proper)
|
||||
public virtual string GetNewFilename(IList<Episode> episodes, string seriesTitle, QualityTypes quality, bool proper, EpisodeFile episodeFile)
|
||||
{
|
||||
if (_configProvider.SortingUseSceneName)
|
||||
{
|
||||
Logger.Trace("Attempting to use scene name");
|
||||
if (String.IsNullOrWhiteSpace(episodeFile.SceneName))
|
||||
{
|
||||
var name = Path.GetFileNameWithoutExtension(episodeFile.Path);
|
||||
Logger.Trace("Unable to use scene name, because it is null, sticking with current name: {0}", name);
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
return episodeFile.SceneName;
|
||||
}
|
||||
|
||||
var sortedEpisodes = episodes.OrderBy(e => e.EpisodeNumber);
|
||||
|
||||
var separatorStyle = EpisodeSortingHelper.GetSeparatorStyle(_configProvider.SortingSeparatorStyle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue