/// <summary> /// Gets the cover for the specified show from The TVDB. /// </summary> /// <param name="show">The show to get the cover for.</param> /// <returns> /// URL to the image on TVDB's server. /// </returns> public static string GetCoverFromTVDB(string show) { Log.Debug("Getting cover for " + show + " from TVDB..."); var tvdb = new TVDB(); var res = tvdb.GetID(show).ToList(); if (res.Count != 0) { var guide = tvdb.GetData(res[0].ID); if (!string.IsNullOrWhiteSpace(guide.Cover)) { return guide.Cover; } else { Log.Debug("TVDB doesn't have a cover associated to " + show + "."); } } else { Log.Debug("No shows were found on TVDB matching " + show + "."); } return null; }
/// <summary> /// Gets the cover for the specified show from The TVDB. /// </summary> /// <param name="show">The show to get the cover for.</param> /// <returns> /// URL to the image on TVDB's server. /// </returns> public static string GetCoverFromTVDB(string show) { var tvdb = new TVDB(); var res = tvdb.GetID(show).ToList(); if (res.Count != 0) { var guide = tvdb.GetData(res[0].ID); if (!string.IsNullOrWhiteSpace(guide.Cover)) { return guide.Cover; } } return null; }