@let currentBook = book(); @let seriesBooks = bookInSeries(); @let recommendations = recommendedBooks(); @let currentAudiobookInfo = audiobookInfo(); @let currentFileState = fileState(); @for (tab of availableTabs(); track tab.value) { {{ t(tab.labelKey) }} }
@if (seriesBooks.length > 1) {
@for (bookInSeriesItem of seriesBooks; track bookInSeriesItem.id) { @if (bookInSeriesItem.id !== currentBook.id) {
} }
}
@if (recommendations.length > 0) {
@for (recBook of recommendations; track recBook.book.id) {
}
}
{{ t('ebookCover') }}
{{ t('audiobookCover') }}
@if (chaptersLoading()) {
} @else if (currentAudiobookInfo) {
{{ formatDuration(currentAudiobookInfo.durationMs) }} @if (currentAudiobookInfo.codec) { {{ currentAudiobookInfo.codec.toUpperCase() }} } @if (currentAudiobookInfo.bitrate) { {{ currentAudiobookInfo.bitrate }} kbps } @if (currentAudiobookInfo.sampleRate) { {{ formatSampleRate(currentAudiobookInfo.sampleRate) }} } @if (currentAudiobookInfo.channels) { {{ getChannelLabel(currentAudiobookInfo.channels) }} }
@if (currentAudiobookInfo.folderBased && currentAudiobookInfo.tracks?.length) {
@for (track of currentAudiobookInfo.tracks; track track.index) { }
# {{ t('chapterTitle') }} {{ t('fileName') }} {{ t('startTime') }} {{ t('duration') }}
{{ track.index + 1 }} {{ track.title }} {{ track.fileName }} {{ formatDuration(track.cumulativeStartMs) }} {{ formatDuration(track.durationMs) }}
} @else if (currentAudiobookInfo.chapters?.length) {
@for (chapter of currentAudiobookInfo.chapters; track chapter.index) { }
# {{ t('chapterTitle') }} {{ t('startTime') }} {{ t('endTime') }} {{ t('duration') }}
{{ chapter.index + 1 }} {{ chapter.title }} {{ formatDuration(chapter.startTimeMs) }} {{ formatDuration(chapter.endTimeMs) }} {{ formatDuration(chapter.durationMs) }}
} @else {
{{ t('noChapters') }}
} }
@if (currentFileState.isPhysical) {

{{ t('physicalBookTitle') }}

{{ t('physicalBookMessage') }}

{{ t('physicalBookHint') }}

} @else { @if (currentFileState.hasMultipleContentFiles) {
} @if (currentBook.primaryFile) {

{{ t('primaryFile') }}

{{ currentBook.primaryFile.extension | uppercase }} {{ currentBook.primaryFile.fileName }} {{ getFileSizeInMB(currentBook.primaryFile) }}
@if (currentBook.primaryFile.bookType === 'EPUB') { } @else if (currentBook.primaryFile.bookType && ['PDF', 'FB2', 'MOBI', 'AZW3', 'CBX'].includes(currentBook.primaryFile.bookType)) { } @else if (currentBook.primaryFile.bookType === 'AUDIOBOOK') { } @if (currentFileState.canDetach) { }
} @if (currentBook.alternativeFormats && currentBook.alternativeFormats.length > 0) {

{{ t('alternativeFormats') }}

@for (format of currentBook.alternativeFormats; track format.id) {
{{ format.extension | uppercase }} {{ format.fileName }} {{ getFileSizeInMB(format) }}
@if (format.bookType === 'EPUB') { } @else if (format.bookType && ['PDF', 'FB2', 'MOBI', 'AZW3', 'CBX'].includes(format.bookType)) { } @else if (format.bookType === 'AUDIOBOOK') { } @if (currentFileState.canDetach) { }
}
} @if (currentBook.supplementaryFiles && currentBook.supplementaryFiles.length > 0) {

{{ t('supplementaryFiles') }}

@for (file of currentBook.supplementaryFiles; track file.id) {
{{ file.fileName }} {{ getFileSizeInMB(file) }}
@if (currentFileState.canDetach) { }
}
} }