-
+
more_vert
{{ currentPage }}
@@ -35,6 +35,9 @@ export default {
}
},
computed: {
+ isMobile() {
+ return this.$store.state.globals.isMobile
+ },
streamAudiobook() {
return this.$store.state.streamAudiobook
},
@@ -78,12 +81,12 @@ export default {
.configContent.page-library-stats {
width: 1200px;
}
-@media (max-width: 1024px) {
+@media (max-width: 1240px) {
.configContent {
margin-left: 176px;
}
}
-@media (max-width: 768px) {
+@media (max-width: 640px) {
.configContent {
margin-left: 0px;
width: 100%;
diff --git a/client/store/globals.js b/client/store/globals.js
index 786e6e014..afacd6fa9 100644
--- a/client/store/globals.js
+++ b/client/store/globals.js
@@ -13,7 +13,7 @@ export const getters = {}
export const mutations = {
updateWindowSize(state, { width, height }) {
- state.isMobile = width < 768 || height < 768
+ state.isMobile = width < 640 || height < 640
state.isMobileLandscape = state.isMobile && height > width
},
setShowUserCollectionsModal(state, val) {
diff --git a/package-lock.json b/package-lock.json
index d9effa241..894240bbd 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,7 +1,7 @@
{
"name": "audiobookshelf",
- "version": "1.6.65",
- "lockfileVersion": 2,
+ "version": "1.6.66",
+ "lockfileVersion": 1,
"requires": true,
"packages": {
"": {
@@ -4962,4 +4962,4 @@
}
}
}
-}
+}
\ No newline at end of file
diff --git a/readme.md b/readme.md
index bdeec5059..077aabf98 100644
--- a/readme.md
+++ b/readme.md
@@ -12,7 +12,7 @@
-## About
+# About
Audiobookshelf is a self-hosted audiobook server for managing and playing your audiobooks.
@@ -34,14 +34,17 @@ iOS early beta available using Test Flight: https://testflight.apple.com/join/wi

-## Organizing your audiobooks
+
+
+# Organizing your audiobooks
#### Directory structure and folder names are important to Audiobookshelf!
See [documentation](https://audiobookshelf.org/docs) for supported directory structure, folder naming conventions, and audio file metadata usage.
+
-## Installation
+# Installation
** Default username is "root" with no password
@@ -119,7 +122,17 @@ System Service: `/lib/systemd/system/audiobookshelf.service`
Ffmpeg static build: `/usr/lib/audiobookshelf-ffmpeg/`
-## Reverse Proxy Set Up
+
+
+# Reverse Proxy Set Up
+
+#### Important! Audiobookshelf requires a websocket connection.
+
+### NGINX Proxy Manager
+
+Toggle websockets support.
+
+

### NGINX Reverse Proxy
@@ -191,10 +204,23 @@ For this to work you must enable at least the following mods using `a2enmod`:
[See this solution](https://forums.unraid.net/topic/112698-support-audiobookshelf/?do=findComment&comment=1049637)
-## Run from source
+### Synology Reverse Proxy
+
+1. Open Control Panel > Application Portal
+2. Change to the Reverse Proxy tab
+3. Select the proxy rule for which you want to enable Websockets and click on Edit
+4. Change to the "Custom Header" tab
+5. Click Create > WebSocket
+6. Click Save
+
+[from @silentArtifact](https://github.com/advplyr/audiobookshelf/issues/241#issuecomment-1036732329)
+
+
+
+# Run from source
[See discussion](https://github.com/advplyr/audiobookshelf/discussions/259#discussioncomment-1869729)
-## Contributing / How to Support
+# Contributing / How to Support
[See the incomplete "How to Support" page](https://www.audiobookshelf.org/support)
diff --git a/server/objects/Book.js b/server/objects/Book.js
index 3bf149ac2..6023feea8 100644
--- a/server/objects/Book.js
+++ b/server/objects/Book.js
@@ -47,6 +47,7 @@ class Book {
get _language() { return this.language || '' }
get _isbn() { return this.isbn || '' }
get _asin() { return this.asin || '' }
+ get genresCommaSeparated() { return this._genres.join(', ') }
get shouldSearchForCover() {
if (this.cover) return false
diff --git a/server/utils/absFileGenerator.js b/server/utils/absFileGenerator.js
new file mode 100644
index 000000000..a74d78e2d
--- /dev/null
+++ b/server/utils/absFileGenerator.js
@@ -0,0 +1,37 @@
+const fs = require('fs-extra')
+const filePerms = require('./filePerms')
+const package = require('../../package.json')
+const Logger = require('../Logger')
+
+const bookKeyMap = {
+ title: 'title',
+ subtitle: 'subtitle',
+ author: 'authorFL',
+ narrator: 'narratorFL',
+ series: 'series',
+ volumeNumber: 'volumeNumber',
+ publishYear: 'publishYear',
+ publisher: 'publisher',
+ description: 'description',
+ isbn: 'isbn',
+ asin: 'asin',
+ language: 'language',
+ genres: 'genresCommaSeparated'
+}
+
+function generate(audiobook, outputPath, uid, gid) {
+ var fileString = `[audiobookshelf v${package.version}]\n`
+
+ for (const key in bookKeyMap) {
+ const value = audiobook.book[bookKeyMap[key]] || ''
+ fileString += `${key}=${value}\n`
+ }
+
+ return fs.writeFile(outputPath, fileString).then(() => {
+ return filePerms(outputPath, 0o774, uid, gid).then(() => true)
+ }).catch((error) => {
+ Logger.error(`[absMetaFileGenerator] Failed to save abs file`, error)
+ return false
+ })
+}
+module.exports.generate = generate
\ No newline at end of file
diff --git a/server/utils/filePerms.js b/server/utils/filePerms.js
index 531e224d1..4b64851ad 100644
--- a/server/utils/filePerms.js
+++ b/server/utils/filePerms.js
@@ -77,9 +77,9 @@ const chmodr = (p, mode, uid, gid, cb) => {
})
}
-module.exports = (p, mode, uid, gid) => {
+module.exports = (path, mode, uid, gid) => {
return new Promise((resolve) => {
- Logger.debug(`[FilePerms] Setting permission "${mode}" for uid ${uid} and gid ${gid} | "${p}"`)
- chmodr(p, mode, uid, gid, resolve)
+ Logger.debug(`[FilePerms] Setting permission "${mode}" for uid ${uid} and gid ${gid} | "${path}"`)
+ chmodr(path, mode, uid, gid, resolve)
})
}
\ No newline at end of file
diff --git a/server/utils/fileUtils.js b/server/utils/fileUtils.js
index 2876a5620..44288e816 100644
--- a/server/utils/fileUtils.js
+++ b/server/utils/fileUtils.js
@@ -51,16 +51,6 @@ function bytesPretty(bytes, decimals = 0) {
}
module.exports.bytesPretty = bytesPretty
-function setFileOwner(path, uid, gid) {
- try {
- return fs.chown(path, uid, gid).then(() => true)
- } catch (err) {
- console.error('Failed set file owner', err)
- return false
- }
-}
-module.exports.setFileOwner = setFileOwner
-
async function recurseFiles(path, relPathToReplace = null) {
path = path.replace(/\\/g, '/')
if (!path.endsWith('/')) path = path + '/'