mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-20 02:44:31 +02:00
Update podcasts to new library item model
This commit is contained in:
parent
4a398f6113
commit
d8823c8b1c
14 changed files with 416 additions and 281 deletions
|
@ -338,13 +338,14 @@ class CoverManager {
|
|||
*
|
||||
* @param {string} url
|
||||
* @param {string} libraryItemId
|
||||
* @param {string} [libraryItemPath] null if library item isFile or is from adding new podcast
|
||||
* @param {string} [libraryItemPath] - null if library item isFile
|
||||
* @param {boolean} [forceLibraryItemFolder=false] - force save cover with library item (used for adding new podcasts)
|
||||
* @returns {Promise<{error:string}|{cover:string}>}
|
||||
*/
|
||||
async downloadCoverFromUrlNew(url, libraryItemId, libraryItemPath) {
|
||||
async downloadCoverFromUrlNew(url, libraryItemId, libraryItemPath, forceLibraryItemFolder = false) {
|
||||
try {
|
||||
let coverDirPath = null
|
||||
if (global.ServerSettings.storeCoverWithItem && libraryItemPath) {
|
||||
if ((global.ServerSettings.storeCoverWithItem || forceLibraryItemFolder) && libraryItemPath) {
|
||||
coverDirPath = libraryItemPath
|
||||
} else {
|
||||
coverDirPath = Path.posix.join(global.MetadataPath, 'items', libraryItemId)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue