Working on watch-folder

Added chokidar to watch for folder changes; added folder-watcher;
passing state to delayedInit on main;  added default values for new
preferences; added “Auto add torrents” preference with its checkbox and
path selector; TODO: start/stop watching on preference change, start
watching on init, add dialog when trying to enable preference without a
torrents folder.
This commit is contained in:
Alberto Miranda
2017-03-22 09:42:17 -03:00
parent c2abb50e9e
commit a70c4d1bf2
5 changed files with 121 additions and 4 deletions

View File

@@ -121,7 +121,9 @@ function setupStateSaved (cb) {
isFileHandler: false,
openExternalPlayer: false,
externalPlayerPath: null,
startup: false
startup: false,
autoAddTorrents: false,
torrentsFolderPath: ''
},
torrents: config.DEFAULT_TORRENTS.map(createTorrentObject),
torrentsToResume: [],