mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-27 11:41:36 +00:00
Merge master
This commit is contained in:
commit
b212f1d5bb
9 changed files with 84 additions and 27 deletions
2
client/package-lock.json
generated
2
client/package-lock.json
generated
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "audiobookshelf-client",
|
||||
"version": "1.6.65",
|
||||
"version": "1.6.66",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div id="page-wrapper" class="page p-6 overflow-y-auto relative" :class="streamAudiobook ? 'streaming' : ''">
|
||||
<app-config-side-nav :is-open.sync="sideDrawerOpen" />
|
||||
<div class="configContent" :class="`page-${currentPage}`">
|
||||
<div class="w-full pb-4 px-2 flex md:hidden border-b border-white border-opacity-10 mb-2">
|
||||
<div v-show="isMobile" class="w-full pb-4 px-2 flex border-b border-white border-opacity-10 mb-2">
|
||||
<span class="material-icons cursor-pointer" @click.stop.prevent="showMore">more_vert</span>
|
||||
<p class="pl-3 capitalize">{{ currentPage }}</p>
|
||||
</div>
|
||||
|
|
@ -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%;
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
6
package-lock.json
generated
6
package-lock.json
generated
|
|
@ -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 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
38
readme.md
38
readme.md
|
|
@ -12,7 +12,7 @@
|
|||
</p>
|
||||
</div>
|
||||
|
||||
## 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
|
|||
|
||||
<img alt="Library Screenshot" src="https://github.com/advplyr/audiobookshelf/raw/master/images/LibraryStream.png" />
|
||||
|
||||
## Organizing your audiobooks
|
||||
<br />
|
||||
|
||||
# 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.
|
||||
|
||||
<br />
|
||||
|
||||
## 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
|
||||
<br />
|
||||
|
||||
# Reverse Proxy Set Up
|
||||
|
||||
#### Important! Audiobookshelf requires a websocket connection.
|
||||
|
||||
### NGINX Proxy Manager
|
||||
|
||||
Toggle websockets support.
|
||||
|
||||
<img alt="NGINX Web socket" src="https://user-images.githubusercontent.com/67830747/153679106-b2a7f5b9-0702-48c6-9740-b26b401986e9.png" />
|
||||
|
||||
### 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)
|
||||
|
||||
<br />
|
||||
|
||||
# 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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
37
server/utils/absFileGenerator.js
Normal file
37
server/utils/absFileGenerator.js
Normal file
|
|
@ -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
|
||||
|
|
@ -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)
|
||||
})
|
||||
}
|
||||
|
|
@ -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 + '/'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue