Audiobook fixes
This commit is contained in:
-11
@@ -135,17 +135,6 @@ export class BookDialogHelperService {
|
||||
});
|
||||
}
|
||||
|
||||
openMetadataFetchOptionsDialog(bookId: number): DynamicDialogRef | null {
|
||||
return this.openDialog(MetadataFetchOptionsComponent, {
|
||||
showHeader: false,
|
||||
styleClass: `${DialogSize.SM} ${DialogStyle.MINIMAL}`,
|
||||
data: {
|
||||
bookIds: [bookId],
|
||||
metadataRefreshType: MetadataRefreshType.BOOKS,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
openAdditionalFileUploaderDialog(book: Book): DynamicDialogRef | null {
|
||||
return this.openDialog(AdditionalFileUploaderComponent, {
|
||||
showHeader: false,
|
||||
|
||||
+11
-14
@@ -624,20 +624,17 @@
|
||||
}
|
||||
}
|
||||
@if (userState.user!.permissions.canEditMetadata || userState.user!.permissions.admin) {
|
||||
@if (refreshMenuItems$ | async; as refreshItems) {
|
||||
<p-splitbutton
|
||||
[label]="isAutoFetching ? 'Fetching...' : 'Fetch Metadata'"
|
||||
[icon]="isAutoFetching ? 'pi pi-spin pi-spinner' : 'pi pi-bolt'"
|
||||
[outlined]="true"
|
||||
[model]="refreshItems"
|
||||
severity="warn"
|
||||
(onClick)="quickRefresh(book!.id)"
|
||||
[disabled]="isAutoFetching"
|
||||
pTooltip="Automatically fetch metadata using default sources"
|
||||
tooltipPosition="top"
|
||||
class="mobile-icon-only">
|
||||
</p-splitbutton>
|
||||
}
|
||||
<p-button
|
||||
[label]="isAutoFetching ? 'Fetching...' : 'Fetch Metadata'"
|
||||
[icon]="isAutoFetching ? 'pi pi-spin pi-spinner' : 'pi pi-bolt'"
|
||||
[outlined]="true"
|
||||
severity="warn"
|
||||
(onClick)="quickRefresh(book!.id)"
|
||||
[disabled]="isAutoFetching"
|
||||
pTooltip="Automatically fetch metadata using default sources"
|
||||
tooltipPosition="top"
|
||||
class="mobile-icon-only">
|
||||
</p-button>
|
||||
}
|
||||
@if (otherItems$ | async; as otherItems) {
|
||||
@if (otherItems.length > 0) {
|
||||
|
||||
-15
@@ -95,26 +95,11 @@ export class MetadataViewerComponent implements OnInit, OnChanges {
|
||||
navigationState$ = this.bookNavigationService.getNavigationState();
|
||||
|
||||
ngOnInit(): void {
|
||||
this.refreshMenuItems$ = this.book$.pipe(
|
||||
filter((book): book is Book => book !== null),
|
||||
map((book): MenuItem[] => [
|
||||
{
|
||||
label: 'Custom Fetch',
|
||||
icon: 'pi pi-sync',
|
||||
command: () => {
|
||||
this.bookDialogHelperService.openMetadataFetchOptionsDialog(book.id);
|
||||
}
|
||||
}
|
||||
])
|
||||
);
|
||||
|
||||
this.readMenuItems$ = this.book$.pipe(
|
||||
filter((book): book is Book => book !== null),
|
||||
map((book): MenuItem[] => {
|
||||
const items: MenuItem[] = [];
|
||||
const primaryType = book.primaryFile?.bookType;
|
||||
|
||||
// Add streaming reader option for primary file
|
||||
if (primaryType === 'PDF') {
|
||||
items.push({
|
||||
label: 'Streaming Reader',
|
||||
|
||||
Reference in New Issue
Block a user