From ab1065a567151fd45fcf4698cd7d18708b94e35f Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Thu, 21 Feb 2013 15:26:35 -0500 Subject: removed static logger --- MediaBrowser.Controller/Resolvers/TV/TVUtils.cs | 50 +++++++++++++++++++++---- 1 file changed, 43 insertions(+), 7 deletions(-) (limited to 'MediaBrowser.Controller/Resolvers') diff --git a/MediaBrowser.Controller/Resolvers/TV/TVUtils.cs b/MediaBrowser.Controller/Resolvers/TV/TVUtils.cs index 3e7421a397..db85ae4f74 100644 --- a/MediaBrowser.Controller/Resolvers/TV/TVUtils.cs +++ b/MediaBrowser.Controller/Resolvers/TV/TVUtils.cs @@ -7,9 +7,18 @@ using System.Linq; namespace MediaBrowser.Controller.Resolvers.TV { + /// + /// Class TVUtils + /// public static class TVUtils { + /// + /// The TVDB API key + /// public static readonly string TVDBApiKey = "B89CE93890E9419B"; + /// + /// The banner URL + /// public static readonly string BannerUrl = "http://www.thetvdb.com/banners/"; /// @@ -29,11 +38,6 @@ namespace MediaBrowser.Controller.Resolvers.TV /// match movie titles like "2001 A Space..." /// Currently we limit the numbers here to 2 digits to try and avoid this /// - /// - /// The order here is important, if the order is changed some of the later - /// ones might incorrectly match things that higher ones would have caught. - /// The most restrictive expressions should appear first - /// private static readonly Regex[] EpisodeExpressions = new[] { new Regex( @@ -78,6 +82,11 @@ namespace MediaBrowser.Controller.Resolvers.TV }; + /// + /// Gets the season number from path. + /// + /// The path. + /// System.Nullable{System.Int32}. public static int? GetSeasonNumberFromPath(string path) { // Look for one of the season folder names @@ -97,6 +106,8 @@ namespace MediaBrowser.Controller.Resolvers.TV /// /// Extracts the season number from the second half of the Season folder name (everything after "Season", or "Staffel") /// + /// The path. + /// System.Nullable{System.Int32}. private static int? GetSeasonNumberFromPathSubstring(string path) { int numericStart = -1; @@ -127,11 +138,22 @@ namespace MediaBrowser.Controller.Resolvers.TV return int.Parse(path.Substring(numericStart, length)); } + /// + /// Determines whether [is season folder] [the specified path]. + /// + /// The path. + /// true if [is season folder] [the specified path]; otherwise, false. public static bool IsSeasonFolder(string path) { return GetSeasonNumberFromPath(path) != null; } + /// + /// Determines whether [is series folder] [the specified path]. + /// + /// The path. + /// The file system children. + /// true if [is series folder] [the specified path]; otherwise, false. public static bool IsSeriesFolder(string path, IEnumerable fileSystemChildren) { // A folder with more than 3 non-season folders in will not becounted as a series @@ -171,6 +193,12 @@ namespace MediaBrowser.Controller.Resolvers.TV return false; } + /// + /// Episodes the number from file. + /// + /// The full path. + /// if set to true [is in season]. + /// System.String. public static string EpisodeNumberFromFile(string fullPath, bool isInSeason) { string fl = fullPath.ToLower(); @@ -194,6 +222,11 @@ namespace MediaBrowser.Controller.Resolvers.TV return null; } + /// + /// Seasons the number from episode file. + /// + /// The full path. + /// System.String. public static string SeasonNumberFromEpisodeFile(string fullPath) { string fl = fullPath.ToLower(); @@ -211,6 +244,11 @@ namespace MediaBrowser.Controller.Resolvers.TV return null; } + /// + /// Gets the air days. + /// + /// The day. + /// List{DayOfWeek}. public static List GetAirDays(string day) { if (!string.IsNullOrWhiteSpace(day)) @@ -239,8 +277,6 @@ namespace MediaBrowser.Controller.Resolvers.TV }; } - Logger.LogWarning("Invalid value passed into GetAirDays: {0}", day); - return new List { }; -- cgit v1.2.3