Bugfix/misc cleanup (#745)
* Change update check to be between noon and 6pm. * Added a UI change that was missed * Fixed an issue on register user where input boxes were not styled correctly * Fixed renaming a series to an existing series name of a different format. * Change webtoon reader debug mode
This commit is contained in:
parent
46b2bebeb6
commit
dd4aedc323
10 changed files with 60 additions and 12 deletions
|
|
@ -7,6 +7,7 @@ using API.DTOs;
|
|||
using API.DTOs.CollectionTags;
|
||||
using API.DTOs.Filtering;
|
||||
using API.Entities;
|
||||
using API.Entities.Enums;
|
||||
using API.Extensions;
|
||||
using API.Helpers;
|
||||
using API.Interfaces.Repositories;
|
||||
|
|
@ -47,16 +48,22 @@ namespace API.Data.Repositories
|
|||
_context.Series.RemoveRange(series);
|
||||
}
|
||||
|
||||
public async Task<bool> DoesSeriesNameExistInLibrary(string name)
|
||||
/// <summary>
|
||||
/// Returns if a series name and format exists already in a library
|
||||
/// </summary>
|
||||
/// <param name="name">Name of series</param>
|
||||
/// <param name="format">Format of series</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoesSeriesNameExistInLibrary(string name, MangaFormat format)
|
||||
{
|
||||
var libraries = _context.Series
|
||||
.AsNoTracking()
|
||||
.Where(x => x.Name == name)
|
||||
.Where(x => x.Name.Equals(name) && x.Format == format)
|
||||
.Select(s => s.LibraryId);
|
||||
|
||||
return await _context.Series
|
||||
.AsNoTracking()
|
||||
.Where(s => libraries.Contains(s.LibraryId) && s.Name == name)
|
||||
.Where(s => libraries.Contains(s.LibraryId) && s.Name.Equals(name) && s.Format == format)
|
||||
.CountAsync() > 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace API.Data
|
|||
|
||||
IList<ServerSetting> defaultSettings = new List<ServerSetting>()
|
||||
{
|
||||
new() {Key = ServerSettingKey.CacheDirectory, Value = DirectoryService.CacheDirectory},
|
||||
new () {Key = ServerSettingKey.CacheDirectory, Value = DirectoryService.CacheDirectory},
|
||||
new () {Key = ServerSettingKey.TaskScan, Value = "daily"},
|
||||
new () {Key = ServerSettingKey.LoggingLevel, Value = "Information"}, // Not used from DB, but DB is sync with appSettings.json
|
||||
new () {Key = ServerSettingKey.TaskBackup, Value = "weekly"},
|
||||
|
|
@ -51,6 +51,7 @@ namespace API.Data
|
|||
new () {Key = ServerSettingKey.EnableOpds, Value = "false"},
|
||||
new () {Key = ServerSettingKey.EnableAuthentication, Value = "true"},
|
||||
new () {Key = ServerSettingKey.BaseUrl, Value = "/"},
|
||||
new () {Key = ServerSettingKey.InstallId, Value = HashUtil.AnonymousToken()},
|
||||
};
|
||||
|
||||
foreach (var defaultSetting in defaultSettings)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue