Write poster images into "$CONFIG_PATH/posters" (fix #155)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
console.time('init')
|
||||
|
||||
var cfg = require('application-config')('WebTorrent')
|
||||
var cfgDirectory = require('application-config-path')('WebTorrent')
|
||||
var createTorrent = require('create-torrent')
|
||||
var dragDrop = require('drag-drop')
|
||||
var electron = require('electron')
|
||||
@@ -462,7 +461,7 @@ function generateTorrentPoster (torrent, torrentSummary) {
|
||||
torrentPoster(torrent, function (err, buf) {
|
||||
if (err) return onWarning(err)
|
||||
// save it for next time
|
||||
var posterFilePath = path.join(cfgDirectory, torrent.infoHash + '.jpg')
|
||||
var posterFilePath = path.join(config.CONFIG_POSTER_PATH, torrent.infoHash + '.jpg')
|
||||
fs.writeFile(posterFilePath, buf, function (err) {
|
||||
if (err) return onWarning(err)
|
||||
// show the poster
|
||||
|
||||
@@ -46,7 +46,7 @@ module.exports = {
|
||||
*
|
||||
* Config path:
|
||||
*
|
||||
* OS XDG ~/Library/Application Support/WebTorrent/config.json
|
||||
* OS X ~/Library/Application Support/WebTorrent/config.json
|
||||
* Linux (XDG) $XDG_CONFIG_HOME/WebTorrent/config.json
|
||||
* Linux (Legacy) ~/.config/WebTorrent/config.json
|
||||
* Windows (> Vista) %LOCALAPPDATA%/WebTorrent/config.json
|
||||
|
||||
Reference in New Issue
Block a user