Commit b5b360ba authored by kraftnix's avatar kraftnix
Browse files

kavita: 0.8.7 -> 0.8.8.3

parent af665afb
Loading
Loading
Loading
Loading
+35 −17
Original line number Diff line number Diff line
diff --git a/API/Controllers/FallbackController.cs b/API/Controllers/FallbackController.cs
index 0c92547..d54abb9 100644
index 9aff8202..f8b6c60f 100644
--- a/API/Controllers/FallbackController.cs
+++ b/API/Controllers/FallbackController.cs
@@ -22,7 +22,7 @@ public class FallbackController : Controller
@@ -1,4 +1,4 @@
-using System.IO;
+using System.IO;
 using API.Services;
 using Microsoft.AspNetCore.Authorization;
 using Microsoft.AspNetCore.Mvc;
@@ -27,7 +27,7 @@ public class FallbackController : Controller
             return NotFound();
         }
 
     public PhysicalFileResult Index()
     {
-        return PhysicalFile(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "index.html"), "text/HTML");
+        return PhysicalFile(Path.Combine("@webroot@", "index.html"), "text/HTML");
     }
 }
 
diff --git a/API/Services/DirectoryService.cs b/API/Services/DirectoryService.cs
index 8c6c796..711f315 100644
index ecce1957..774b3169 100644
--- a/API/Services/DirectoryService.cs
+++ b/API/Services/DirectoryService.cs
@@ -120,7 +120,7 @@ public class DirectoryService : IDirectoryService
@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using System.Collections.Immutable;
 using System.IO;
@@ -135,7 +135,7 @@ public class DirectoryService : IDirectoryService
         ExistOrCreate(SiteThemeDirectory);
         FaviconDirectory = FileSystem.Path.Join(FileSystem.Directory.GetCurrentDirectory(), "config", "favicons");
         ExistOrCreate(FaviconDirectory);
@@ -25,21 +37,28 @@ index 8c6c796..711f315 100644
         ExistOrCreate(CustomizedTemplateDirectory);
         TemplateDirectory = FileSystem.Path.Join(FileSystem.Directory.GetCurrentDirectory(), "EmailTemplates");
diff --git a/API/Services/LocalizationService.cs b/API/Services/LocalizationService.cs
index ab3ad3d..f1a068b 100644
index 8abde664..2f207837 100644
--- a/API/Services/LocalizationService.cs
+++ b/API/Services/LocalizationService.cs
@@ -52,8 +52,7 @@ public class LocalizationService : ILocalizationService
@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text.Json;
@@ -57,9 +57,7 @@ public class LocalizationService : ILocalizationService
         }
         else
         {
             _localizationDirectoryUi = directoryService.FileSystem.Path.Join(
-            _localizationDirectoryUi = directoryService.FileSystem.Path.Join(
-                directoryService.FileSystem.Directory.GetCurrentDirectory(),
-                "wwwroot", "assets/langs");
+                "@webroot@", "assets/langs");
+            _localizationDirectoryUi = directoryService.FileSystem.Path.Join("@webroot@", "assets/langs");
         }
 
         _cacheOptions = new MemoryCacheEntryOptions()
diff --git a/API/Startup.cs b/API/Startup.cs
index 7e3857c..84c466b 100644
index fad79cee..073fcdee 100644
--- a/API/Startup.cs
+++ b/API/Startup.cs
@@ -36,6 +36,7 @@ using Microsoft.AspNetCore.StaticFiles;
@@ -50,25 +69,24 @@ index 7e3857c..84c466b 100644
 using Microsoft.Extensions.Hosting;
 using Microsoft.Extensions.Logging;
 using Microsoft.Net.Http.Headers;
@@ -314,9 +315,6 @@ public class Startup
@@ -353,8 +354,6 @@ public class Startup
         app.UsePathBase(basePath);
         if (!env.IsDevelopment())
         {
-            // We don't update the index.html in local as we don't serve from there
-            UpdateBaseUrlInIndex(basePath);
-
 
             // Update DB with what's in config
             var dataContext = serviceProvider.GetRequiredService<DataContext>();
             var setting = dataContext.ServerSetting.SingleOrDefault(x => x.Key == ServerSettingKey.BaseUrl);
@@ -360,6 +358,7 @@ public class Startup
@@ -399,6 +398,7 @@ public class Startup
 
         app.UseStaticFiles(new StaticFileOptions
         {
+            FileProvider = new PhysicalFileProvider("@webroot@"),
             // bcmap files needed for PDF reader localizations (https://github.com/Kareadita/Kavita/issues/2970)
             // ftl files are needed for PDF zoom options (https://github.com/Kareadita/Kavita/issues/3995)
             ContentTypeProvider = new FileExtensionContentTypeProvider
             {
@@ -439,7 +438,7 @@ public class Startup
@@ -481,7 +481,7 @@ public class Startup
         try
         {
             var htmlDoc = new HtmlDocument();
+172 −167

File changed.

Preview size limit exceeded, changes collapsed.

+3 −3
Original line number Diff line number Diff line
@@ -10,13 +10,13 @@

stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "kavita";
  version = "0.8.7";
  version = "0.8.8.3";

  src = fetchFromGitHub {
    owner = "kareadita";
    repo = "kavita";
    rev = "v${finalAttrs.version}";
    hash = "sha256-jRP7ts6+jogPdmP+DfzeijlG70kvJWgf8da/sTBT9d4=";
    hash = "sha256-Va3scgMxcLhqP+s7x/iDneCPZQCF0iOIQAfTJENcvOI=";
  };

  backend = buildDotnetModule {
@@ -54,7 +54,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
    npmBuildScript = "prod";
    npmFlags = [ "--legacy-peer-deps" ];
    npmRebuildFlags = [ "--ignore-scripts" ]; # Prevent playwright from trying to install browsers
    npmDepsHash = "sha256-/fBUOlZfNGyRu9mfniSMBKHPNgNsZNpbFZpVrFwBtb4=";
    npmDepsHash = "sha256-SqW9qeg0CKfVKYsDXmVsnVNmcH7YkaXtXpPjIqGL0i0=";
  };

  dontBuild = true;