diff options
| author | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-21 15:26:35 -0500 |
|---|---|---|
| committer | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-21 15:26:55 -0500 |
| commit | ab1065a567151fd45fcf4698cd7d18708b94e35f (patch) | |
| tree | 1863297fbd2966ceea85bc2a6c1991c5bab2c589 /MediaBrowser.Controller/Resolvers | |
| parent | 4019b9260bc1bcf23adb856cbd2b9857575fd08f (diff) | |
removed static logger
Diffstat (limited to 'MediaBrowser.Controller/Resolvers')
| -rw-r--r-- | MediaBrowser.Controller/Resolvers/TV/TVUtils.cs | 50 |
1 files changed, 43 insertions, 7 deletions
diff --git a/MediaBrowser.Controller/Resolvers/TV/TVUtils.cs b/MediaBrowser.Controller/Resolvers/TV/TVUtils.cs index 3e7421a39..db85ae4f7 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 { + /// <summary> + /// Class TVUtils + /// </summary> public static class TVUtils { + /// <summary> + /// The TVDB API key + /// </summary> public static readonly string TVDBApiKey = "B89CE93890E9419B"; + /// <summary> + /// The banner URL + /// </summary> public static readonly string BannerUrl = "http://www.thetvdb.com/banners/"; /// <summary> @@ -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 /// </summary> - /// <remarks> - /// 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 - /// </remarks> private static readonly Regex[] EpisodeExpressions = new[] { new Regex( @@ -78,6 +82,11 @@ namespace MediaBrowser.Controller.Resolvers.TV }; + /// <summary> + /// Gets the season number from path. + /// </summary> + /// <param name="path">The path.</param> + /// <returns>System.Nullable{System.Int32}.</returns> public static int? GetSeasonNumberFromPath(string path) { // Look for one of the season folder names @@ -97,6 +106,8 @@ namespace MediaBrowser.Controller.Resolvers.TV /// <summary> /// Extracts the season number from the second half of the Season folder name (everything after "Season", or "Staffel") /// </summary> + /// <param name="path">The path.</param> + /// <returns>System.Nullable{System.Int32}.</returns> 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)); } + /// <summary> + /// Determines whether [is season folder] [the specified path]. + /// </summary> + /// <param name="path">The path.</param> + /// <returns><c>true</c> if [is season folder] [the specified path]; otherwise, <c>false</c>.</returns> public static bool IsSeasonFolder(string path) { return GetSeasonNumberFromPath(path) != null; } + /// <summary> + /// Determines whether [is series folder] [the specified path]. + /// </summary> + /// <param name="path">The path.</param> + /// <param name="fileSystemChildren">The file system children.</param> + /// <returns><c>true</c> if [is series folder] [the specified path]; otherwise, <c>false</c>.</returns> public static bool IsSeriesFolder(string path, IEnumerable<WIN32_FIND_DATA> 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; } + /// <summary> + /// Episodes the number from file. + /// </summary> + /// <param name="fullPath">The full path.</param> + /// <param name="isInSeason">if set to <c>true</c> [is in season].</param> + /// <returns>System.String.</returns> public static string EpisodeNumberFromFile(string fullPath, bool isInSeason) { string fl = fullPath.ToLower(); @@ -194,6 +222,11 @@ namespace MediaBrowser.Controller.Resolvers.TV return null; } + /// <summary> + /// Seasons the number from episode file. + /// </summary> + /// <param name="fullPath">The full path.</param> + /// <returns>System.String.</returns> public static string SeasonNumberFromEpisodeFile(string fullPath) { string fl = fullPath.ToLower(); @@ -211,6 +244,11 @@ namespace MediaBrowser.Controller.Resolvers.TV return null; } + /// <summary> + /// Gets the air days. + /// </summary> + /// <param name="day">The day.</param> + /// <returns>List{DayOfWeek}.</returns> public static List<DayOfWeek> 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<DayOfWeek> { }; |
