Fixed an issue where docker installs were trying to update wwwroot, when docker doesn't do reverse proxy stuff. (#1880)
Fixed a bug in reading list date calculations.
This commit is contained in:
parent
71cb26752d
commit
0617d71d6b
5 changed files with 134 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using API.Entities;
|
||||
using API.Entities.Enums;
|
||||
|
||||
|
@ -21,6 +22,12 @@ public class ChapterBuilder : IEntityBuilder<Chapter>
|
|||
};
|
||||
}
|
||||
|
||||
public ChapterBuilder WithReleaseDate(DateTime time)
|
||||
{
|
||||
_chapter.ReleaseDate = time;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ChapterBuilder WithAgeRating(AgeRating rating)
|
||||
{
|
||||
_chapter.AgeRating = rating;
|
||||
|
|
|
@ -299,7 +299,7 @@ public class ReadingListService : IReadingListService
|
|||
return;
|
||||
}
|
||||
var maxReleaseDate = items.Max(item => item.Chapter.ReleaseDate);
|
||||
var minReleaseDate = items.Max(item => item.Chapter.ReleaseDate);
|
||||
var minReleaseDate = items.Min(item => item.Chapter.ReleaseDate);
|
||||
if (maxReleaseDate != DateTime.MinValue)
|
||||
{
|
||||
readingListWithItems.EndingMonth = maxReleaseDate.Month;
|
||||
|
|
|
@ -364,6 +364,7 @@ public class Startup
|
|||
|
||||
private static void UpdateBaseUrlInIndex(string baseUrl)
|
||||
{
|
||||
if (new OsInfo(Array.Empty<IOsVersionAdapter>()).IsDocker) return;
|
||||
var htmlDoc = new HtmlDocument();
|
||||
var indexHtmlPath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "index.html");
|
||||
htmlDoc.Load(indexHtmlPath);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue