本文整理汇总了C#中MediaPortal.Video.Database.IMDBActor.SortActorMoviesByYear方法的典型用法代码示例。如果您正苦于以下问题:C# IMDBActor.SortActorMoviesByYear方法的具体用法?C# IMDBActor.SortActorMoviesByYear怎么用?C# IMDBActor.SortActorMoviesByYear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MediaPortal.Video.Database.IMDBActor
的用法示例。
在下文中一共展示了IMDBActor.SortActorMoviesByYear方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetActorDetails
//.........这里部分代码省略.........
{
value = new HTMLUtil().ConvertHTMLToAnsi(value);
actor.Biography = Util.Utils.stripHTMLtags(value).Trim();
actor.Biography = HttpUtility.HtmlDecode(actor.Biography);
}
}
}
}
}
#endregion
// Person is movie director or an actor/actress
bool isActorPass = false;
bool isDirectorPass = false;
bool isWriterPass = false;
parser.resetPosition();
HTMLParser dirParser = new HTMLParser(); // HTML body for Director
HTMLParser wriParser = new HTMLParser(); // HTML body for Writers
#region Check person role in movie (actor, director or writer)
if ((parser.skipToEndOf(vdbParserStr[35])) && // name="Director">Director</a>
(parser.skipToEndOf(vdbParserStr[36]))) // </div>
{
isDirectorPass = true;
dirParser.Content = parser.Content;
}
parser.resetPosition();
if ((parser.skipToEndOf(vdbParserStr[37])) && // name="Writer">Writer</a>
(parser.skipToEndOf(vdbParserStr[38]))) // </div>
{
isWriterPass = true;
wriParser.Content = parser.Content;
}
parser.resetPosition();
if (parser.skipToEndOf(vdbParserStr[39]) || // name="Actress">Actress</a>
parser.skipToEndOf(vdbParserStr[40])) // name="Actor">Actor</a>
{
isActorPass = true;
}
#endregion
#region Get movies for every role
// Get filmography Actor
if (isActorPass)
{
GetActorMovies(actor, parser, false, false);
}
// Get filmography for writers
if (isWriterPass)
{
parser = wriParser;
parser.resetPosition();
if ((parser.skipToEndOf(vdbParserStr[41])) && // name="Writer">Writer</a>
(parser.skipToEndOf(vdbParserStr[42]))) // </div>
{
GetActorMovies(actor, parser, false, true);
}
}
// Get filmography Director
if (isDirectorPass)
{
parser = dirParser;
parser.resetPosition();
if (parser.skipToEndOf(vdbParserStr[43]) && // name="Director">Director</a>
parser.skipToEndOf(vdbParserStr[44])) // </div>
{
GetActorMovies(actor, parser, true, false);
}
}
#endregion
// Add filmography
if (actor.Count > 0)
{
actor.SortActorMoviesByYear();
}
return true;
}
catch (Exception ex)
{
Log.Error("IMDB.GetActorDetails({0} exception:{1} {2} {3}", url.URL, ex.Message, ex.Source, ex.StackTrace);
}
return false;
}
示例2: GetActorDetails
// Filmograpy and bio
public bool GetActorDetails(IMDBUrl url, out IMDBActor actor)
{
actor = new IMDBActor();
try
{
if (InternalActorsScriptGrabber.InternalActorsGrabber.GetActorDetails(url, out actor))
{
// Add filmography
if (actor.Count > 0)
{
actor.SortActorMoviesByYear();
}
return true;
}
}
catch (Exception ex)
{
Log.Error("IMDB GetActorDetails Error: {0}", ex.Message);
}
return false;
}