mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
Merge branch 'master' of git://github.com/kayone/NzbDrone
Conflicts: NzbDrone.Core.Test/ParserTest.cs
This commit is contained in:
commit
5107a02f5e
45 changed files with 39670 additions and 7046 deletions
|
@ -144,7 +144,7 @@ namespace NzbDrone.Core
|
|||
if (match.Count != 0)
|
||||
{
|
||||
var seriesName = NormalizeTitle(match[0].Groups["title"].Value);
|
||||
var year = 0;
|
||||
int year;
|
||||
Int32.TryParse(match[0].Groups["year"].Value, out year);
|
||||
|
||||
if (year < 1900 || year > DateTime.Now.Year + 1)
|
||||
|
@ -158,12 +158,11 @@ namespace NzbDrone.Core
|
|||
{
|
||||
SeriesTitle = seriesName,
|
||||
SeasonNumber = seasonNumber,
|
||||
Year = year
|
||||
Year = year,
|
||||
Quality = ParseQuality(title)
|
||||
};
|
||||
|
||||
|
||||
result.Quality = ParseQuality(title);
|
||||
|
||||
Logger.Trace("Season Parsed. {0}", result);
|
||||
return result;
|
||||
}
|
||||
|
@ -188,14 +187,7 @@ namespace NzbDrone.Core
|
|||
if (match.Count != 0)
|
||||
{
|
||||
var seriesName = NormalizeTitle(match[0].Groups["title"].Value);
|
||||
var year = 0;
|
||||
Int32.TryParse(match[0].Groups["year"].Value, out year);
|
||||
|
||||
if (year < 1900 || year > DateTime.Now.Year + 1)
|
||||
{
|
||||
year = 0;
|
||||
}
|
||||
|
||||
|
||||
Logger.Trace("Series Parsed. {0}", seriesName);
|
||||
return seriesName;
|
||||
}
|
||||
|
@ -289,11 +281,10 @@ namespace NzbDrone.Core
|
|||
return NormalizeRegex.Replace(title, String.Empty).ToLower();
|
||||
}
|
||||
|
||||
//Note: changing case on path is a problem for running on mono/*nix
|
||||
//Not going to change the casing any more... Looks Ugly in UI anyways :P
|
||||
|
||||
public static string NormalizePath(string path)
|
||||
{
|
||||
if (String.IsNullOrEmpty(path))
|
||||
if (String.IsNullOrWhiteSpace(path))
|
||||
throw new ArgumentException("Path can not be null or empty");
|
||||
|
||||
var info = new FileInfo(path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue