Skip to content
Permalink
Browse files

Merge remote-tracking branch 'remotes/origin/MP1-4980-Update_MyVideo_…

…grabbers' into MP_1.23.100_Pre_Release_Test4
  • Loading branch information
Azzuro committed Dec 30, 2019
2 parents 2baf453 + 6db37d7 commit 07dc672d2c688a97c4c6ae7fd12ad25a281381d5
@@ -26,9 +26,9 @@ internal class Grabber : MarshalByRefObject, IIMDBScriptGrabber
string regexPattern = string.Empty;

// If string contains tt number use it
if (Regex.Match(strSearch, @"tt\d{7}").Success)
if (Regex.Match(strSearch, @"tt\d{7,8}").Success)
{
string ttNumber = Regex.Match(strSearch, @"(?<imdbID>tt\d{7})").Groups["imdbID"].Value;
string ttNumber = Regex.Match(strSearch, @"(?<imdbID>tt\d{7,8})").Groups["imdbID"].Value;
string imdbUrl = string.Format("http://www.imdb.com/title/{0}", ttNumber);
IMDB.IMDBUrl url = new IMDB.IMDBUrl(imdbUrl, ttNumber, _dbVersion);
elements.Add(url);
@@ -251,8 +251,8 @@ internal class Grabber : MarshalByRefObject, IIMDBScriptGrabber

// Director
regexBlockPattern = @"<h4[^>]*>[^D]*Director[s]?:[^<]*</h4>[^<]*(?<directors_block>.*?)</div>";
// regexPattern = @"href=""/name/nm\d{7}/[^>]*>(?<movieDirectors>.*?)</a>";
regexPattern = @"href=.\/name\/nm\d{7}(?:\/|\?)[^>]+?>(?:<span[^>]+?>)?(?<movieDirectors>.*?)(?:<\/span>)?<\/a>";
// regexPattern = @"href=""/name/nm\d{7,8}/[^>]*>(?<movieDirectors>.*?)</a>";
regexPattern = @"href=.\/name\/nm\d{7,8}(?:\/|\?)[^>]+?>(?:<span[^>]+?>)?(?<movieDirectors>.*?)(?:<\/span>)?<\/a>";
block = Regex.Match(strBody, regexBlockPattern, RegexOptions.Singleline).Groups["directors_block"].Value;
movieDetails.Director =
Utils.stripHTMLtags(HttpUtility.HtmlDecode(Regex.Match(block, regexPattern, RegexOptions.Singleline).Groups["movieDirectors"].Value));
@@ -289,8 +289,8 @@ internal class Grabber : MarshalByRefObject, IIMDBScriptGrabber

// Actors
regexBlockPattern = @"<table class=.cast.>.*?<\/table>|<table class=.cast_list.>.*?<\/table>";
// regexPattern = @"href=""/name/nm\d{7}/.*?alt=""(?<actor>.*?)"".*?<td.class=""character"">.*?<div>(?<role>.*?)</div>";
regexPattern = @"href=.\/name\/nm\d{7}\/.*?alt=""(?<actor>.*?)"".*?<td.class=.character.>.*?<a[^>]+?>(?<role>.*?)<\/a>";
// regexPattern = @"href=""/name/nm\d{7,8}/.*?alt=""(?<actor>.*?)"".*?<td.class=""character"">.*?<div>(?<role>.*?)</div>";
regexPattern = @"href=.\/name\/nm\d{7,8}\/.*?alt=""(?<actor>.*?)"".*?<td.class=.character.>.*?<a[^>]+?>(?<role>.*?)<\/a>";
Match castBlock = Regex.Match(strBody, regexBlockPattern, RegexOptions.Singleline);
string strCastBlock = HttpUtility.HtmlDecode(castBlock.Value);

@@ -21,7 +21,7 @@ using System.Web;
internal class Grabber : MarshalByRefObject, MediaPortal.Video.Database.IIMDBScriptGrabber
{
const string strGrabber = "TI_MDB";
const string strGrabberVersion = "20180227.I";
const string strGrabberVersion = "20191230.I";

public Grabber()
{
@@ -291,7 +291,7 @@ internal class Grabber : MarshalByRefObject, MediaPortal.Video.Database.IIMDBScr
if (GRABBER_ID_LOOKUP)
{
// Get IMDB ID from search string
Regex rximdbid = new Regex(@"(?:\s|\+|^)(?<imdbid>tt\d{7})\b");
Regex rximdbid = new Regex(@"(?:\s|\+|^)(?<imdbid>tt\d{7,8})\b");
Match matchimdbid = rximdbid.Match(searchStr);
if (matchimdbid.Success)
{

0 comments on commit 07dc672

Please sign in to comment.
You can’t perform that action at this time.