Resolve posterURL and torrentPath at runtime
Fixes bug where posters and torrent files can’t be found in the built app.
This commit is contained in:
9
renderer/util.js
Normal file
9
renderer/util.js
Normal file
@@ -0,0 +1,9 @@
|
||||
var path = require('path')
|
||||
|
||||
var config = require('../config')
|
||||
|
||||
exports.getAbsoluteStaticPath = function (filePath) {
|
||||
return path.isAbsolute(filePath)
|
||||
? filePath
|
||||
: path.join(config.STATIC_PATH, filePath)
|
||||
}
|
||||
Reference in New Issue
Block a user