Scanner Fixes (#2800)
This commit is contained in:
parent
123917fbec
commit
8167fc5a4f
34 changed files with 462 additions and 203 deletions
|
@ -32,7 +32,7 @@ export class LibraryService {
|
|||
return of(this.libraryNames);
|
||||
}
|
||||
|
||||
return this.httpClient.get<Library[]>(this.baseUrl + 'library').pipe(map(libraries => {
|
||||
return this.httpClient.get<Library[]>(this.baseUrl + 'library/libraries').pipe(map(libraries => {
|
||||
this.libraryNames = {};
|
||||
libraries.forEach(lib => {
|
||||
if (this.libraryNames !== undefined) {
|
||||
|
@ -47,7 +47,7 @@ export class LibraryService {
|
|||
if (this.libraryNames != undefined && this.libraryNames.hasOwnProperty(libraryId)) {
|
||||
return of(this.libraryNames[libraryId]);
|
||||
}
|
||||
return this.httpClient.get<Library[]>(this.baseUrl + 'library').pipe(map(l => {
|
||||
return this.httpClient.get<Library[]>(this.baseUrl + 'library/libraries').pipe(map(l => {
|
||||
this.libraryNames = {};
|
||||
l.forEach(lib => {
|
||||
if (this.libraryNames !== undefined) {
|
||||
|
@ -75,8 +75,12 @@ export class LibraryService {
|
|||
return this.httpClient.get<JumpKey[]>(this.baseUrl + 'library/jump-bar?libraryId=' + libraryId);
|
||||
}
|
||||
|
||||
getLibrary(libraryId: number) {
|
||||
return this.httpClient.get<Library>(this.baseUrl + 'library?libraryId=' + libraryId);
|
||||
}
|
||||
|
||||
getLibraries() {
|
||||
return this.httpClient.get<Library[]>(this.baseUrl + 'library');
|
||||
return this.httpClient.get<Library[]>(this.baseUrl + 'library/libraries');
|
||||
}
|
||||
|
||||
updateLibrariesForMember(username: string, selectedLibraries: Library[]) {
|
||||
|
|
|
@ -55,13 +55,6 @@ export class ManageTasksSettingsComponent implements OnInit {
|
|||
api: this.serverService.convertMedia(),
|
||||
successMessage: 'convert-media-task-success'
|
||||
},
|
||||
// I removed this as it's not really needed, given that External Recs are the only thing that fill this cache now
|
||||
// {
|
||||
// name: 'bust-cache-task',
|
||||
// description: 'bust-cache-task-desc',
|
||||
// api: this.serverService.bustCache(),
|
||||
// successMessage: 'bust-cache-task-success'
|
||||
// },
|
||||
{
|
||||
name: 'bust-locale-task',
|
||||
description: 'bust-locale-task-desc',
|
||||
|
@ -245,20 +238,20 @@ export class ManageTasksSettingsComponent implements OnInit {
|
|||
modelSettings.taskScan = this.settingsForm.get('taskScan')?.value;
|
||||
modelSettings.taskCleanup = this.settingsForm.get('taskCleanup')?.value;
|
||||
|
||||
if (this.serverSettings.taskBackup === this.customOption) {
|
||||
if (modelSettings.taskBackup === this.customOption) {
|
||||
modelSettings.taskBackup = this.settingsForm.get('taskBackupCustom')?.value;
|
||||
}
|
||||
|
||||
if (this.serverSettings.taskScan === this.customOption) {
|
||||
if (modelSettings.taskScan === this.customOption) {
|
||||
modelSettings.taskScan = this.settingsForm.get('taskScanCustom')?.value;
|
||||
}
|
||||
|
||||
if (this.serverSettings.taskScan === this.customOption) {
|
||||
if (modelSettings.taskCleanup === this.customOption) {
|
||||
modelSettings.taskCleanup = this.settingsForm.get('taskCleanupCustom')?.value;
|
||||
}
|
||||
|
||||
|
||||
this.settingsService.updateServerSettings(modelSettings).pipe(take(1)).subscribe(async (settings: ServerSettings) => {
|
||||
this.settingsService.updateServerSettings(modelSettings).pipe(take(1)).subscribe((settings: ServerSettings) => {
|
||||
this.serverSettings = settings;
|
||||
this.resetForm();
|
||||
this.recurringTasks$ = this.serverService.getRecurringJobs().pipe(shareReplay());
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<div class="mt-3">
|
||||
@if (isAdmin) {
|
||||
<div class="d-flex justify-content-center">
|
||||
<p>{{t('no-libraries')}} <a routerLink="/admin/dashboard" fragment="libraries">{{t('server-settings-link')}}</a></p>
|
||||
<p>{{t('no-libraries')}} <a routerLink="/admin/dashboard" fragment="libraries">{{t('server-settings-link')}}</a>.</p>
|
||||
</div>
|
||||
} @else {
|
||||
<div class="d-flex justify-content-center">
|
||||
|
|
|
@ -231,7 +231,23 @@ export class LibraryDetailComponent implements OnInit {
|
|||
async handleAction(action: ActionItem<Library>, library: Library) {
|
||||
let lib: Partial<Library> = library;
|
||||
if (library === undefined) {
|
||||
lib = {id: this.libraryId, name: this.libraryName};
|
||||
//lib = {id: this.libraryId, name: this.libraryName}; // BUG: We need the whole library for editLibrary
|
||||
this.libraryService.getLibrary(this.libraryId).subscribe(async library => {
|
||||
switch (action.action) {
|
||||
case(Action.Scan):
|
||||
await this.actionService.scanLibrary(library);
|
||||
break;
|
||||
case(Action.RefreshMetadata):
|
||||
await this.actionService.refreshMetadata(library);
|
||||
break;
|
||||
case(Action.Edit):
|
||||
this.actionService.editLibrary(library);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
return
|
||||
}
|
||||
switch (action.action) {
|
||||
case(Action.Scan):
|
||||
|
|
|
@ -33,11 +33,11 @@
|
|||
|
||||
<div class="mb-3">
|
||||
<label for="library-type" class="form-label">{{t('type-label')}}</label>
|
||||
<i class="fa fa-info-circle ms-1" placement="top" [ngbTooltip]="typeTooltip" role="button" tabindex="0"></i>
|
||||
<i class="fa fa-info-circle ms-1" placement="end" [ngbTooltip]="typeTooltip" role="button" tabindex="0"></i>
|
||||
@if(IsKavitaPlusEligible) {
|
||||
<span class="float-end">
|
||||
{{t('kavitaplus-eligible-label')}}
|
||||
<i class="fa fa-info-circle ms-1" placement="top" [ngbTooltip]="kavitaplusEligibleTooltip" role="button" tabindex="0"></i>
|
||||
<i class="fa fa-info-circle ms-1" placement="start" [ngbTooltip]="kavitaplusEligibleTooltip" role="button" tabindex="0"></i>
|
||||
</span>
|
||||
}
|
||||
<ng-template #typeTooltip>{{t('type-tooltip')}}</ng-template>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<label for="time-select-read-by-day" class="form-check-label"></label>
|
||||
<select id="time-select-read-by-day" class="form-select" formControlName="users"
|
||||
[class.is-invalid]="formGroup.get('users')?.invalid && formGroup.get('users')?.touched">
|
||||
<option [value]="0">All Users</option>
|
||||
<option [value]="0">{{t('all-users')}}</option>
|
||||
<option *ngFor="let item of users$ | async" [value]="item.id">{{item.username}}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<ng-container>
|
||||
<div class="col-auto mb-2">
|
||||
<app-icon-and-title [label]="t('total-series-label')" [clickable]="false" fontClasses="fa-solid fa-book-open" [title]="t('total-series-tooltip', {count: stats.seriesCount | number})">
|
||||
{{stats.seriesCount | compactNumber}} Series
|
||||
{{t('series-count', {num: stats.seriesCount | number})}}
|
||||
</app-icon-and-title>
|
||||
</div>
|
||||
<div class="vr d-none d-lg-block m-2"></div>
|
||||
|
@ -13,7 +13,7 @@
|
|||
<ng-container >
|
||||
<div class="col-auto mb-2">
|
||||
<app-icon-and-title [label]="t('total-volumes-label')" [clickable]="false" fontClasses="fas fa-book" [title]="t('total-volumes-tooltip', {count: stats.volumeCount | number})">
|
||||
{{stats.volumeCount | compactNumber}} Volumes
|
||||
{{t('volume-count', {num: stats.volumeCount | number})}}
|
||||
</app-icon-and-title>
|
||||
</div>
|
||||
<div class="vr d-none d-lg-block m-2"></div>
|
||||
|
@ -22,7 +22,7 @@
|
|||
<ng-container>
|
||||
<div class="col-auto mb-2">
|
||||
<app-icon-and-title [label]="t('total-files-label')" [clickable]="false" fontClasses="fa-regular fa-file" [title]="t('total-files-tooltip', {count: stats.totalFiles | number})">
|
||||
{{stats.totalFiles | compactNumber}} Files
|
||||
{{t('file-count', {num: stats.totalFiles | number})}}
|
||||
</app-icon-and-title>
|
||||
</div>
|
||||
<div class="vr d-none d-lg-block m-2"></div>
|
||||
|
@ -39,7 +39,7 @@
|
|||
|
||||
<ng-container>
|
||||
<div class="col-auto mb-2">
|
||||
<app-icon-and-title label="Total Genres" [clickable]="true" fontClasses="fa-solid fa-tags" [title]="t('total-genres-tooltip', {count: stats.totalGenres | number})" (click)="openGenreList();$event.stopPropagation();">
|
||||
<app-icon-and-title [label]="t('total-genres-label')" [clickable]="true" fontClasses="fa-solid fa-tags" [title]="t('total-genres-tooltip', {count: stats.totalGenres | number})" (click)="openGenreList();$event.stopPropagation();">
|
||||
{{t('genre-count', {num: stats.totalGenres | compactNumber})}}
|
||||
</app-icon-and-title>
|
||||
</div>
|
||||
|
@ -88,7 +88,7 @@
|
|||
</app-stat-list>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<app-stat-list [data$]="recentlyRead$" title="Recently Read" [image]="seriesImage" [handleClick]="openSeries"></app-stat-list>
|
||||
<app-stat-list [data$]="recentlyRead$" [title]="t('recently-read-title')" [image]="seriesImage" [handleClick]="openSeries"></app-stat-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -706,7 +706,7 @@
|
|||
"description": "Complete the form to register an admin account",
|
||||
"username-label": "{{common.username}}",
|
||||
"email-label": "{{common.email}}",
|
||||
"email-tooltip": "Email does not need to be a real address, but provides access to forgot password. It is not sent outside the server unless forgot password is used without a custom email service host.",
|
||||
"email-tooltip": "Email does not need to be a real address, but provides access to forgot password. It is not sent outside the server unless Kavita emails you.",
|
||||
"password-label": "{{common.password}}",
|
||||
"required-field": "{{validation.required-field}}",
|
||||
"valid-email": "{{validation.valid-email}}",
|
||||
|
@ -1779,6 +1779,7 @@
|
|||
"y-axis-label": "Hours Read",
|
||||
"no-data": "No Reading Progress",
|
||||
"time-frame-label": "Time Frame",
|
||||
"all-users": "All Users",
|
||||
"this-week": "{{time-periods.this-week}}",
|
||||
"last-7-days": "{{time-periods.last-7-days}}",
|
||||
"last-30-days": "{{time-periods.last-30-days}}",
|
||||
|
@ -1841,6 +1842,9 @@
|
|||
"popular-libraries-title": "Popular Libraries",
|
||||
"popular-series-title": "Popular Series",
|
||||
"recently-read-title": "Recently Read",
|
||||
"series-count": "{{num}} Series",
|
||||
"volume-count": "{{num}} Volumes",
|
||||
"file-count": "{{num}} Files",
|
||||
"genre-count": "{{num}} Genres",
|
||||
"tag-count": "{{num}} Tags",
|
||||
"people-count": "{{num}} People",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue