mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Merge remote-tracking branch 'origin/master' into quality
This commit is contained in:
commit
c5252ca22d
5 changed files with 89 additions and 20 deletions
|
@ -83,6 +83,8 @@ namespace NzbDrone.Core
|
|||
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
};
|
||||
|
||||
private static readonly Regex MultiPartCleanupRegex = new Regex(@"\(\d+\)$", RegexOptions.Compiled);
|
||||
|
||||
internal static EpisodeParseResult ParsePath(string path)
|
||||
{
|
||||
var fileInfo = new FileInfo(path);
|
||||
|
@ -501,5 +503,11 @@ namespace NzbDrone.Core
|
|||
|
||||
return header;
|
||||
}
|
||||
|
||||
internal static string CleanupEpisodeTitle(string title)
|
||||
{
|
||||
//this will remove (1),(2) from the end of multi part episodes.
|
||||
return MultiPartCleanupRegex.Replace(title, string.Empty).Trim();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue