mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-03 04:40:09 +00:00
feat(audiobook): add language, format and publisher to details modal
This commit is contained in:
@@ -548,6 +548,30 @@ export function AudiobookDetailsModal({
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Language */}
|
||||||
|
{audiobook.language && (
|
||||||
|
<div>
|
||||||
|
<p className="text-gray-500 dark:text-gray-400">Language</p>
|
||||||
|
<p className="text-gray-900 dark:text-gray-100">{audiobook.language.charAt(0).toUpperCase() + audiobook.language.slice(1)}</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* Format */}
|
||||||
|
{audiobook.formatType && (
|
||||||
|
<div>
|
||||||
|
<p className="text-gray-500 dark:text-gray-400">Format</p>
|
||||||
|
<p className="text-gray-900 dark:text-gray-100">{audiobook.formatType.charAt(0).toUpperCase() + audiobook.formatType.slice(1)}</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* Publisher */}
|
||||||
|
{audiobook.publisherName && (
|
||||||
|
<div>
|
||||||
|
<p className="text-gray-500 dark:text-gray-400">Publisher</p>
|
||||||
|
<p className="text-gray-900 dark:text-gray-100">{audiobook.publisherName}</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* Download Link - subtle utility, visible from any context */}
|
{/* Download Link - subtle utility, visible from any context */}
|
||||||
{isAvailable && downloadAvailable && requestId && user?.permissions?.download !== false && (
|
{isAvailable && downloadAvailable && requestId && user?.permissions?.download !== false && (
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ export interface Audiobook {
|
|||||||
requestedByUsername?: string | null; // Username who requested (only if not current user)
|
requestedByUsername?: string | null; // Username who requested (only if not current user)
|
||||||
hasReportedIssue?: boolean; // True if an open issue exists for this audiobook
|
hasReportedIssue?: boolean; // True if an open issue exists for this audiobook
|
||||||
isIgnored?: boolean; // True if this user has ignored this audiobook from auto-requests
|
isIgnored?: boolean; // True if this user has ignored this audiobook from auto-requests
|
||||||
|
language?: string;
|
||||||
|
formatType?: string;
|
||||||
|
publisherName?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useAudiobooks(type: 'popular' | 'new-releases', limit: number = 20, page: number = 1, hideAvailable: boolean = false) {
|
export function useAudiobooks(type: 'popular' | 'new-releases', limit: number = 20, page: number = 1, hideAvailable: boolean = false) {
|
||||||
|
|||||||
@@ -50,6 +50,9 @@ export interface AudibleAudiobook {
|
|||||||
series?: string;
|
series?: string;
|
||||||
seriesPart?: string;
|
seriesPart?: string;
|
||||||
seriesAsin?: string;
|
seriesAsin?: string;
|
||||||
|
language?: string;
|
||||||
|
formatType?: string;
|
||||||
|
publisherName?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AudibleSearchResult {
|
export interface AudibleSearchResult {
|
||||||
@@ -774,6 +777,9 @@ export class AudibleService {
|
|||||||
series: data.seriesPrimary?.name || undefined,
|
series: data.seriesPrimary?.name || undefined,
|
||||||
seriesPart: data.seriesPrimary?.position || undefined,
|
seriesPart: data.seriesPrimary?.position || undefined,
|
||||||
seriesAsin: data.seriesPrimary?.asin || undefined,
|
seriesAsin: data.seriesPrimary?.asin || undefined,
|
||||||
|
language: data.language || undefined,
|
||||||
|
formatType: data.formatType || undefined,
|
||||||
|
publisherName: data.publisherName || undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Ensure cover art URL is high quality
|
// Ensure cover art URL is high quality
|
||||||
|
|||||||
Reference in New Issue
Block a user