|
|
|
@ -57,7 +57,7 @@ namespace NzbDrone.Core.Organizer
|
|
|
|
|
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
|
|
|
|
|
|
|
|
|
private static readonly Regex FileNameCleanupRegex = new Regex(@"([- ._])(\1)+", RegexOptions.Compiled);
|
|
|
|
|
private static readonly Regex TrimSeparatorsRegex = new Regex(@"[- ._]$", RegexOptions.Compiled);
|
|
|
|
|
private static readonly Regex TrimSeparatorsRegex = new Regex(@"[- ._]+$", RegexOptions.Compiled);
|
|
|
|
|
|
|
|
|
|
private static readonly Regex ScenifyRemoveChars = new Regex(@"(?<=\s)(,|<|>|\/|\\|;|:|'|""|\||`|~|!|\?|@|$|%|^|\*|-|_|=){1}(?=\s)|('|:|\?|,)(?=(?:(?:s|m)\s)|\s|$)|(\(|\)|\[|\]|\{|\})", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
|
|
|
|
private static readonly Regex ScenifyReplaceChars = new Regex(@"[\/]", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
|
|
|
@ -109,7 +109,7 @@ namespace NzbDrone.Core.Organizer
|
|
|
|
|
|
|
|
|
|
tracks = tracks.OrderBy(e => e.AlbumReleaseId).ThenBy(e => e.TrackNumber).ToList();
|
|
|
|
|
|
|
|
|
|
var splitPatterns = pattern.Split(new char[] { '\\', '/' }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
|
|
var splitPatterns = pattern.Split(new[] { '\\', '/' }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
|
|
var components = new List<string>();
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < splitPatterns.Length; i++)
|
|
|
|
@ -313,6 +313,7 @@ namespace NzbDrone.Core.Organizer
|
|
|
|
|
|
|
|
|
|
private void AddMediumTokens(Dictionary<string, Func<TokenMatch, string>> tokenHandlers, Medium medium)
|
|
|
|
|
{
|
|
|
|
|
tokenHandlers["{Medium Name}"] = m => medium.Name;
|
|
|
|
|
tokenHandlers["{Medium Format}"] = m => medium.Format;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|