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:
Feross Aboukhadijeh
2016-03-27 02:10:58 -07:00
parent a3a0f760c4
commit a668898022
5 changed files with 28 additions and 11 deletions

9
renderer/util.js Normal file
View 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)
}