Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Readarr/commit/3f4433938108eb4cb132cf3885355193714a90ba
You should set ROOT_URL correctly, otherwise the web may not work correctly.
5 changed files with
10 additions and
24 deletions
@ -75,7 +75,6 @@
<Compile Include= "ClientSchemaTests\SchemaBuilderFixture.cs" />
<Compile Include= "MappingTests\ReflectionExtensionFixture.cs" />
<Compile Include= "MappingTests\ResourceMappingFixture.cs" />
<Compile Include= "StaticResourceMapperFixture.cs" />
<Compile Include= "Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup >
@ -1,21 +0,0 @@
using System.IO ;
using NUnit.Framework ;
using NzbDrone.Api.Frontend ;
using NzbDrone.Test.Common ;
namespace NzbDrone.Api.Test
{
[TestFixture]
public class StaticResourceMapperFixture : TestBase < StaticResourceMapper >
{
[TestCase("/app.js", Result = "ui|app.js")]
[TestCase("/series/app.js", Result = "ui|series|app.js")]
[TestCase("series/app.js", Result = "ui|series|app.js")]
[TestCase("Series/App.js", Result = "ui|series|app.js")]
public string should_map_paths ( string path )
{
return Subject . Map ( path ) . Replace ( Path . DirectorySeparatorChar , '|' ) ;
}
}
}
@ -1,19 +1,26 @@
using System.IO ;
using System.Linq ;
using NzbDrone.Common ;
namespace NzbDrone.Api.Frontend
{
public class StaticResourceMapper : IMapHttpRequestsToDisk
{
private readonly IEnvironmentProvider _environmentProvider ;
private static readonly string [ ] Extensions = new [ ] { ".css" , ".js" , ".html" , ".htm" , ".jpg" , ".jpeg" , ".icon" , ".gif" , ".png" , ".woff" , ".ttf" } ;
public StaticResourceMapper ( IEnvironmentProvider environmentProvider )
{
_environmentProvider = environmentProvider ;
}
public string Map ( string resourceUrl )
{
var path = resourceUrl . Replace ( '/' , Path . DirectorySeparatorChar ) ;
path = path . Trim ( Path . DirectorySeparatorChar ) . ToLower ( ) ;
return Path . Combine ( "ui" , path ) ;
return Path . Combine ( _environmentProvider . StartUpPath , "ui" , path ) ;
}
public bool CanHandle ( string resourceUrl )
@ -73,7 +73,7 @@ namespace NzbDrone.Common.Test
[Test]
public void AppDataDirectory_path_test ( )
{
GetEnvironmentProvider ( ) . GetAppDataPath ( ) . Should ( ) . BeEquivalentTo ( @"C:\NzbDrone\ App_Data\ ") ;
GetEnvironmentProvider ( ) . GetAppDataPath ( ) . Should ( ) . BeEquivalentTo ( @"C:\NzbDrone\ ") ;
}
@ -12,6 +12,7 @@ namespace NzbDrone.Common
string SystemTemp { get ; }
Version Version { get ; }
DateTime BuildDateTime { get ; }
string StartUpPath { get ; }
Version GetOsVersion ( ) ;
}