diff --git a/client/components/modals/edit-tabs/Cover.vue b/client/components/modals/edit-tabs/Cover.vue index 201c6f89..e6a09bbd 100644 --- a/client/components/modals/edit-tabs/Cover.vue +++ b/client/components/modals/edit-tabs/Cover.vue @@ -51,11 +51,9 @@

No Covers Found

@@ -163,7 +161,7 @@ export default { } }, getSearchQuery() { - var searchQuery = `provider=best&title=${this.searchTitle}` + var searchQuery = `provider=openlibrary&title=${this.searchTitle}` if (this.searchAuthor) searchQuery += `&author=${this.searchAuthor}` return searchQuery }, diff --git a/client/package.json b/client/package.json index 1642a98f..a373eedd 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "audiobookshelf-client", - "version": "0.9.78-beta", + "version": "0.9.79-beta", "description": "Audiobook manager and player", "main": "index.js", "scripts": { diff --git a/client/pages/audiobook/_id/index.vue b/client/pages/audiobook/_id/index.vue index 26ed371d..1dd14825 100644 --- a/client/pages/audiobook/_id/index.vue +++ b/client/pages/audiobook/_id/index.vue @@ -52,7 +52,9 @@

Invalid Parts ({{ invalidParts.length }})

-

{{ invalidParts.join(', ') }}

+
+

{{ part.filename }}: {{ part.error }}

+
diff --git a/images/ss_audiobook.png b/images/ss_audiobook.png index f4c16bc6..5794c7a4 100644 Binary files a/images/ss_audiobook.png and b/images/ss_audiobook.png differ diff --git a/images/ss_bookshelf.png b/images/ss_bookshelf.png index eaa8d0eb..21eb8d6b 100644 Binary files a/images/ss_bookshelf.png and b/images/ss_bookshelf.png differ diff --git a/images/ss_no_covers.png b/images/ss_no_covers.png deleted file mode 100644 index 8bd0d810..00000000 Binary files a/images/ss_no_covers.png and /dev/null differ diff --git a/images/ss_streaming.png b/images/ss_streaming.png index 30431ac7..35b874b4 100644 Binary files a/images/ss_streaming.png and b/images/ss_streaming.png differ diff --git a/package.json b/package.json index cc9e918c..cfc7624e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "audiobookshelf", - "version": "0.9.78-beta", + "version": "0.9.79-beta", "description": "Self-hosted audiobook server for managing and playing audiobooks.", "main": "index.js", "scripts": { diff --git a/readme.md b/readme.md index fba3f544..d4fc9f11 100644 --- a/readme.md +++ b/readme.md @@ -4,7 +4,7 @@ AudioBookshelf is a self-hosted audiobook server for managing and playing your a **Currently in Beta** - **Free & open source Android/iOS app is in development** -Screenshot1 +Screenshot1 #### Folder Structures Supported: @@ -27,7 +27,7 @@ Title can start with the publish year like so: * Add ability to add/manage additional accounts with varying access levels * Then comes the mobile app.. -Screenshot2 +Screenshot2 ## Installation @@ -37,8 +37,6 @@ Built to run in Docker for now (also on Unraid server Community Apps) docker run -d -p 1337:80 -v /audiobooks:/audiobooks -v /config:/config -v /metadata:/metadata --name audiobookshelf --rm advplyr/audiobookshelf ``` -Screenshot3 - ## Contributing Feel free to help out \ No newline at end of file diff --git a/server/AudioFile.js b/server/AudioFile.js index 3ac55694..b88d75c5 100644 --- a/server/AudioFile.js +++ b/server/AudioFile.js @@ -8,6 +8,9 @@ class AudioFile { this.fullPath = null this.addedAt = null + this.trackNumFromMeta = null + this.trackNumFromFilename = null + this.format = null this.duration = null this.size = null @@ -42,6 +45,8 @@ class AudioFile { path: this.path, fullPath: this.fullPath, addedAt: this.addedAt, + trackNumFromMeta: this.trackNumFromMeta, + trackNumFromFilename: this.trackNumFromFilename, manuallyVerified: !!this.manuallyVerified, invalid: !!this.invalid, error: this.error || null, @@ -73,6 +78,9 @@ class AudioFile { this.invalid = !!data.invalid this.error = data.error || null + this.trackNumFromMeta = data.trackNumFromMeta || null + this.trackNumFromFilename = data.trackNumFromFilename || null + this.format = data.format this.duration = data.duration this.size = data.size @@ -92,13 +100,16 @@ class AudioFile { setData(data) { this.index = data.index || null - this.ino = data.ino + this.ino = data.ino || null this.filename = data.filename this.ext = data.ext this.path = data.path this.fullPath = data.fullPath this.addedAt = Date.now() + this.trackNumFromMeta = data.trackNumFromMeta || null + this.trackNumFromFilename = data.trackNumFromFilename || null + this.manuallyVerified = !!data.manuallyVerified this.invalid = !!data.invalid this.error = data.error || null diff --git a/server/Audiobook.js b/server/Audiobook.js index 4fd2e765..2e9f611f 100644 --- a/server/Audiobook.js +++ b/server/Audiobook.js @@ -20,7 +20,6 @@ class Audiobook { this.tracks = [] this.missingParts = [] - this.invalidParts = [] this.audioFiles = [] this.otherFiles = [] @@ -94,6 +93,10 @@ class Audiobook { return elapsedPretty(this.totalDuration) } + get invalidParts() { + return (this.audioFiles || []).filter(af => af.invalid).map(af => ({ filename: af.filename, error: af.error || 'Unknown Error' })) + } + bookToJSON() { return this.book ? this.book.toJSON() : null } @@ -115,7 +118,6 @@ class Audiobook { addedAt: this.addedAt, lastUpdate: this.lastUpdate, missingParts: this.missingParts, - invalidParts: this.invalidParts, tags: this.tags, book: this.bookToJSON(), tracks: this.tracksToJSON(), @@ -278,10 +280,9 @@ class Audiobook { file.invalid = false file.error = null file.index = index++ - return file + return new AudioFile(file) }) this.tracks = [] - this.invalidParts = [] this.missingParts = [] this.audioFiles.forEach((file) => { this.addTrack(file) diff --git a/server/utils/audioFileScanner.js b/server/utils/audioFileScanner.js index f4cfaf49..dfda425a 100644 --- a/server/utils/audioFileScanner.js +++ b/server/utils/audioFileScanner.js @@ -106,28 +106,28 @@ async function scanAudioFiles(audiobook, newAudioFiles) { trackNumFromMeta, trackNumFromFilename } - audiobook.addAudioFile(audioFileObj) + var audioFile = audiobook.addAudioFile(audioFileObj) var trackNumber = 1 if (newAudioFiles.length > 1) { trackNumber = isNumber(trackNumFromMeta) ? trackNumFromMeta : trackNumFromFilename if (trackNumber === null) { Logger.error('[AudioFileScanner] Invalid track number for', audioFile.filename) - audioFileObj.invalid = true - audioFileObj.error = 'Failed to get track number' + audioFile.invalid = true + audioFile.error = 'Failed to get track number' continue; } } if (tracks.find(t => t.index === trackNumber)) { Logger.error('[AudioFileScanner] Duplicate track number for', audioFile.filename) - audioFileObj.invalid = true - audioFileObj.error = 'Duplicate track number' + audioFile.invalid = true + audioFile.error = 'Duplicate track number' continue; } - audioFileObj.index = trackNumber - tracks.push(audioFileObj) + audioFile.index = trackNumber + tracks.push(audioFile) } if (!tracks.length) {