mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 06:45:19 -07:00
Imdbid parsing works now from url
This commit is contained in:
parent
a98b69859c
commit
5aaba98c57
3 changed files with 4 additions and 3 deletions
|
@ -29,6 +29,7 @@ namespace NzbDrone.Core.Test.NetImport
|
||||||
var result = Subject.ParseResponse(CreateResponse("http://my.indexer.com/api?q=My+Favourite+Show", xml));
|
var result = Subject.ParseResponse(CreateResponse("http://my.indexer.com/api?q=My+Favourite+Show", xml));
|
||||||
|
|
||||||
result.First().Title.Should().Be("Think Like a Man Too");
|
result.First().Title.Should().Be("Think Like a Man Too");
|
||||||
|
result.First().ImdbId.Should().Be("tt2239832");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -31,7 +31,7 @@ namespace NzbDrone.Core.NetImport.RSSImport
|
||||||
|
|
||||||
yield return new NetImportDefinition
|
yield return new NetImportDefinition
|
||||||
{
|
{
|
||||||
Name = GetType().Name,
|
Name = "IMDb Watchlist",
|
||||||
Enabled = config.Validate().IsValid && Enabled,
|
Enabled = config.Validate().IsValid && Enabled,
|
||||||
Implementation = GetType().Name,
|
Implementation = GetType().Name,
|
||||||
Settings = config
|
Settings = config
|
||||||
|
|
|
@ -266,7 +266,7 @@ namespace NzbDrone.Core.Parser
|
||||||
private static readonly Regex FileExtensionRegex = new Regex(@"\.[a-z0-9]{2,4}$",
|
private static readonly Regex FileExtensionRegex = new Regex(@"\.[a-z0-9]{2,4}$",
|
||||||
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||||
|
|
||||||
private static readonly Regex ReportImdbId = new Regex(@"(?<imdbid>tt\d{9})", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
private static readonly Regex ReportImdbId = new Regex(@"(?<imdbid>tt\d{7})", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||||
|
|
||||||
private static readonly Regex SimpleTitleRegex = new Regex(@"(?:480[ip]|576[ip]|720[ip]|1080[ip]|[xh][\W_]?26[45]|DD\W?5\W1|[<>?*:|]|848x480|1280x720|1920x1080|(8|10)b(it)?)\s*",
|
private static readonly Regex SimpleTitleRegex = new Regex(@"(?:480[ip]|576[ip]|720[ip]|1080[ip]|[xh][\W_]?26[45]|DD\W?5\W1|[<>?*:|]|848x480|1280x720|1920x1080|(8|10)b(it)?)\s*",
|
||||||
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||||
|
@ -454,7 +454,7 @@ namespace NzbDrone.Core.Parser
|
||||||
{
|
{
|
||||||
if (match.Groups["imdbid"].Value != null)
|
if (match.Groups["imdbid"].Value != null)
|
||||||
{
|
{
|
||||||
if (match.Groups["imdbid"].Length == 11)
|
if (match.Groups["imdbid"].Length == 9)
|
||||||
{
|
{
|
||||||
return match.Groups["imdbid"].Value;
|
return match.Groups["imdbid"].Value;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue