mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
Release Group should now be available for renamer to use.
This commit is contained in:
parent
ed35e2f194
commit
ad147ed425
@ -163,6 +163,7 @@ public string BuildFileName(Movie movie, MovieFile movieFile, NamingConfig namin
|
||||
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 @@ private void AddQualityTokens(Dictionary<string, Func<TokenMatch, string>> token
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user