New: Anime support
New: pull alternate names from thexem.de
New: Search using all alternate names (if rage ID is unavailable)
New: Show scene mapping information when hovering over episode number
New: Full season searching for anime (searches for each episode)
New: animezb.com anime indexer
New: Treat BD as bluray

Fixed: Parsing of 2 digit absolute episode numbers
Fixed: Loading series details page for series that start with period
Fixed: Return 0 results when manual search fails, instead of an error
Fixed: animezb URL
This commit is contained in:
Mark McDowall
2014-05-19 12:14:41 -07:00
parent 828dd5f5ad
commit 193672b652
105 changed files with 1901 additions and 364 deletions

View File

@@ -5,6 +5,7 @@ using System.Linq;
using System.Text.RegularExpressions;
using System.Xml.Linq;
using NLog;
using NzbDrone.Common;
using NzbDrone.Common.Instrumentation;
namespace NzbDrone.Core.Indexers
@@ -89,5 +90,30 @@ namespace NzbDrone.Core.Indexers
return element != null ? element.Value : defaultValue;
}
public static T TryGetValue<T>(this XElement item, string elementName, T defaultValue)
{
var element = item.Element(elementName);
if (element == null)
{
return defaultValue;
}
if (element.Value.IsNullOrWhiteSpace())
{
return defaultValue;
}
try
{
return (T)Convert.ChangeType(element.Value, typeof(T));
}
catch (InvalidCastException)
{
return defaultValue;
}
}
}
}