mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-06-02 21:24:18 -04:00
Polish for Release (#2841)
This commit is contained in:
parent
a76de06087
commit
e6e228c3d9
@ -6,7 +6,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.3" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.4" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
|
||||||
<PackageReference Include="NSubstitute" Version="5.1.0" />
|
<PackageReference Include="NSubstitute" Version="5.1.0" />
|
||||||
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="21.0.2" />
|
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="21.0.2" />
|
||||||
|
@ -53,9 +53,9 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CsvHelper" Version="31.0.2" />
|
<PackageReference Include="CsvHelper" Version="31.0.3" />
|
||||||
<PackageReference Include="MailKit" Version="4.4.0" />
|
<PackageReference Include="MailKit" Version="4.4.0" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.3">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.4">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
@ -65,18 +65,18 @@
|
|||||||
<PackageReference Include="ExCSS" Version="4.2.5" />
|
<PackageReference Include="ExCSS" Version="4.2.5" />
|
||||||
<PackageReference Include="Flurl" Version="3.0.7" />
|
<PackageReference Include="Flurl" Version="3.0.7" />
|
||||||
<PackageReference Include="Flurl.Http" Version="3.2.4" />
|
<PackageReference Include="Flurl.Http" Version="3.2.4" />
|
||||||
<PackageReference Include="Hangfire" Version="1.8.11" />
|
<PackageReference Include="Hangfire" Version="1.8.12" />
|
||||||
<PackageReference Include="Hangfire.InMemory" Version="0.8.1" />
|
<PackageReference Include="Hangfire.InMemory" Version="0.8.1" />
|
||||||
<PackageReference Include="Hangfire.MaximumConcurrentExecutions" Version="1.1.0" />
|
<PackageReference Include="Hangfire.MaximumConcurrentExecutions" Version="1.1.0" />
|
||||||
<PackageReference Include="Hangfire.Storage.SQLite" Version="0.4.1" />
|
<PackageReference Include="Hangfire.Storage.SQLite" Version="0.4.1" />
|
||||||
<PackageReference Include="HtmlAgilityPack" Version="1.11.60" />
|
<PackageReference Include="HtmlAgilityPack" Version="1.11.60" />
|
||||||
<PackageReference Include="MarkdownDeep.NET.Core" Version="1.5.0.4" />
|
<PackageReference Include="MarkdownDeep.NET.Core" Version="1.5.0.4" />
|
||||||
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.11" />
|
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.12" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.1.0" />
|
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.1.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.3" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.4" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.3" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.4" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.3" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.4" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.3" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.4" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.0" />
|
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.0" />
|
||||||
<PackageReference Include="MimeTypeMapOfficial" Version="1.0.17" />
|
<PackageReference Include="MimeTypeMapOfficial" Version="1.0.17" />
|
||||||
@ -95,15 +95,15 @@
|
|||||||
<PackageReference Include="Serilog.Sinks.SignalR.Core" Version="0.1.2" />
|
<PackageReference Include="Serilog.Sinks.SignalR.Core" Version="0.1.2" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.36.0" />
|
<PackageReference Include="SharpCompress" Version="0.36.0" />
|
||||||
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.3" />
|
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.3" />
|
||||||
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.23.0.88079">
|
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.23.1.88495">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="8.0.1" />
|
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="8.0.1" />
|
||||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.5.0" />
|
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.5.1" />
|
||||||
<PackageReference Include="System.IO.Abstractions" Version="21.0.2" />
|
<PackageReference Include="System.IO.Abstractions" Version="21.0.2" />
|
||||||
<PackageReference Include="System.Drawing.Common" Version="8.0.3" />
|
<PackageReference Include="System.Drawing.Common" Version="8.0.4" />
|
||||||
<PackageReference Include="VersOne.Epub" Version="3.3.1" />
|
<PackageReference Include="VersOne.Epub" Version="3.3.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@ -205,14 +205,12 @@ public class LicenseService(
|
|||||||
InstallId = HashUtil.ServerToken()
|
InstallId = HashUtil.ServerToken()
|
||||||
})
|
})
|
||||||
.ReceiveString();
|
.ReceiveString();
|
||||||
|
|
||||||
var result = bool.Parse(response);
|
var result = bool.Parse(response);
|
||||||
|
|
||||||
if (!result)
|
var provider = cachingProviderFactory.GetCachingProvider(EasyCacheProfiles.License);
|
||||||
{
|
await provider.FlushAsync();
|
||||||
var provider = cachingProviderFactory.GetCachingProvider(EasyCacheProfiles.License);
|
await provider.SetAsync(CacheKey, result, _licenseCacheTimeout);
|
||||||
await provider.FlushAsync();
|
|
||||||
await provider.SetAsync(CacheKey, result, _licenseCacheTimeout);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -229,6 +227,7 @@ public class LicenseService(
|
|||||||
serverSetting.Value = string.Empty;
|
serverSetting.Value = string.Empty;
|
||||||
unitOfWork.SettingsRepository.Update(serverSetting);
|
unitOfWork.SettingsRepository.Update(serverSetting);
|
||||||
await unitOfWork.CommitAsync();
|
await unitOfWork.CommitAsync();
|
||||||
|
|
||||||
var provider = cachingProviderFactory.GetCachingProvider(EasyCacheProfiles.License);
|
var provider = cachingProviderFactory.GetCachingProvider(EasyCacheProfiles.License);
|
||||||
await provider.RemoveAsync(CacheKey);
|
await provider.RemoveAsync(CacheKey);
|
||||||
}
|
}
|
||||||
|
@ -169,12 +169,12 @@ public class TaskScheduler : ITaskScheduler
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RecurringJob.AddOrUpdate(CheckScrobblingTokensId, () => _scrobblingService.CheckExternalAccessTokens(),
|
RecurringJob.AddOrUpdate(CheckScrobblingTokensId, () => _scrobblingService.CheckExternalAccessTokens(),
|
||||||
Cron.Daily, RecurringJobOptions);
|
Cron.Daily, RecurringJobOptions);
|
||||||
BackgroundJob.Enqueue(() => _scrobblingService.CheckExternalAccessTokens()); // We also kick off an immediate check on startup
|
BackgroundJob.Enqueue(() => _scrobblingService.CheckExternalAccessTokens()); // We also kick off an immediate check on startup
|
||||||
RecurringJob.AddOrUpdate(LicenseCheckId, () => _licenseService.HasActiveLicense(true),
|
RecurringJob.AddOrUpdate(LicenseCheckId, () => _licenseService.HasActiveLicense(true),
|
||||||
LicenseService.Cron, RecurringJobOptions);
|
LicenseService.Cron, RecurringJobOptions);
|
||||||
BackgroundJob.Enqueue(() => _licenseService.HasActiveLicense(true));
|
|
||||||
|
|
||||||
// KavitaPlus Scrobbling (every 4 hours)
|
// KavitaPlus Scrobbling (every 4 hours)
|
||||||
RecurringJob.AddOrUpdate(ProcessScrobblingEventsId, () => _scrobblingService.ProcessUpdatesSinceLastSync(),
|
RecurringJob.AddOrUpdate(ProcessScrobblingEventsId, () => _scrobblingService.ProcessUpdatesSinceLastSync(),
|
||||||
|
@ -254,7 +254,7 @@ public class ScannerService : IScannerService
|
|||||||
// Transform seen series into the parsedSeries (I think we can actually just have processedSeries be used instead
|
// Transform seen series into the parsedSeries (I think we can actually just have processedSeries be used instead
|
||||||
TrackFoundSeriesAndFiles(parsedSeries, processedSeries);
|
TrackFoundSeriesAndFiles(parsedSeries, processedSeries);
|
||||||
|
|
||||||
_logger.LogInformation("ScanFiles for {Series} took {Time}", series.Name, scanElapsedTime);
|
_logger.LogInformation("ScanFiles for {Series} took {Time} milliseconds", series.Name, scanElapsedTime);
|
||||||
|
|
||||||
// We now technically have all scannedSeries, we could invoke each Series to be scanned
|
// We now technically have all scannedSeries, we could invoke each Series to be scanned
|
||||||
|
|
||||||
|
@ -147,6 +147,6 @@ public class TokenService : ITokenService
|
|||||||
if (string.IsNullOrEmpty(token)) return true;
|
if (string.IsNullOrEmpty(token)) return true;
|
||||||
var tokenHandler = new JwtSecurityTokenHandler();
|
var tokenHandler = new JwtSecurityTokenHandler();
|
||||||
var tokenContent = tokenHandler.ReadJwtToken(token);
|
var tokenContent = tokenHandler.ReadJwtToken(token);
|
||||||
return tokenContent.ValidTo <= DateTime.UtcNow;
|
return tokenContent.ValidTo >= DateTime.UtcNow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<PackageReference Include="Flurl.Http" Version="3.2.4" />
|
<PackageReference Include="Flurl.Http" Version="3.2.4" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
||||||
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.23.0.88079">
|
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.23.1.88495">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
@ -115,6 +115,7 @@ export class AccountService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hasValidLicense(forceCheck: boolean = false) {
|
hasValidLicense(forceCheck: boolean = false) {
|
||||||
|
console.log('hasValidLicense being called: ', forceCheck);
|
||||||
return this.httpClient.get<string>(this.baseUrl + 'license/valid-license?forceCheck=' + forceCheck, TextResonse)
|
return this.httpClient.get<string>(this.baseUrl + 'license/valid-license?forceCheck=' + forceCheck, TextResonse)
|
||||||
.pipe(
|
.pipe(
|
||||||
map(res => res === "true"),
|
map(res => res === "true"),
|
||||||
|
@ -49,16 +49,21 @@ export class LicenseComponent implements OnInit {
|
|||||||
this.formGroup.addControl('licenseKey', new FormControl('', [Validators.required]));
|
this.formGroup.addControl('licenseKey', new FormControl('', [Validators.required]));
|
||||||
this.formGroup.addControl('email', new FormControl('', [Validators.required]));
|
this.formGroup.addControl('email', new FormControl('', [Validators.required]));
|
||||||
this.formGroup.addControl('discordId', new FormControl('', [Validators.pattern(/\d+/)]));
|
this.formGroup.addControl('discordId', new FormControl('', [Validators.pattern(/\d+/)]));
|
||||||
|
|
||||||
|
this.isChecking = true;
|
||||||
|
this.cdRef.markForCheck();
|
||||||
|
|
||||||
this.accountService.hasAnyLicense().subscribe(res => {
|
this.accountService.hasAnyLicense().subscribe(res => {
|
||||||
this.hasLicense = res;
|
this.hasLicense = res;
|
||||||
this.cdRef.markForCheck();
|
this.cdRef.markForCheck();
|
||||||
});
|
|
||||||
this.isChecking = true;
|
if (this.hasLicense) {
|
||||||
this.cdRef.markForCheck();
|
this.accountService.hasValidLicense().subscribe(res => {
|
||||||
this.accountService.hasValidLicense().subscribe(res => {
|
this.hasValidLicense = res;
|
||||||
this.hasValidLicense = res;
|
this.isChecking = false;
|
||||||
this.isChecking = false;
|
this.cdRef.markForCheck();
|
||||||
this.cdRef.markForCheck();
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
<input width="100%" #title ngbAutofocus type="text" class="form-control mb-2" id="add-rlist" formControlName="title">
|
<input width="100%" #title ngbAutofocus type="text" class="form-control mb-2" id="add-rlist" formControlName="title">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<button type="submit" class="btn btn-primary" (click)="create()">{{t('create')}}</button>
|
<button type="submit" class="btn btn-primary" [disabled]="isCreating" (click)="create()">{{t('create')}}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -48,6 +48,7 @@ export class BulkAddToCollectionComponent implements OnInit, AfterViewInit {
|
|||||||
*/
|
*/
|
||||||
lists: Array<UserCollection> = [];
|
lists: Array<UserCollection> = [];
|
||||||
loading: boolean = false;
|
loading: boolean = false;
|
||||||
|
isCreating: boolean = false;
|
||||||
listForm: FormGroup = new FormGroup({});
|
listForm: FormGroup = new FormGroup({});
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
@ -77,9 +78,13 @@ export class BulkAddToCollectionComponent implements OnInit, AfterViewInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
|
if (this.isCreating) return;
|
||||||
const tagName = this.listForm.value.title;
|
const tagName = this.listForm.value.title;
|
||||||
|
this.isCreating = true;
|
||||||
|
this.cdRef.markForCheck();
|
||||||
this.collectionService.addByMultiple(0, this.seriesIds, tagName).subscribe(() => {
|
this.collectionService.addByMultiple(0, this.seriesIds, tagName).subscribe(() => {
|
||||||
this.toastr.success(translate('toasts.series-added-to-collection', {collectionName: tagName}));
|
this.toastr.success(translate('toasts.series-added-to-collection', {collectionName: tagName}));
|
||||||
|
this.isCreating = false;
|
||||||
this.modal.close();
|
this.modal.close();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -299,8 +299,8 @@ export class MetadataFilterRowComponent implements OnInit {
|
|||||||
case FilterField.Penciller: return this.getPersonOptions(PersonRole.Penciller);
|
case FilterField.Penciller: return this.getPersonOptions(PersonRole.Penciller);
|
||||||
case FilterField.Publisher: return this.getPersonOptions(PersonRole.Publisher);
|
case FilterField.Publisher: return this.getPersonOptions(PersonRole.Publisher);
|
||||||
case FilterField.Imprint: return this.getPersonOptions(PersonRole.Imprint);
|
case FilterField.Imprint: return this.getPersonOptions(PersonRole.Imprint);
|
||||||
case FilterField.Team: return this.getPersonOptions(PersonRole.Imprint);
|
case FilterField.Team: return this.getPersonOptions(PersonRole.Team);
|
||||||
case FilterField.Location: return this.getPersonOptions(PersonRole.Imprint);
|
case FilterField.Location: return this.getPersonOptions(PersonRole.Location);
|
||||||
case FilterField.Translators: return this.getPersonOptions(PersonRole.Translator);
|
case FilterField.Translators: return this.getPersonOptions(PersonRole.Translator);
|
||||||
case FilterField.Writers: return this.getPersonOptions(PersonRole.Writer);
|
case FilterField.Writers: return this.getPersonOptions(PersonRole.Writer);
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
<div>{{t('no-data')}}</div>
|
<div>{{t('no-data')}}</div>
|
||||||
} @else {
|
} @else {
|
||||||
<ngb-progressbar-stacked>
|
<ngb-progressbar-stacked>
|
||||||
<ngb-progressbar type="danger" [value]="errorPercent" [ngbTooltip]="t('errored-series-label') + ' ' + breakdown.erroredSeries"></ngb-progressbar>
|
<ngb-progressbar type="danger" [showValue]="true" [value]="errorPercent" [ngbTooltip]="t('errored-series-label') + ' ' + breakdown.erroredSeries"></ngb-progressbar>
|
||||||
<ngb-progressbar type="success" [value]="completedPercent" [ngbTooltip]="t('completed-series-label') + ' ' + breakdown.seriesCompleted"></ngb-progressbar>
|
<ngb-progressbar type="success" [showValue]="true" [value]="completedPercent" [ngbTooltip]="t('completed-series-label') + ' ' + breakdown.seriesCompleted"></ngb-progressbar>
|
||||||
</ngb-progressbar-stacked>
|
</ngb-progressbar-stacked>
|
||||||
@if (breakdown.seriesCompleted >= breakdown.totalSeries) {
|
@if (breakdown.seriesCompleted >= breakdown.totalSeries) {
|
||||||
<p>{{t('complete') }}
|
<p>{{t('complete') }}
|
||||||
|
@ -60,7 +60,7 @@ export class ManageScrobblingProvidersComponent implements OnInit {
|
|||||||
loaded: boolean = false;
|
loaded: boolean = false;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.accountService.hasValidLicense().subscribe(res => {
|
this.accountService.hasValidLicense$.subscribe(res => {
|
||||||
this.hasValidLicense = res;
|
this.hasValidLicense = res;
|
||||||
this.cdRef.markForCheck();
|
this.cdRef.markForCheck();
|
||||||
if (this.hasValidLicense) {
|
if (this.hasValidLicense) {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"name": "GPL-3.0",
|
"name": "GPL-3.0",
|
||||||
"url": "https://github.com/Kareadita/Kavita/blob/develop/LICENSE"
|
"url": "https://github.com/Kareadita/Kavita/blob/develop/LICENSE"
|
||||||
},
|
},
|
||||||
"version": "0.7.14.13"
|
"version": "0.7.14.14"
|
||||||
},
|
},
|
||||||
"servers": [
|
"servers": [
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user