mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
made some of useless exceptions to calm down.
This commit is contained in:
parent
cdcf2767fc
commit
2d41ebcc78
@ -10,11 +10,6 @@ public static string Inject(this string format, params object[] formattingArgs)
|
||||
return string.Format(format, formattingArgs);
|
||||
}
|
||||
|
||||
public static string Inject(this string format, params string[] formattingArgs)
|
||||
{
|
||||
return string.Format(format, formattingArgs.Cast<object>());
|
||||
}
|
||||
|
||||
private static readonly Regex InvalidCharRegex = new Regex(@"[^a-z0-9\s-]", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
private static readonly Regex InvalidSearchCharRegex = new Regex(@"[^a-z0-9\s-\.]", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
private static readonly Regex CollapseSpace = new Regex(@"\s+", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
@ -4,8 +4,6 @@
|
||||
using NLog;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Core.IndexerSearch.Definitions;
|
||||
using NzbDrone.Core.Model;
|
||||
using NzbDrone.Core.Parser;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
|
||||
namespace NzbDrone.Core.Indexers
|
||||
@ -106,14 +104,14 @@ private List<ReportInfo> Fetch(IIndexer indexer, IEnumerable<string> urls)
|
||||
}
|
||||
catch (WebException webException)
|
||||
{
|
||||
if (webException.Message.Contains("503"))
|
||||
if (webException.Message.Contains("503") || webException.Message.Contains("timed out"))
|
||||
{
|
||||
_logger.Warn("{0} server is currently unavailable.{1} {2}", indexer.Name, url, webException.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
webException.Data.Add("FeedUrl", url);
|
||||
_logger.ErrorException("An error occurred while processing feed. " + url, webException);
|
||||
_logger.WarnException("An error occurred while processing feed. " + url, webException);
|
||||
}
|
||||
}
|
||||
catch (Exception feedEx)
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using NLog;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
@ -59,6 +60,10 @@ private void DownloadCover(Series series, MediaCover cover)
|
||||
_logger.Info("Downloading {0} for {1} {2}", cover.CoverType, series.Title, cover.Url);
|
||||
_httpProvider.DownloadFile(cover.Url, fileName);
|
||||
}
|
||||
catch (WebException e)
|
||||
{
|
||||
_logger.WarnException("Couldn't download media cover for " + series.TvdbId, e);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.ErrorException("Couldn't download media cover for " + series.TvdbId, e);
|
||||
|
Loading…
Reference in New Issue
Block a user