Prevent multiple enumerations in Custom Formats token
This commit is contained in:
parent
1aef91041e
commit
1fcd2b492c
|
@ -706,7 +706,7 @@ namespace NzbDrone.Core.Organizer
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
return customFormats.Where(x => x.IncludeCustomFormatWhenRenaming && x.Name == m.CustomFormat).FirstOrDefault()?.ToString() ?? string.Empty;
|
return customFormats.FirstOrDefault(x => x.IncludeCustomFormatWhenRenaming && x.Name == m.CustomFormat)?.ToString() ?? string.Empty;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -719,7 +719,7 @@ namespace NzbDrone.Core.Organizer
|
||||||
|
|
||||||
private string GetCustomFormatsToken(List<CustomFormat> customFormats, string filter)
|
private string GetCustomFormatsToken(List<CustomFormat> customFormats, string filter)
|
||||||
{
|
{
|
||||||
var tokens = customFormats.Where(x => x.IncludeCustomFormatWhenRenaming);
|
var tokens = customFormats.Where(x => x.IncludeCustomFormatWhenRenaming).ToList();
|
||||||
|
|
||||||
var filteredTokens = tokens;
|
var filteredTokens = tokens;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue