private MovieImageScraperActionContext PreMovieImageScraperAction( MovieImageScraperActionContext context) { if (log.IsDebugEnabled) log.Debug("PreMovieImageScraperAction[Dummy]"); return context; }
/// <summary> /// Scrapes the movie posters. /// </summary> /// <param name="context">The context.</param> /// <returns></returns> public PluginActionResult ScrapeMovieImage(MovieImageScraperActionContext context) { if (context == null) { throw new ArgumentNullException("context"); } if (manager.Plugins.Count == 0) { return(new PluginActionResult()); } if (PreMovieImageScrape != null) { context = PreMovieImageScrape(context); } PluginActionResult result = null; foreach (IMovieImageScraper plugin in manager.Plugins .Where(p => p.Enabled && p.Plugin is IMovieImageScraper) .OrderBy(p => p.Order) .Select(p => p.Plugin)) { result = plugin.ScrapeMovieImage(context); if (result != null && result.BreakChain) { break; } } if (result == null) { result = new PluginActionResult(); } if (PostMovieImageScrape != null) { result = PostMovieImageScrape(result); } return(result); }
/// <summary> /// Scrapes the movie posters. /// </summary> /// <param name="context">The context.</param> /// <returns></returns> public PluginActionResult ScrapeMovieImage(MovieImageScraperActionContext context) { if (context == null) throw new ArgumentNullException("context"); if (manager.Plugins.Count == 0) return new PluginActionResult(); if (PreMovieImageScrape != null) context = PreMovieImageScrape(context); PluginActionResult result = null; foreach (IMovieImageScraper plugin in manager.Plugins .Where(p => p.Enabled && p.Plugin is IMovieImageScraper) .OrderBy(p => p.Order) .Select(p => p.Plugin)) { result = plugin.ScrapeMovieImage(context); if (result != null && result.BreakChain) break; } if (result == null) result = new PluginActionResult(); if (PostMovieImageScrape != null) result = PostMovieImageScrape(result); return result; }