Audiobook enhancement (#2611)
* Audiobook enhancement * Fix choppy virtual scroller with mixed audiobook/ebook cards by using uniform heights * Fix audiobook cover regeneration for combined books and improve error messages * Fix cover extraction when attaching audiobook files during rescan * Set audiobookCoverUpdatedOn for cache busting when generating cover * Add support for regenerating covers from specific book files * Fix Continue Reading/Listening scrollers to filter by actual progress instead of primary file type * Show ebook cover and open ebook reader in Continue Reading scroller for combined books * Prevent read status from being downgraded when saving audiobook progress * Fix BookCoverServiceTest to match updated regenerateCover method signature --------- Co-authored-by: acx10 <acx10@users.noreply.github.com>
This commit is contained in:
+4
@@ -44,6 +44,8 @@ export class MetadataMatchWeightsComponent implements OnInit {
|
||||
hardcoverRating: 'Hardcover Rating',
|
||||
hardcoverReviewCount: 'Hardcover Rating #',
|
||||
ranobedbRating: 'Ranobedb Rating',
|
||||
audibleRating: 'Audible Rating',
|
||||
audibleReviewCount: 'Audible Rating #',
|
||||
};
|
||||
|
||||
form!: FormGroup;
|
||||
@@ -79,6 +81,8 @@ export class MetadataMatchWeightsComponent implements OnInit {
|
||||
hardcoverRating: [0, [Validators.required, Validators.min(0)]],
|
||||
hardcoverReviewCount: [0, [Validators.required, Validators.min(0)]],
|
||||
ranobedbRating: [0, [Validators.required, Validators.min(0)]],
|
||||
audibleRating: [0, [Validators.required, Validators.min(0)]],
|
||||
audibleReviewCount: [0, [Validators.required, Validators.min(0)]],
|
||||
coverImage: [0, [Validators.required, Validators.min(0)]],
|
||||
});
|
||||
this.appSettings$
|
||||
|
||||
+20
@@ -114,6 +114,26 @@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<div class="setting-header">
|
||||
<p-toggleswitch [(ngModel)]="audibleEnabled"></p-toggleswitch>
|
||||
<label class="setting-label">Audible</label>
|
||||
</div>
|
||||
@if (audibleEnabled) {
|
||||
<div class="setting-options">
|
||||
<div class="config-field">
|
||||
<label class="config-label">Region</label>
|
||||
<p-select
|
||||
[options]="audibleDomains"
|
||||
[(ngModel)]="selectedAudibleDomain"
|
||||
placeholder="Select Domain"
|
||||
class="config-select">
|
||||
</p-select>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
+23
-1
@@ -68,6 +68,22 @@ export class MetadataProviderSettingsComponent implements OnInit {
|
||||
|
||||
selectedGoogleLanguage = '';
|
||||
|
||||
audibleDomains = [
|
||||
{label: 'audible.com', value: 'com'},
|
||||
{label: 'audible.co.uk', value: 'co.uk'},
|
||||
{label: 'audible.de', value: 'de'},
|
||||
{label: 'audible.fr', value: 'fr'},
|
||||
{label: 'audible.it', value: 'it'},
|
||||
{label: 'audible.es', value: 'es'},
|
||||
{label: 'audible.ca', value: 'ca'},
|
||||
{label: 'audible.com.au', value: 'com.au'},
|
||||
{label: 'audible.co.jp', value: 'co.jp'},
|
||||
{label: 'audible.in', value: 'in'}
|
||||
];
|
||||
|
||||
selectedAudibleDomain = 'com';
|
||||
audibleEnabled: boolean = false;
|
||||
|
||||
hardcoverToken: string = '';
|
||||
amazonCookie: string = '';
|
||||
hardcoverEnabled: boolean = false;
|
||||
@@ -107,6 +123,8 @@ export class MetadataProviderSettingsComponent implements OnInit {
|
||||
this.doubanEnabled = metadataProviderSettings?.douban?.enabled ?? false;
|
||||
this.lubimyCzytacEnabled = metadataProviderSettings?.lubimyczytac?.enabled ?? false;
|
||||
this.ranobedbEnabled = metadataProviderSettings?.ranobedb?.enabled ?? false;
|
||||
this.audibleEnabled = metadataProviderSettings?.audible?.enabled ?? false;
|
||||
this.selectedAudibleDomain = metadataProviderSettings?.audible?.domain ?? 'com';
|
||||
});
|
||||
}
|
||||
|
||||
@@ -146,7 +164,11 @@ export class MetadataProviderSettingsComponent implements OnInit {
|
||||
},
|
||||
douban: {enabled: this.doubanEnabled},
|
||||
lubimyczytac: {enabled: this.lubimyCzytacEnabled},
|
||||
ranobedb: {enabled: this.ranobedbEnabled}
|
||||
ranobedb: {enabled: this.ranobedbEnabled},
|
||||
audible: {
|
||||
enabled: this.audibleEnabled,
|
||||
domain: this.selectedAudibleDomain
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
+3
@@ -224,6 +224,9 @@ export class LibraryMetadataSettingsComponent implements OnInit {
|
||||
lubimyczytacRating: {p1: null, p2: null, p3: null, p4: null},
|
||||
ranobedbId: {p1: null, p2: null, p3: null, p4: null},
|
||||
ranobedbRating: {p1: null, p2: null, p3: null, p4: null},
|
||||
audibleId: {p1: null, p2: null, p3: null, p4: null},
|
||||
audibleRating: {p1: null, p2: null, p3: null, p4: null},
|
||||
audibleReviewCount: {p1: null, p2: null, p3: null, p4: null},
|
||||
moods: {p1: null, p2: null, p3: null, p4: null},
|
||||
tags: {p1: null, p2: null, p3: null, p4: null}
|
||||
}
|
||||
|
||||
+34
@@ -122,6 +122,40 @@
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="setting-item">
|
||||
<div class="setting-header">
|
||||
<p-toggleswitch
|
||||
[ngModel]="metadataPersistence.saveToOriginalFile.audiobook.enabled"
|
||||
(onChange)="onSaveToOriginalFileToggle('audiobook')">
|
||||
</p-toggleswitch>
|
||||
<label class="setting-label">Write Metadata to Audiobooks</label>
|
||||
</div>
|
||||
<p class="setting-description">
|
||||
Write metadata directly into audiobook files (M4B, M4A, MP3, etc.) when editing book information.
|
||||
<span class="setting-note">Supports title, authors, narrator, description, publisher, categories, series, language, and cover art. For folder-based audiobooks, cover is saved as cover.jpg in the folder.</span>
|
||||
</p>
|
||||
@if (metadataPersistence.saveToOriginalFile.audiobook.enabled) {
|
||||
<div class="setting-options">
|
||||
<div class="filesize-input">
|
||||
<label>Max file size:</label>
|
||||
<input
|
||||
type="number"
|
||||
[(ngModel)]="metadataPersistence.saveToOriginalFile.audiobook.maxFileSizeInMb"
|
||||
(change)="onFilesizeChange('audiobook')"
|
||||
min="1"
|
||||
max="2000"
|
||||
class="filesize-field">
|
||||
<span class="filesize-unit">MB</span>
|
||||
<i
|
||||
class="pi pi-info-circle"
|
||||
pTooltip="Only files up to this size will be updated. Larger files are ignored."
|
||||
tooltipPosition="right">
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@if ((appSettings$ | async)?.diskType === 'LOCAL') {
|
||||
<div class="setting-item">
|
||||
<div class="setting-header">
|
||||
|
||||
+8
@@ -35,6 +35,10 @@ export class MetadataPersistenceSettingsComponent implements OnInit {
|
||||
cbx: {
|
||||
enabled: false,
|
||||
maxFileSizeInMb: 250
|
||||
},
|
||||
audiobook: {
|
||||
enabled: false,
|
||||
maxFileSizeInMb: 1000
|
||||
}
|
||||
},
|
||||
convertCbrCb7ToCbz: false,
|
||||
@@ -98,6 +102,10 @@ export class MetadataPersistenceSettingsComponent implements OnInit {
|
||||
cbx: {
|
||||
enabled: persistenceSettings.saveToOriginalFile?.cbx?.enabled ?? false,
|
||||
maxFileSizeInMb: persistenceSettings.saveToOriginalFile?.cbx?.maxFileSizeInMb ?? 250
|
||||
},
|
||||
audiobook: {
|
||||
enabled: persistenceSettings.saveToOriginalFile?.audiobook?.enabled ?? false,
|
||||
maxFileSizeInMb: persistenceSettings.saveToOriginalFile?.audiobook?.maxFileSizeInMb ?? 1000
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user