mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-26 22:46:37 -04:00
Replaced get and post with ajax to prevent XSRF.
Replaced some usages of Console.Writeline with proper logging.
This commit is contained in:
@@ -5,12 +5,14 @@ using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Text.RegularExpressions;
|
||||
using NLog;
|
||||
using NzbDrone.Core.Model;
|
||||
|
||||
namespace NzbDrone.Core.Providers
|
||||
{
|
||||
public class AutoConfigureProvider
|
||||
{
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public SabnzbdInfoModel AutoConfigureSab()
|
||||
{
|
||||
@@ -88,8 +90,8 @@ namespace NzbDrone.Core.Providers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("Failed to get response from: {0}", url);
|
||||
Console.WriteLine(ex.Message, ex);
|
||||
Logger.Trace("Failed to get response from: {0}", url);
|
||||
Logger.Trace(ex.Message, ex);
|
||||
}
|
||||
|
||||
return String.Empty;
|
||||
|
||||
@@ -3,12 +3,15 @@ using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using NLog;
|
||||
using Ninject;
|
||||
|
||||
namespace NzbDrone.Core.Providers.Core
|
||||
{
|
||||
public class UdpProvider
|
||||
{
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
[Inject]
|
||||
public UdpProvider()
|
||||
{
|
||||
@@ -168,7 +171,7 @@ namespace NzbDrone.Core.Providers.Core
|
||||
|
||||
catch (Exception exc)
|
||||
{
|
||||
Console.WriteLine(exc);
|
||||
Logger.TraceException(exc.Message, exc);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user