|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|
|
|
using System.Net;
|
|
|
|
using System.Net;
|
|
|
|
using NLog;
|
|
|
|
using NLog;
|
|
|
|
using NzbDrone.Common;
|
|
|
|
using NzbDrone.Common;
|
|
|
|
|
|
|
|
using NzbDrone.Core.Indexers.Exceptions;
|
|
|
|
using NzbDrone.Core.IndexerSearch.Definitions;
|
|
|
|
using NzbDrone.Core.IndexerSearch.Definitions;
|
|
|
|
using NzbDrone.Core.Parser.Model;
|
|
|
|
using NzbDrone.Core.Parser.Model;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
@ -30,7 +31,6 @@ namespace NzbDrone.Core.Indexers
|
|
|
|
_logger = logger;
|
|
|
|
_logger = logger;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public virtual IList<ReleaseInfo> FetchRss(IIndexer indexer)
|
|
|
|
public virtual IList<ReleaseInfo> FetchRss(IIndexer indexer)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.Debug("Fetching feeds from " + indexer.Name);
|
|
|
|
_logger.Debug("Fetching feeds from " + indexer.Name);
|
|
|
@ -53,7 +53,6 @@ namespace NzbDrone.Core.Indexers
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private IList<ReleaseInfo> Fetch(IIndexer indexer, SeasonSearchCriteria searchCriteria, int offset)
|
|
|
|
private IList<ReleaseInfo> Fetch(IIndexer indexer, SeasonSearchCriteria searchCriteria, int offset)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.Debug("Searching for {0} offset: {1}", searchCriteria, offset);
|
|
|
|
_logger.Debug("Searching for {0} offset: {1}", searchCriteria, offset);
|
|
|
@ -117,15 +116,21 @@ namespace NzbDrone.Core.Indexers
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (WebException webException)
|
|
|
|
catch (WebException webException)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (webException.Message.Contains("502") || webException.Message.Contains("503") || webException.Message.Contains("timed out"))
|
|
|
|
if (webException.Message.Contains("502") || webException.Message.Contains("503") ||
|
|
|
|
|
|
|
|
webException.Message.Contains("timed out"))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.Warn("{0} server is currently unavailable. {1} {2}", indexer.Name, url, webException.Message);
|
|
|
|
_logger.Warn("{0} server is currently unavailable. {1} {2}", indexer.Name, url,
|
|
|
|
|
|
|
|
webException.Message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.Warn("{0} {1} {2}", indexer.Name, url, webException.Message);
|
|
|
|
_logger.Warn("{0} {1} {2}", indexer.Name, url, webException.Message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (ApiKeyException)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_logger.Warn("Invalid API Key for {0} {1}", indexer.Name, url);
|
|
|
|
|
|
|
|
}
|
|
|
|
catch (Exception feedEx)
|
|
|
|
catch (Exception feedEx)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
feedEx.Data.Add("FeedUrl", url);
|
|
|
|
feedEx.Data.Add("FeedUrl", url);
|
|
|
|