mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-18 19:08:13 +02:00
Fix:Check if Windows before cleaning file path for POSIX separators #1254
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
const fs = require('../libs/fsExtra')
|
||||
const Path = require('path')
|
||||
const axios = require('axios')
|
||||
const Logger = require('../Logger')
|
||||
const readChunk = require('../libs/readChunk')
|
||||
const imageType = require('../libs/imageType')
|
||||
const filePerms = require('../utils/filePerms')
|
||||
|
||||
const globals = require('../utils/globals')
|
||||
const { downloadFile } = require('../utils/fileUtils')
|
||||
const { downloadFile, filePathToPOSIX } = require('../utils/fileUtils')
|
||||
const { extractCoverArt } = require('../utils/ffmpegHelpers')
|
||||
|
||||
class CoverManager {
|
||||
@@ -173,7 +172,7 @@ class CoverManager {
|
||||
error: 'Invalid cover path'
|
||||
}
|
||||
}
|
||||
coverPath = coverPath.replace(/\\/g, '/')
|
||||
coverPath = filePathToPOSIX(coverPath)
|
||||
// Cover path already set on media
|
||||
if (libraryItem.media.coverPath == coverPath) {
|
||||
Logger.debug(`[CoverManager] validate cover path already set "${coverPath}"`)
|
||||
|
Reference in New Issue
Block a user