Tachiyomi Enhancements (#845)
* Added a new endpoint to get all Series with Progress info. * Fixed up some potential NPEs during scan * Commented out filter code, not ready for it. * Fixed up a parsing case for european comics * Refactored FilterDto to allow for specifying multiple formats to return. * Refactored FilterDto to allow for specifying multiple formats to return. * Refactored the UI to show OPDS as 3rd Party Clients since Tachiyomi now uses OPDS url scheme for authentication.
This commit is contained in:
parent
658ca290e1
commit
384ebcef5c
20 changed files with 120 additions and 99 deletions
|
@ -7,7 +7,7 @@ export interface FilterItem {
|
|||
}
|
||||
|
||||
export interface SeriesFilter {
|
||||
mangaFormat: MangaFormat | null;
|
||||
formats: Array<MangaFormat>;
|
||||
}
|
||||
|
||||
export const mangaFormatFilters = [
|
||||
|
|
|
@ -177,11 +177,13 @@ export class SeriesService {
|
|||
|
||||
createSeriesFilter(filter?: SeriesFilter) {
|
||||
const data: SeriesFilter = {
|
||||
mangaFormat: null
|
||||
formats: []
|
||||
};
|
||||
|
||||
if (filter) {
|
||||
data.mangaFormat = filter.mangaFormat;
|
||||
if (filter.formats != null) {
|
||||
data.formats = filter.formats;
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
|
|
|
@ -41,7 +41,7 @@ export class CollectionDetailComponent implements OnInit, OnDestroy {
|
|||
isAdmin: boolean = false;
|
||||
filters: Array<FilterItem> = mangaFormatFilters;
|
||||
filter: SeriesFilter = {
|
||||
mangaFormat: null
|
||||
formats: []
|
||||
};
|
||||
|
||||
private onDestory: Subject<void> = new Subject<void>();
|
||||
|
@ -175,7 +175,7 @@ export class CollectionDetailComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
updateFilter(data: UpdateFilterEvent) {
|
||||
this.filter.mangaFormat = data.filterItem.value;
|
||||
this.filter.formats = [data.filterItem.value];
|
||||
if (this.seriesPagination !== undefined && this.seriesPagination !== null) {
|
||||
this.seriesPagination.currentPage = 1;
|
||||
this.onPageChange(this.seriesPagination);
|
||||
|
|
|
@ -32,7 +32,7 @@ export class LibraryDetailComponent implements OnInit, OnDestroy {
|
|||
actions: ActionItem<Library>[] = [];
|
||||
filters: Array<FilterItem> = mangaFormatFilters;
|
||||
filter: SeriesFilter = {
|
||||
mangaFormat: null
|
||||
formats: []
|
||||
};
|
||||
onDestroy: Subject<void> = new Subject<void>();
|
||||
|
||||
|
@ -135,7 +135,7 @@ export class LibraryDetailComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
updateFilter(data: UpdateFilterEvent) {
|
||||
this.filter.mangaFormat = data.filterItem.value;
|
||||
this.filter.formats = [data.filterItem.value];
|
||||
if (this.pagination !== undefined && this.pagination !== null) {
|
||||
this.pagination.currentPage = 1;
|
||||
this.onPageChange(this.pagination);
|
||||
|
|
|
@ -25,7 +25,7 @@ export class OnDeckComponent implements OnInit {
|
|||
libraryId!: number;
|
||||
filters: Array<FilterItem> = mangaFormatFilters;
|
||||
filter: SeriesFilter = {
|
||||
mangaFormat: null
|
||||
formats: []
|
||||
};
|
||||
|
||||
constructor(private router: Router, private route: ActivatedRoute, private seriesService: SeriesService, private titleService: Title,
|
||||
|
@ -64,7 +64,7 @@ export class OnDeckComponent implements OnInit {
|
|||
}
|
||||
|
||||
updateFilter(data: UpdateFilterEvent) {
|
||||
this.filter.mangaFormat = data.filterItem.value;
|
||||
this.filter.formats = [data.filterItem.value];
|
||||
if (this.pagination !== undefined && this.pagination !== null) {
|
||||
this.pagination.currentPage = 1;
|
||||
this.onPageChange(this.pagination);
|
||||
|
|
|
@ -32,7 +32,7 @@ export class RecentlyAddedComponent implements OnInit, OnDestroy {
|
|||
|
||||
filters: Array<FilterItem> = mangaFormatFilters;
|
||||
filter: SeriesFilter = {
|
||||
mangaFormat: null
|
||||
formats: []
|
||||
};
|
||||
|
||||
onDestroy: Subject<void> = new Subject();
|
||||
|
@ -82,7 +82,8 @@ export class RecentlyAddedComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
updateFilter(data: UpdateFilterEvent) {
|
||||
this.filter.mangaFormat = data.filterItem.value;
|
||||
// TODO: Move this into card-layout component. It's the same except for callback
|
||||
this.filter.formats = [data.filterItem.value];
|
||||
if (this.pagination !== undefined && this.pagination !== null) {
|
||||
this.pagination.currentPage = 1;
|
||||
this.onPageChange(this.pagination);
|
||||
|
|
|
@ -213,21 +213,18 @@
|
|||
</ng-template>
|
||||
</ng-template>
|
||||
</ngb-panel>
|
||||
<ngb-panel id="api-panel" title="OPDS">
|
||||
<ngb-panel id="api-panel" title="3rd Party Clients">
|
||||
<ng-template ngbPanelHeader>
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<button ngbPanelToggle class="btn container-fluid text-left pl-0 accordion-header">OPDS</button>
|
||||
<button ngbPanelToggle class="btn container-fluid text-left pl-0 accordion-header">3rd Party Clients</button>
|
||||
<span class="pull-right"><i class="fa fa-angle-{{acc.isExpanded('api-panel') ? 'down' : 'up'}}" aria-hidden="true"></i></span>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template ngbPanelContent>
|
||||
<p class="alert alert-danger" role="alert" *ngIf="!opdsEnabled">
|
||||
OPDS is not enabled on this server!
|
||||
</p>
|
||||
<ng-container *ngIf="opdsEnabled">
|
||||
<app-api-key tooltipText="The API key is like a password. Keep it secret, Keep it safe."></app-api-key>
|
||||
<app-api-key title="OPDS URL" [showRefresh]="false" [transform]="makeUrl"></app-api-key>
|
||||
</ng-container>
|
||||
<p>All 3rd Party clients will either use the API key or the Connection Url below. These are like passwords, keep it private.</p>
|
||||
<p class="alert alert-warning" role="alert" *ngIf="!opdsEnabled">OPDS is not enabled on this server.</p>
|
||||
<app-api-key tooltipText="The API key is like a password. Keep it secret, Keep it safe."></app-api-key>
|
||||
<app-api-key title="OPDS URL" [showRefresh]="false" [transform]="makeUrl"></app-api-key>
|
||||
</ng-template>
|
||||
</ngb-panel>
|
||||
</ngb-accordion>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue