Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Readarr/commit/9a649cf58ef1611e861ac852070d4d88d0582661
You should set ROOT_URL correctly, otherwise the web may not work correctly.
14 changed files with
48 additions and
15 deletions
@ -43,6 +43,10 @@
<HintPath > ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include= "Microsoft.CSharp" />
<Reference Include= "RestSharp, Version=104.4.0.0, Culture=neutral, processorArchitecture=MSIL" >
<SpecificVersion > False</SpecificVersion>
<HintPath > ..\packages\RestSharp.104.4.0\lib\net4\RestSharp.dll</HintPath>
</Reference>
<Reference Include= "System" />
<Reference Include= "System.Configuration" />
<Reference Include= "System.Configuration.Install" />
@ -3,5 +3,6 @@
<package id="loggly-csharp" version="2.3" targetFramework="net40" />
<package id="Newtonsoft.Json" version="5.0.8" targetFramework="net40" />
<package id="NLog" version="2.1.0" targetFramework="net40" />
<package id="RestSharp" version="104.4.0" targetFramework="net40" />
<package id="SharpZipLib" version="0.86.0" targetFramework="net40" />
</packages>
@ -43,7 +43,7 @@ namespace NzbDrone.Core.DataAugmentation.Xem
{
_logger . Debug ( "Fetching Series IDs from" ) ;
var restClient = new Rest Client( XEM_BASE_URL ) ;
var restClient = Rest ClientFactory. Build Client( XEM_BASE_URL ) ;
var request = BuildRequest ( "havemap" ) ;
@ -57,7 +57,7 @@ namespace NzbDrone.Core.DataAugmentation.Xem
{
_logger . Debug ( "Fetching Mappings for: {0}" , id ) ;
var restClient = new Rest Client( XEM_BASE_URL ) ;
var restClient = Rest ClientFactory. Build Client( XEM_BASE_URL ) ;
var request = BuildRequest ( "all" ) ;
request . AddParameter ( "id" , id ) ;
@ -71,7 +71,7 @@ namespace NzbDrone.Core.DataAugmentation.Xem
public List < SceneMapping > GetSceneTvdbNames ( )
{
_logger . Debug ( "Fetching alternate names" ) ;
var restClient = new Rest Client( XEM_BASE_URL ) ;
var restClient = Rest ClientFactory. Build Client( XEM_BASE_URL ) ;
var request = BuildRequest ( "allNames" ) ;
request . AddParameter ( "origin" , "tvdb" ) ;
@ -172,7 +172,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
_logger . Debug ( "Url: " + url ) ;
var client = new Rest Client( url ) ;
var client = Rest ClientFactory. Build Client( url ) ;
client . Authenticator = new HttpBasicAuthenticator ( settings . Username , settings . Password ) ;
return client ;
@ -7,6 +7,7 @@ using NLog;
using NzbDrone.Common ;
using NzbDrone.Common.Extensions ;
using NzbDrone.Common.Serializer ;
using NzbDrone.Core.Rest ;
using NzbDrone.Core.Download.Clients.Sabnzbd.Responses ;
using RestSharp ;
@ -138,7 +139,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
_logger . Debug ( "Url: " + url ) ;
return new Rest Client( url ) ;
return Rest ClientFactory. Build Client( url ) ;
}
private void CheckForError ( IRestResponse response )
@ -106,7 +106,7 @@ namespace NzbDrone.Core.MetadataSource
private static IRestClient BuildClient ( string resource , string method )
{
return new Rest Client( string . Format ( "http://api.trakt.tv/{0}/{1}.json/bc3c2c460f22cbb01c264022b540e191" , resource , method ) ) ;
return Rest ClientFactory. Build Client( string . Format ( "http://api.trakt.tv/{0}/{1}.json/bc3c2c460f22cbb01c264022b540e191" , resource , method ) ) ;
}
private static Series MapSeries ( Show show )
@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.IO ;
using System.Linq ;
using System.Xml.Linq ;
using NzbDrone.Core.Rest ;
using NzbDrone.Core.Indexers ;
using NzbDrone.Core.Tv ;
using RestSharp ;
@ -38,7 +39,7 @@ namespace NzbDrone.Core.MetadataSource.Tvdb
private static IRestClient BuildClient ( string resource )
{
return new Rest Client( String . Format ( "http://thetvdb.com/data/{0}" , resource ) ) ;
return Rest ClientFactory. Build Client( String . Format ( "http://thetvdb.com/data/{0}" , resource ) ) ;
}
private static Series MapSeries ( XElement item )
@ -28,7 +28,7 @@ namespace NzbDrone.Core.Notifications.NotifyMyAndroid
public void SendNotification ( string title , string message , string apiKey , NotifyMyAndroidPriority priority )
{
var client = new Rest Client( URL ) ;
var client = Rest ClientFactory. Build Client( URL ) ;
var request = new RestRequest ( "notify" , Method . POST ) ;
request . RequestFormat = DataFormat . Xml ;
request . AddParameter ( "apikey" , apiKey ) ;
@ -43,7 +43,7 @@ namespace NzbDrone.Core.Notifications.NotifyMyAndroid
private void Verify ( string apiKey )
{
var client = new Rest Client( URL ) ;
var client = Rest ClientFactory. Build Client( URL ) ;
var request = new RestRequest ( "verify" , Method . GET ) ;
request . RequestFormat = DataFormat . Xml ;
request . AddParameter ( "apikey" , apiKey , ParameterType . GetOrPost ) ;
@ -7,6 +7,7 @@ using NLog;
using NzbDrone.Common ;
using NzbDrone.Common.Cache ;
using NzbDrone.Common.Serializer ;
using NzbDrone.Core.Rest ;
using RestSharp ;
namespace NzbDrone.Core.Notifications.Plex
@ -75,7 +76,7 @@ namespace NzbDrone.Core.Notifications.Plex
private RestClient GetMyPlexClient ( string username , string password )
{
var client = new Rest Client( "https://my.plexapp.com" ) ;
var client = Rest ClientFactory. Build Client( "https://my.plexapp.com" ) ;
client . Authenticator = new HttpBasicAuthenticator ( username , password ) ;
return client ;
@ -96,7 +97,7 @@ namespace NzbDrone.Core.Notifications.Plex
private RestClient GetPlexServerClient ( PlexServerSettings settings )
{
return new Rest Client( String . Format ( "http://{0}:{1}" , settings . Host , settings . Port ) ) ;
return Rest ClientFactory. Build Client( String . Format ( "http://{0}:{1}" , settings . Host , settings . Port ) ) ;
}
private RestRequest GetPlexServerRequest ( string resource , Method method , PlexServerSettings settings )
@ -25,7 +25,7 @@ namespace NzbDrone.Core.Notifications.PushBullet
public void SendNotification ( string title , string message , string apiKey , string deviceId )
{
var client = new Rest Client( URL ) ;
var client = Rest ClientFactory. Build Client( URL ) ;
var request = BuildRequest ( deviceId ) ;
request . AddParameter ( "type" , "note" ) ;
@ -25,7 +25,7 @@ namespace NzbDrone.Core.Notifications.Pushover
public void SendNotification ( string title , string message , string apiKey , string userKey , PushoverPriority priority , string sound )
{
var client = new Rest Client( URL ) ;
var client = Rest ClientFactory. Build Client( URL ) ;
var request = new RestRequest ( Method . POST ) ;
request . AddParameter ( "token" , apiKey ) ;
request . AddParameter ( "user" , userKey ) ;
@ -559,6 +559,7 @@
<Compile Include= "Qualities\QualityModelComparer.cs" />
<Compile Include= "Qualities\QualityProfileItem.cs" />
<Compile Include= "Rest\JsonNetSerializer.cs" />
<Compile Include= "Rest\RestClientFactory.cs" />
<Compile Include= "RootFolders\RootFolderRepository.cs" />
<Compile Include= "Security.cs" />
<Compile Include= "ThingiProvider\ConfigContractNotFoundException.cs" />
@ -0,0 +1,24 @@
using System ;
using System.Collections.Generic ;
using System.Linq ;
using System.Text ;
using RestSharp ;
using NzbDrone.Common.EnvironmentInfo ;
namespace NzbDrone.Core.Rest
{
public static class RestClientFactory
{
public static RestClient BuildClient ( String baseUrl )
{
var restClient = new RestClient ( baseUrl ) ;
restClient . UserAgent = String . Format ( "NzbDrone/{0} (RestSharp/{1}; {2}/{3})" ,
BuildInfo . Version ,
restClient . GetType ( ) . Assembly . GetName ( ) . Version ,
OsInfo . Os , OsInfo . Version . ToString ( 2 ) ) ;
return restClient ;
}
}
}
@ -17,7 +17,7 @@ namespace NzbDrone.Core.Update
{
public UpdatePackage GetLatestUpdate ( string branch , Version currentVersion )
{
var restClient = new Rest Client( Services . RootUrl ) ;
var restClient = Rest ClientFactory. Build Client( Services . RootUrl ) ;
var request = new RestRequest ( "/v1/update/{branch}" ) ;
@ -34,7 +34,7 @@ namespace NzbDrone.Core.Update
public List < UpdatePackage > GetRecentUpdates ( string branch )
{
var restClient = new Rest Client( Services . RootUrl ) ;
var restClient = Rest ClientFactory. Build Client( Services . RootUrl ) ;
var request = new RestRequest ( "/v1/update/{branch}/changes" ) ;