Release Group should now be available for renamer to use.

This commit is contained in:
Leonardo Galli 2017-01-15 00:49:37 +01:00
parent ed35e2f194
commit ad147ed425
1 changed files with 8 additions and 0 deletions

View File

@ -163,6 +163,7 @@ namespace NzbDrone.Core.Organizer
AddReleaseDateTokens(tokenHandlers, movie.Year); //In case we want to separate the year
AddQualityTokens(tokenHandlers, movie, movieFile);
AddMediaInfoTokens(tokenHandlers, movieFile);
AddReleaseGroupTokens(tokenHandlers, movie, movieFile);
var fileName = ReplaceTokens(pattern, tokenHandlers, namingConfig).Trim();
fileName = FileNameCleanupRegex.Replace(fileName, match => match.Captures[0].Value[0].ToString());
@ -527,6 +528,13 @@ namespace NzbDrone.Core.Organizer
tokenHandlers["{Quality Real}"] = m => qualityReal;
}
private void AddReleaseGroupTokens(Dictionary<string, Func<TokenMatch, string>> tokenHandlers, Movie movie, MovieFile movieFile)
{
var releaseGroup = movieFile.ReleaseGroup;
tokenHandlers["{Release Group}"] = m => releaseGroup;
}
private void AddMediaInfoTokens(Dictionary<string, Func<TokenMatch, string>> tokenHandlers, EpisodeFile episodeFile)
{
if (episodeFile.MediaInfo == null) return;