mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-06-23 18:46:16 +02:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b92b5de34 | |||
| 3417c0c721 | |||
| cbda0360aa | |||
| 036bc081f0 | |||
| e70e4b9d40 |
@@ -31,6 +31,11 @@ if (isDev || options['prod-with-dev-env']) {
|
|||||||
if (devEnv.AllowIframe) process.env.ALLOW_IFRAME = '1'
|
if (devEnv.AllowIframe) process.env.ALLOW_IFRAME = '1'
|
||||||
if (devEnv.BackupPath) process.env.BACKUP_PATH = devEnv.BackupPath
|
if (devEnv.BackupPath) process.env.BACKUP_PATH = devEnv.BackupPath
|
||||||
if (devEnv.ReactClientPath) process.env.REACT_CLIENT_PATH = devEnv.ReactClientPath
|
if (devEnv.ReactClientPath) process.env.REACT_CLIENT_PATH = devEnv.ReactClientPath
|
||||||
|
if (devEnv.AllowedDevOrigins) {
|
||||||
|
process.env.ALLOWED_DEV_ORIGINS = Array.isArray(devEnv.AllowedDevOrigins)
|
||||||
|
? devEnv.AllowedDevOrigins.join(',')
|
||||||
|
: String(devEnv.AllowedDevOrigins)
|
||||||
|
}
|
||||||
process.env.SOURCE = 'local'
|
process.env.SOURCE = 'local'
|
||||||
process.env.ROUTER_BASE_PATH = devEnv.RouterBasePath ?? '/audiobookshelf'
|
process.env.ROUTER_BASE_PATH = devEnv.RouterBasePath ?? '/audiobookshelf'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -437,6 +437,17 @@ class PodcastController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updatePayload[key] = req.body[key]
|
updatePayload[key] = req.body[key]
|
||||||
|
} else if (key === 'enclosure') {
|
||||||
|
const enclosure = req.body.enclosure
|
||||||
|
if (enclosure === null) {
|
||||||
|
updatePayload.enclosureURL = null
|
||||||
|
updatePayload.enclosureSize = null
|
||||||
|
updatePayload.enclosureType = null
|
||||||
|
} else if (typeof enclosure === 'object' && typeof enclosure.url === 'string') {
|
||||||
|
updatePayload.enclosureURL = enclosure.url
|
||||||
|
updatePayload.enclosureType = typeof enclosure.type === 'string' ? enclosure.type : null
|
||||||
|
updatePayload.enclosureSize = enclosure.length !== undefined && enclosure.length !== null ? enclosure.length : null
|
||||||
|
}
|
||||||
} else if (key === 'chapters' && Array.isArray(req.body[key]) && req.body[key].every((ch) => typeof ch === 'object' && ch.title && ch.start)) {
|
} else if (key === 'chapters' && Array.isArray(req.body[key]) && req.body[key].every((ch) => typeof ch === 'object' && ch.title && ch.start)) {
|
||||||
updatePayload[key] = req.body[key]
|
updatePayload[key] = req.body[key]
|
||||||
} else if (key === 'publishedAt' && typeof req.body[key] === 'number') {
|
} else if (key === 'publishedAt' && typeof req.body[key] === 'number') {
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ module.exports.notificationData = {
|
|||||||
variables: ['version'],
|
variables: ['version'],
|
||||||
defaults: {
|
defaults: {
|
||||||
title: 'Test Notification on Abs {{version}}',
|
title: 'Test Notification on Abs {{version}}',
|
||||||
body: 'Test notificataion body for abs {{version}}.'
|
body: 'Test notification body for abs {{version}}.'
|
||||||
},
|
},
|
||||||
testData: {
|
testData: {
|
||||||
version: 'v' + version
|
version: 'v' + version
|
||||||
|
|||||||
Reference in New Issue
Block a user