More Bugfixes (#2685)
This commit is contained in:
parent
4a9519b6dc
commit
061b363f96
31 changed files with 162 additions and 119 deletions
|
@ -17,6 +17,7 @@ import {FilterCombination} from "../_models/metadata/v2/filter-combination";
|
|||
import {SeriesFilterV2} from "../_models/metadata/v2/series-filter-v2";
|
||||
import {FilterStatement} from "../_models/metadata/v2/filter-statement";
|
||||
import {SeriesDetailPlus} from "../_models/series-detail/series-detail-plus";
|
||||
import {LibraryType} from "../_models/library/library";
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
|
@ -28,8 +29,8 @@ export class MetadataService {
|
|||
|
||||
constructor(private httpClient: HttpClient) { }
|
||||
|
||||
getSeriesMetadataFromPlus(seriesId: number) {
|
||||
return this.httpClient.get<SeriesDetailPlus | null>(this.baseUrl + 'metadata/series-detail-plus?seriesId=' + seriesId);
|
||||
getSeriesMetadataFromPlus(seriesId: number, libraryType: LibraryType) {
|
||||
return this.httpClient.get<SeriesDetailPlus | null>(this.baseUrl + 'metadata/series-detail-plus?seriesId=' + seriesId + '&libraryType=' + libraryType);
|
||||
}
|
||||
|
||||
getAllAgeRatings(libraries?: Array<number>) {
|
||||
|
|
|
@ -47,7 +47,7 @@ import {
|
|||
SideNavCompanionBarComponent
|
||||
} from '../../../sidenav/_components/side-nav-companion-bar/side-nav-companion-bar.component';
|
||||
import {takeUntilDestroyed} from "@angular/core/rxjs-interop";
|
||||
import {TranslocoDirective, TranslocoService} from "@ngneat/transloco";
|
||||
import {translate, TranslocoDirective, TranslocoService} from "@ngneat/transloco";
|
||||
import {CardActionablesComponent} from "../../../_single-module/card-actionables/card-actionables.component";
|
||||
import {FilterField} from "../../../_models/metadata/v2/filter-field";
|
||||
import {FilterComparison} from "../../../_models/metadata/v2/filter-comparison";
|
||||
|
@ -266,6 +266,12 @@ export class CollectionDetailComponent implements OnInit, AfterContentChecked {
|
|||
case(Action.Edit):
|
||||
this.openEditCollectionTagModal(this.collectionTag);
|
||||
break;
|
||||
case (Action.Delete):
|
||||
this.collectionService.deleteTag(this.collectionTag.id).subscribe(() => {
|
||||
this.toastr.success(translate('toasts.collection-tag-deleted'));
|
||||
this.router.navigateByUrl('collections');
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -598,9 +598,6 @@ export class SeriesDetailComponent implements OnInit, AfterContentChecked {
|
|||
});
|
||||
this.setContinuePoint();
|
||||
|
||||
if (loadExternal) {
|
||||
this.loadPlusMetadata(this.seriesId);
|
||||
}
|
||||
|
||||
forkJoin({
|
||||
libType: this.libraryService.getLibraryType(this.libraryId),
|
||||
|
@ -609,6 +606,10 @@ export class SeriesDetailComponent implements OnInit, AfterContentChecked {
|
|||
this.libraryType = results.libType;
|
||||
this.series = results.series;
|
||||
|
||||
if (loadExternal) {
|
||||
this.loadPlusMetadata(this.seriesId, this.libraryType);
|
||||
}
|
||||
|
||||
this.titleService.setTitle('Kavita - ' + this.series.name + ' Details');
|
||||
|
||||
this.seriesActions = this.actionFactoryService.getSeriesActions(this.handleSeriesActionCallback.bind(this))
|
||||
|
@ -706,8 +707,8 @@ export class SeriesDetailComponent implements OnInit, AfterContentChecked {
|
|||
}
|
||||
|
||||
|
||||
loadPlusMetadata(seriesId: number) {
|
||||
this.metadataService.getSeriesMetadataFromPlus(seriesId).subscribe(data => {
|
||||
loadPlusMetadata(seriesId: number, libraryType: LibraryType) {
|
||||
this.metadataService.getSeriesMetadataFromPlus(seriesId, libraryType).subscribe(data => {
|
||||
if (data === null) return;
|
||||
|
||||
// Reviews
|
||||
|
|
|
@ -2059,7 +2059,8 @@
|
|||
"smart-filter-deleted": "Smart Filter Deleted",
|
||||
"smart-filter-updated": "Created/Updated smart filter",
|
||||
"external-source-already-exists": "An External Source already exists with the same Name/Host/API Key",
|
||||
"anilist-token-expired": "Your AniList token is expired. Scrobbling will no longer process until you re-generate it in User Settings > Account"
|
||||
"anilist-token-expired": "Your AniList token is expired. Scrobbling will no longer process until you re-generate it in User Settings > Account",
|
||||
"collection-tag-deleted": "Collection Tag deleted"
|
||||
},
|
||||
|
||||
"actionable": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue