mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Fix:FFprobe requires path update config #302
This commit is contained in:
parent
018cebb0f5
commit
712aad2f14
@ -83,6 +83,7 @@ setup_config_interactive() {
|
|||||||
METADATA_PATH=$DATA_PATH/metadata
|
METADATA_PATH=$DATA_PATH/metadata
|
||||||
CONFIG_PATH=$DATA_PATH/config
|
CONFIG_PATH=$DATA_PATH/config
|
||||||
FFMPEG_PATH=/usr/lib/audiobookshelf-ffmpeg/ffmpeg
|
FFMPEG_PATH=/usr/lib/audiobookshelf-ffmpeg/ffmpeg
|
||||||
|
FFPROBE_PATH=/usr/lib/audiobookshelf-ffmpeg/ffprobe
|
||||||
PORT=$PORT"
|
PORT=$PORT"
|
||||||
|
|
||||||
echo "$config_text"
|
echo "$config_text"
|
||||||
@ -105,6 +106,7 @@ setup_config() {
|
|||||||
METADATA_PATH=$DEFAULT_DATA_PATH/metadata
|
METADATA_PATH=$DEFAULT_DATA_PATH/metadata
|
||||||
CONFIG_PATH=$DEFAULT_DATA_PATH/config
|
CONFIG_PATH=$DEFAULT_DATA_PATH/config
|
||||||
FFMPEG_PATH=/usr/lib/audiobookshelf-ffmpeg/ffmpeg
|
FFMPEG_PATH=/usr/lib/audiobookshelf-ffmpeg/ffmpeg
|
||||||
|
FFPROBE_PATH=/usr/lib/audiobookshelf-ffmpeg/ffprobe
|
||||||
PORT=$DEFAULT_PORT"
|
PORT=$DEFAULT_PORT"
|
||||||
|
|
||||||
echo "$config_text"
|
echo "$config_text"
|
||||||
|
1
index.js
1
index.js
@ -12,6 +12,7 @@ if (isDev) {
|
|||||||
process.env.METADATA_PATH = devEnv.MetadataPath
|
process.env.METADATA_PATH = devEnv.MetadataPath
|
||||||
process.env.AUDIOBOOK_PATH = devEnv.AudiobookPath
|
process.env.AUDIOBOOK_PATH = devEnv.AudiobookPath
|
||||||
process.env.FFMPEG_PATH = devEnv.FFmpegPath
|
process.env.FFMPEG_PATH = devEnv.FFmpegPath
|
||||||
|
process.env.FFPROBE_PATH = devEnv.FFProbePath
|
||||||
}
|
}
|
||||||
|
|
||||||
const PORT = process.env.PORT || 80
|
const PORT = process.env.PORT || 80
|
||||||
|
@ -256,7 +256,11 @@ function parseProbeData(data, verbose = false) {
|
|||||||
|
|
||||||
// Updated probe returns AudioProbeData object
|
// Updated probe returns AudioProbeData object
|
||||||
function probe(filepath, verbose = false) {
|
function probe(filepath, verbose = false) {
|
||||||
return ffprobe(filepath)
|
var options = {}
|
||||||
|
if (process.env.FFPROBE_PATH) {
|
||||||
|
options.path = process.env.FFPROBE_PATH
|
||||||
|
}
|
||||||
|
return ffprobe(filepath, options)
|
||||||
.then(raw => {
|
.then(raw => {
|
||||||
var rawProbeData = parseProbeData(raw, verbose)
|
var rawProbeData = parseProbeData(raw, verbose)
|
||||||
if (!rawProbeData || !rawProbeData.audio_stream) {
|
if (!rawProbeData || !rawProbeData.audio_stream) {
|
||||||
|
Loading…
Reference in New Issue
Block a user