From a70c4d1bf217f4a651757ddccbc4dbf9d13de093 Mon Sep 17 00:00:00 2001 From: Alberto Miranda Date: Wed, 22 Mar 2017 09:42:17 -0300 Subject: [PATCH 01/21] Working on watch-folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- package.json | 1 + src/main/folder-watcher.js | 54 ++++++++++++++++++++++++++ src/main/index.js | 12 ++++-- src/renderer/lib/state.js | 4 +- src/renderer/pages/preferences-page.js | 54 ++++++++++++++++++++++++++ 5 files changed, 121 insertions(+), 4 deletions(-) create mode 100644 src/main/folder-watcher.js diff --git a/package.json b/package.json index 90be9826..fc30abe0 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "auto-launch": "^4.0.1", "bitfield": "^1.0.2", "capture-frame": "^1.0.0", + "chokidar": "^1.6.1", "chromecasts": "^1.8.0", "cp-file": "^4.0.1", "create-torrent": "^3.24.5", diff --git a/src/main/folder-watcher.js b/src/main/folder-watcher.js new file mode 100644 index 00000000..9e0a4ad7 --- /dev/null +++ b/src/main/folder-watcher.js @@ -0,0 +1,54 @@ +const chokidar = require('chokidar') +const log = require('./log') + +class FolderWatcher { + constructor ({window, state}) { + this.window = window + this.state = state + this.torrentsFolderPath + } + + init () { + const torrentsFolderPath = this.state.saved.prefs.torrentsFolderPath + this.torrentsFolderPath = torrentsFolderPath + if (!torrentsFolderPath) return + + const glob = `${torrentsFolderPath}/**/*.torrent` + log('Folder Watcher: watching: ', glob) + + const options = {ignoreInitial: true} + this.watcher = chokidar.watch(glob, options) + this.watcher + .on('add', (path) => { + log('-- torrent added: ', path) + this.window.dispatch('addTorrent', path) + }) + } + + start (torrentsFolderPath) { + // Stop watching previous folder before + // start watching a new one. + if (this.torrentsFolderPath) { + this.stop() + } + + const glob = `${torrentsFolderPath}/**/*.torrent` + log('Folder Watcher: watching: ', glob) + + const options = {ignoreInitial: true} + this.watcher = chokidar.watch(glob, options) + this.watcher + .on('add', (path) => { + log('-- torrent added: ', path) + this.window.dispatch('addTorrent', path) + }) + } + + stop () { + if (!this.watcher) return + this.watcher.close() + } +} + + +module.exports = FolderWatcher diff --git a/src/main/index.js b/src/main/index.js index 38286977..c99a4c31 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -72,13 +72,16 @@ function init () { if (err) throw err isReady = true + const state = results.state - windows.main.init(results.state, {hidden: hidden}) + windows.main.init(state, {hidden: hidden}) windows.webtorrent.init() menu.init() // To keep app startup fast, some code is delayed. - setTimeout(delayedInit, config.DELAYED_INIT) + setTimeout(() => { + delayedInit(state) + }, config.DELAYED_INIT) // Report uncaught exceptions process.on('uncaughtException', (err) => { @@ -121,16 +124,19 @@ function init () { }) } -function delayedInit () { +function delayedInit (state) { if (app.isQuitting) return const announcement = require('./announcement') const dock = require('./dock') const updater = require('./updater') + const FolderWatcher = require('./folder-watcher') + const folderWatcher = new FolderWatcher({window: windows.main, state}) announcement.init() dock.init() updater.init() + folderWatcher.init() if (process.platform === 'win32') { const userTasks = require('./user-tasks') diff --git a/src/renderer/lib/state.js b/src/renderer/lib/state.js index 6a909d96..68c85bb0 100644 --- a/src/renderer/lib/state.js +++ b/src/renderer/lib/state.js @@ -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: [], diff --git a/src/renderer/pages/preferences-page.js b/src/renderer/pages/preferences-page.js index bf729141..f5c4b8d1 100644 --- a/src/renderer/pages/preferences-page.js +++ b/src/renderer/pages/preferences-page.js @@ -108,6 +108,56 @@ class PreferencesPage extends React.Component { dispatch('updatePreferences', 'externalPlayerPath', filePath) } + autoAddTorrentsCheckbox () { + return ( + + {this.handleAutoAddTorrentsChange(e, value)}} + /> + + ) + } + + handleAutoAddTorrentsChange (e, isChecked) { + const torrentsFolderPath = this.props.state.unsaved.prefs.torrentsFolderPath + if (isChecked && !torrentsFolderPath) { + alert('Select a torrents folder first.') + e.preventDefault() + return + } + + dispatch('updatePreferences', 'autoAddTorrents', isChecked) + } + + torrentsFolderPathSelector () { + const torrentsFolderPath = this.props.state.unsaved.prefs.torrentsFolderPath + + const value = torrentsFolderPath || 'Path to be watched.' + const description = 'Torrent files saved to this folder will be automatically added to the list.' + + return ( + +

{description}

+ +
+ ) + } + + handletorrentsFolderPathChange (filePath) { + dispatch('updatePreferences', 'torrentsFolderPath', filePath) + } + setDefaultAppButton () { const isFileHandler = this.props.state.unsaved.prefs.isFileHandler if (isFileHandler) { @@ -174,6 +224,10 @@ class PreferencesPage extends React.Component { {this.setDefaultAppButton()} + + {this.autoAddTorrentsCheckbox()} + {this.torrentsFolderPathSelector()} + {this.setStartupSection()} ) From a6c53d06d2923ebe480f6ef52304e6ea3053cd89 Mon Sep 17 00:00:00 2001 From: Alberto Miranda Date: Wed, 22 Mar 2017 22:27:03 -0300 Subject: [PATCH 02/21] fixed styling issues --- src/main/folder-watcher.js | 1 - src/renderer/pages/preferences-page.js | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/folder-watcher.js b/src/main/folder-watcher.js index 9e0a4ad7..7bde2b7c 100644 --- a/src/main/folder-watcher.js +++ b/src/main/folder-watcher.js @@ -50,5 +50,4 @@ class FolderWatcher { } } - module.exports = FolderWatcher diff --git a/src/renderer/pages/preferences-page.js b/src/renderer/pages/preferences-page.js index f5c4b8d1..c6553f91 100644 --- a/src/renderer/pages/preferences-page.js +++ b/src/renderer/pages/preferences-page.js @@ -115,7 +115,7 @@ class PreferencesPage extends React.Component { className='control' checked={this.props.state.unsaved.prefs.autoAddTorrents} label={'Enable'} - onCheck={(e, value) => {this.handleAutoAddTorrentsChange(e, value)}} + onCheck={(e, value) => { this.handleAutoAddTorrentsChange(e, value) }} /> ) @@ -124,7 +124,7 @@ class PreferencesPage extends React.Component { handleAutoAddTorrentsChange (e, isChecked) { const torrentsFolderPath = this.props.state.unsaved.prefs.torrentsFolderPath if (isChecked && !torrentsFolderPath) { - alert('Select a torrents folder first.') + alert('Select a torrents folder first.') // eslint-disable-line e.preventDefault() return } @@ -136,7 +136,7 @@ class PreferencesPage extends React.Component { const torrentsFolderPath = this.props.state.unsaved.prefs.torrentsFolderPath const value = torrentsFolderPath || 'Path to be watched.' - const description = 'Torrent files saved to this folder will be automatically added to the list.' + const description = 'Torrent files saved to this folder will be automatically added.' return ( From 7f817241edbba286ad9c9313bfcee30d9f050e26 Mon Sep 17 00:00:00 2001 From: Alberto Miranda Date: Wed, 22 Mar 2017 23:21:07 -0300 Subject: [PATCH 03/21] added start / stop events; starting / stopping folder watcher. --- src/main/folder-watcher.js | 35 +++++++++++--------------- src/main/index.js | 6 ++++- src/main/ipc.js | 21 +++++++++++++++- src/renderer/main.js | 6 +++++ src/renderer/pages/preferences-page.js | 7 ++++++ 5 files changed, 53 insertions(+), 22 deletions(-) diff --git a/src/main/folder-watcher.js b/src/main/folder-watcher.js index 7bde2b7c..7692ec8b 100644 --- a/src/main/folder-watcher.js +++ b/src/main/folder-watcher.js @@ -6,9 +6,19 @@ class FolderWatcher { this.window = window this.state = state this.torrentsFolderPath + this.watching = false } - init () { + isEnabled () { + return this.state.saved.prefs.autoAddTorrents + } + + start () { + log('--- FOLDER WATCHER --> START') + // Stop watching previous folder before + // start watching a new one. + if (this.watching) this.stop() + const torrentsFolderPath = this.state.saved.prefs.torrentsFolderPath this.torrentsFolderPath = torrentsFolderPath if (!torrentsFolderPath) return @@ -23,30 +33,15 @@ class FolderWatcher { log('-- torrent added: ', path) this.window.dispatch('addTorrent', path) }) - } - start (torrentsFolderPath) { - // Stop watching previous folder before - // start watching a new one. - if (this.torrentsFolderPath) { - this.stop() - } - - const glob = `${torrentsFolderPath}/**/*.torrent` - log('Folder Watcher: watching: ', glob) - - const options = {ignoreInitial: true} - this.watcher = chokidar.watch(glob, options) - this.watcher - .on('add', (path) => { - log('-- torrent added: ', path) - this.window.dispatch('addTorrent', path) - }) + this.watching = true } stop () { - if (!this.watcher) return + log('--- FOLDER WATCHER --> STOP') + if (!this.watching) return this.watcher.close() + this.watching = false } } diff --git a/src/main/index.js b/src/main/index.js index c99a4c31..ea38a842 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -136,7 +136,11 @@ function delayedInit (state) { announcement.init() dock.init() updater.init() - folderWatcher.init() + + ipc.setModule('folderWatcher', folderWatcher) + if (folderWatcher.isEnabled()) { + folderWatcher.start() + } if (process.platform === 'win32') { const userTasks = require('./user-tasks') diff --git a/src/main/ipc.js b/src/main/ipc.js index e6110626..432a480f 100644 --- a/src/main/ipc.js +++ b/src/main/ipc.js @@ -1,5 +1,6 @@ module.exports = { - init + init, + setModule } const electron = require('electron') @@ -13,6 +14,14 @@ const windows = require('./windows') // Messages from the main process, to be sent once the WebTorrent process starts const messageQueueMainToWebTorrent = [] +// Will hold modules injected from the app that will be used on fired +// IPC events. +const modules = {} + +function setModule (name, module) { + modules[name] = module +} + function init () { const ipc = electron.ipcMain @@ -106,6 +115,16 @@ function init () { thumbar.onPlayerPause() }) + ipc.on('startFolderWatcher', function () { + log('--- Torrent Watcher started') + modules['folderWatcher'].start() + }) + + ipc.on('stopFolderWatcher', function () { + log('--- Torrent Watcher stop') + modules['folderWatcher'].stop() + }) + /** * Shell */ diff --git a/src/renderer/main.js b/src/renderer/main.js index 7acb24f5..1fc431df 100644 --- a/src/renderer/main.js +++ b/src/renderer/main.js @@ -111,6 +111,10 @@ function onState (err, _state) { update: createGetter(() => { const UpdateController = require('./controllers/update-controller') return new UpdateController(state) + }), + folderWatcher: createGetter(() => { + const FolderWatcherController = require('./controllers/folder-watcher-controller') + return new FolderWatcherController() }) } @@ -296,6 +300,8 @@ const dispatchHandlers = { 'preferences': () => controllers.prefs().show(), 'updatePreferences': (key, value) => controllers.prefs().update(key, value), 'checkDownloadPath': checkDownloadPath, + 'startFolderWatcher': () => controllers.folderWatcher().start(), + 'stopFolderWatcher': () => controllers.folderWatcher().stop(), // Update (check for new versions on Linux, where there's no auto updater) 'updateAvailable': (version) => controllers.update().updateAvailable(version), diff --git a/src/renderer/pages/preferences-page.js b/src/renderer/pages/preferences-page.js index c6553f91..05c2ecfe 100644 --- a/src/renderer/pages/preferences-page.js +++ b/src/renderer/pages/preferences-page.js @@ -130,6 +130,13 @@ class PreferencesPage extends React.Component { } dispatch('updatePreferences', 'autoAddTorrents', isChecked) + + if (isChecked) { + dispatch('startFolderWatcher', null) + return + } + + dispatch('stopFolderWatcher', null) } torrentsFolderPathSelector () { From 4a8ab6e1f6dfb5e84c7e6ed2bbe3285cc40f25fd Mon Sep 17 00:00:00 2001 From: Alberto Miranda Date: Thu, 23 Mar 2017 07:00:45 -0300 Subject: [PATCH 04/21] fixed styling issue --- src/main/folder-watcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/folder-watcher.js b/src/main/folder-watcher.js index 7692ec8b..d5e81f22 100644 --- a/src/main/folder-watcher.js +++ b/src/main/folder-watcher.js @@ -5,7 +5,7 @@ class FolderWatcher { constructor ({window, state}) { this.window = window this.state = state - this.torrentsFolderPath + this.torrentsFolderPath = null this.watching = false } From 996a81ddaa65b6933fed30b163a79eefa69987a7 Mon Sep 17 00:00:00 2001 From: Alberto Miranda Date: Thu, 23 Mar 2017 07:14:27 -0300 Subject: [PATCH 05/21] added folder-watcher-controller --- .../controllers/folder-watcher-controller.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/renderer/controllers/folder-watcher-controller.js diff --git a/src/renderer/controllers/folder-watcher-controller.js b/src/renderer/controllers/folder-watcher-controller.js new file mode 100644 index 00000000..1454dba1 --- /dev/null +++ b/src/renderer/controllers/folder-watcher-controller.js @@ -0,0 +1,13 @@ +const {ipcRenderer} = require('electron') + +module.exports = class FolderWatcherController { + start () { + console.log('-- IPC: start folder watcher') + ipcRenderer.send('startFolderWatcher') + } + + stop () { + console.log('-- IPC: stop folder watcher') + ipcRenderer.send('stopFolderWatcher') + } +} From 2ad3f6d6e2d73a1fcc09bc67fd97e6a2c8712765 Mon Sep 17 00:00:00 2001 From: Alberto Miranda Date: Fri, 24 Mar 2017 12:54:28 -0300 Subject: [PATCH 06/21] Removed extra logging. --- src/main/folder-watcher.js | 6 +++--- src/main/ipc.js | 18 +++++++++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/main/folder-watcher.js b/src/main/folder-watcher.js index d5e81f22..ccf867a3 100644 --- a/src/main/folder-watcher.js +++ b/src/main/folder-watcher.js @@ -1,3 +1,4 @@ +const ipc = require('electron').ipcMain const chokidar = require('chokidar') const log = require('./log') @@ -14,7 +15,6 @@ class FolderWatcher { } start () { - log('--- FOLDER WATCHER --> START') // Stop watching previous folder before // start watching a new one. if (this.watching) this.stop() @@ -30,7 +30,7 @@ class FolderWatcher { this.watcher = chokidar.watch(glob, options) this.watcher .on('add', (path) => { - log('-- torrent added: ', path) + log('Folder Watcher: added torrent: ', path) this.window.dispatch('addTorrent', path) }) @@ -38,7 +38,7 @@ class FolderWatcher { } stop () { - log('--- FOLDER WATCHER --> STOP') + log('Folder Watcher: stop.') if (!this.watching) return this.watcher.close() this.watching = false diff --git a/src/main/ipc.js b/src/main/ipc.js index 432a480f..4c0a3d42 100644 --- a/src/main/ipc.js +++ b/src/main/ipc.js @@ -67,7 +67,7 @@ function init () { }) /** - * Events + * Player Events */ ipc.on('onPlayerOpen', function () { @@ -115,13 +115,25 @@ function init () { thumbar.onPlayerPause() }) + /** + * Folder Watcher Events + */ + ipc.on('startFolderWatcher', function () { - log('--- Torrent Watcher started') + if (!modules['folderWatcher']) { + log('IPC ERR: folderWatcher module is not defined.') + return + } + modules['folderWatcher'].start() }) ipc.on('stopFolderWatcher', function () { - log('--- Torrent Watcher stop') + if (!modules['folderWatcher']) { + log('IPC ERR: folderWatcher module is not defined.') + return + } + modules['folderWatcher'].stop() }) From 23eef1a0585e2787d214d8592dd4dc6d50eec1b9 Mon Sep 17 00:00:00 2001 From: Alberto Miranda Date: Fri, 24 Mar 2017 12:55:10 -0300 Subject: [PATCH 07/21] Removed unused module from folderWatcher. --- src/main/folder-watcher.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/folder-watcher.js b/src/main/folder-watcher.js index ccf867a3..b8421d0a 100644 --- a/src/main/folder-watcher.js +++ b/src/main/folder-watcher.js @@ -1,4 +1,3 @@ -const ipc = require('electron').ipcMain const chokidar = require('chokidar') const log = require('./log') From 6e67cae49407884d8f57ccc370e370a005b44355 Mon Sep 17 00:00:00 2001 From: Alberto Miranda Date: Sun, 26 Mar 2017 11:04:05 -0300 Subject: [PATCH 08/21] Wait for .torrent files to finish downloading. --- src/main/folder-watcher.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/folder-watcher.js b/src/main/folder-watcher.js index b8421d0a..d628d35b 100644 --- a/src/main/folder-watcher.js +++ b/src/main/folder-watcher.js @@ -25,7 +25,10 @@ class FolderWatcher { const glob = `${torrentsFolderPath}/**/*.torrent` log('Folder Watcher: watching: ', glob) - const options = {ignoreInitial: true} + const options = { + ignoreInitial: true, + awaitWriteFinish: true + } this.watcher = chokidar.watch(glob, options) this.watcher .on('add', (path) => { From b02d6f3cdba34fc1fa5969ed9f0e02cf1302c80f Mon Sep 17 00:00:00 2001 From: Alberto Miranda Date: Sun, 2 Apr 2017 19:37:13 -0300 Subject: [PATCH 09/21] Preferences update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Renamed “Downloads” section to “Folders”; watch folder preference moved under “Folders”; updated texts for watch folder preference. --- src/renderer/pages/preferences-page.js | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/renderer/pages/preferences-page.js b/src/renderer/pages/preferences-page.js index 05c2ecfe..76097109 100644 --- a/src/renderer/pages/preferences-page.js +++ b/src/renderer/pages/preferences-page.js @@ -114,7 +114,7 @@ class PreferencesPage extends React.Component { { this.handleAutoAddTorrentsChange(e, value) }} /> @@ -142,20 +142,16 @@ class PreferencesPage extends React.Component { torrentsFolderPathSelector () { const torrentsFolderPath = this.props.state.unsaved.prefs.torrentsFolderPath - const value = torrentsFolderPath || 'Path to be watched.' - const description = 'Torrent files saved to this folder will be automatically added.' - return ( -

{description}

) @@ -220,8 +216,10 @@ class PreferencesPage extends React.Component { } return (
- + {this.downloadPathSelector()} + {this.autoAddTorrentsCheckbox()} + {this.torrentsFolderPathSelector()} {this.openExternalPlayerCheckbox()} @@ -231,10 +229,6 @@ class PreferencesPage extends React.Component { {this.setDefaultAppButton()} - - {this.autoAddTorrentsCheckbox()} - {this.torrentsFolderPathSelector()} - {this.setStartupSection()}
) From ab0bbcea94be311d090d9cb5e5a6de36d8c71eac Mon Sep 17 00:00:00 2001 From: Auyer Date: Tue, 3 Oct 2017 11:14:44 -0300 Subject: [PATCH 10/21] Error on missing Codec changed to "Unable to Play" The error message was harsh, and new users might close the software imediatly after it fails. --- src/renderer/pages/player-page.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/pages/player-page.js b/src/renderer/pages/player-page.js index abcf502a..a219c3d2 100644 --- a/src/renderer/pages/player-page.js +++ b/src/renderer/pages/player-page.js @@ -303,7 +303,7 @@ function renderCastScreen (state) { isCast = false } else if (state.playing.location === 'error') { castIcon = 'error_outline' - castType = 'Error' + castType = 'Unable to Play' isCast = false } From 08cb82e255e997a9f0e6ea9bade70b9a617be6b5 Mon Sep 17 00:00:00 2001 From: SimplyAhmazing Date: Sat, 13 Jan 2018 16:52:46 -0500 Subject: [PATCH 11/21] Update copyright a year later --- src/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.js b/src/config.js index 43b5c57f..6f478bee 100644 --- a/src/config.js +++ b/src/config.js @@ -23,7 +23,7 @@ module.exports = { CRASH_REPORT_URL: 'https://webtorrent.io/desktop/crash-report', TELEMETRY_URL: 'https://webtorrent.io/desktop/telemetry', - APP_COPYRIGHT: 'Copyright © 2014-2017 ' + APP_TEAM, + APP_COPYRIGHT: 'Copyright © 2014-2018 ' + APP_TEAM, APP_FILE_ICON: path.join(__dirname, '..', 'static', 'WebTorrentFile'), APP_ICON: path.join(__dirname, '..', 'static', 'WebTorrent'), APP_NAME: APP_NAME, From 01971e2a4609212676baf3486612f1dbd3e3fce3 Mon Sep 17 00:00:00 2001 From: Cezar Carneiro Date: Mon, 30 Oct 2017 14:42:35 -0200 Subject: [PATCH 12/21] toggle fullscreen on end --- src/renderer/pages/player-page.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/renderer/pages/player-page.js b/src/renderer/pages/player-page.js index abcf502a..179f52f1 100644 --- a/src/renderer/pages/player-page.js +++ b/src/renderer/pages/player-page.js @@ -160,6 +160,7 @@ function renderMedia (state) { } else { // When the last video completes, pause the video instead of looping state.playing.isPaused = true + if (state.window.isFullScreen) dispatch('toggleFullScreen') } } From 03a8b40ee9b686467b956a05868a7b8689e3d2b4 Mon Sep 17 00:00:00 2001 From: Alberto Miranda Date: Mon, 4 Dec 2017 16:57:39 -0300 Subject: [PATCH 13/21] Updated changelog. --- CHANGELOG.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c9e33f8..57118f58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,37 @@ # WebTorrent Desktop Version History +## v0.19.0 + +### Added +- Added watch folder feature: Allows to automatically add new torrent files + downloaded to a configured folder on disk +- Added security policy +- Added highest playback priority feature: pauses other active torrents + when playback starts; added highest playback priority checkbox on preferences +- Add 'Start Speaking' and 'Stop Speaking' menu item (Mac) + +### Changed +- Changed gitter url +- Changed from Feross's github account to WebTorrent's organization +- Resuming paused torrents when streaming torrent finishes downloading (wt-done) +- Not pausing active torrents when playing an already downloaded torrent +- Tweak pinch-to-zoom timing +- Toggle fullscreen on pinch to zoom +- Updated to electron@1.6.0 +- Updated to material-ui@0.17 +- Treat .FLAC as playable audio +- Move release instructions to contributing.md +- Replace release scripts with instructions +- Downloads section on Preferences renamed to "Folders" + +### Fixed +- Fixed width minutes +- Use tabular nums and fixed width for no jitter on time +- Fixed resuming when downloading finishes +- Fixed styling issues; returning early in pauseActiveTorrents +- Fixes for Standard v10 +- Fix 'About WebTorrent' menu location on Windows + ## v0.18.0 ### Added From 5bbd9cfabb0688e49874874b873f1b8d8f429ee5 Mon Sep 17 00:00:00 2001 From: Alberto Miranda Date: Mon, 4 Dec 2017 16:27:25 -0300 Subject: [PATCH 14/21] 0.19.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6a7f43b6..f06e40cc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "webtorrent-desktop", "description": "WebTorrent, the streaming torrent client. For Mac, Windows, and Linux.", - "version": "0.18.0", + "version": "0.19.0", "author": { "name": "WebTorrent, LLC", "email": "feross@webtorrent.io", From 340658c74799def8ffb91cd473496c761873c090 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Fri, 26 Jan 2018 15:55:38 +0800 Subject: [PATCH 15/21] set version back to 0.18 -- will bump it during release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f06e40cc..6a7f43b6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "webtorrent-desktop", "description": "WebTorrent, the streaming torrent client. For Mac, Windows, and Linux.", - "version": "0.19.0", + "version": "0.18.0", "author": { "name": "WebTorrent, LLC", "email": "feross@webtorrent.io", From 9f31f30925745dadc894a1b4a15756e596561bb7 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Fri, 26 Jan 2018 15:41:31 +0800 Subject: [PATCH 16/21] Mitigate protocol handler vulnerability --- src/main/handlers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/handlers.js b/src/main/handlers.js index e3dff9a9..805cd5ce 100644 --- a/src/main/handlers.js +++ b/src/main/handlers.js @@ -44,7 +44,7 @@ function installDarwin () { function uninstallDarwin () {} -const EXEC_COMMAND = [ process.execPath ] +const EXEC_COMMAND = [ process.execPath, '--' ] if (!config.IS_PRODUCTION) { EXEC_COMMAND.push(config.ROOT_PATH) From 991e2d202448bd2c68e020c29dfea169250454eb Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Fri, 26 Jan 2018 15:50:22 +0800 Subject: [PATCH 17/21] Update electron to 1.6.16 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6a7f43b6..89229fa5 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "buble": "^0.15.2", "cross-zip": "^2.0.1", "depcheck": "^0.6.4", - "electron": "1.6.0", + "electron": "1.6.16", "electron-osx-sign": "0.4.3", "electron-packager": "~8.5.1", "electron-winstaller": "~2.5.2", From e69a18e5484d382041905dae832ea63dda2bfa87 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Fri, 26 Jan 2018 15:50:28 +0800 Subject: [PATCH 18/21] authors --- AUTHORS.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AUTHORS.md b/AUTHORS.md index bceeb904..76d4d3f9 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -37,5 +37,10 @@ - Alexey Romanov (romanalexey@gmail.com) - Karan Thakkar (karanjthakkar@gmail.com) - Nuno Campos (nuno.campos@me.com) +- Ebrahim Byagowi (ebrahim@gnu.org) +- Emil Bay (github@tixz.dk) +- Auyer (rafa_auyer@icloud.com) +- SimplyAhmazing (ahmad19526@gmail.com) +- Cezar Carneiro (cezargcarneiro@gmail.com) #### Generated by bin/update-authors.sh. From d02f6c7d18223fdae512b0b0bd841e99e00b2c2e Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Fri, 26 Jan 2018 16:10:50 +0800 Subject: [PATCH 19/21] Rewrite changelog for v0.19.0 --- CHANGELOG.md | 39 +++++++++++++-------------------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57118f58..bdf89d1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,38 +1,25 @@ # WebTorrent Desktop Version History -## v0.19.0 +## v0.19.0 - 2018-01-26 ### Added -- Added watch folder feature: Allows to automatically add new torrent files - downloaded to a configured folder on disk -- Added security policy -- Added highest playback priority feature: pauses other active torrents - when playback starts; added highest playback priority checkbox on preferences -- Add 'Start Speaking' and 'Stop Speaking' menu item (Mac) +- Added watch folder feature: Automatically add new torrent files added to a folder on disk (#1154) +- Added highest playback priority feature: pauses other active torrents when playback starts (#840) +- Add 'Start Speaking' and 'Stop Speaking' menu item (Mac) (#439) +- Add pinch-to-zoom gesture to enter/exit fullscreen (#1148) ### Changed -- Changed gitter url -- Changed from Feross's github account to WebTorrent's organization -- Resuming paused torrents when streaming torrent finishes downloading (wt-done) -- Not pausing active torrents when playing an already downloaded torrent -- Tweak pinch-to-zoom timing -- Toggle fullscreen on pinch to zoom -- Updated to electron@1.6.0 +- [SECURITY] Mitigate +- Moved project from Feross's GitHub account to the WebTorrent GitHub organization +- Updated to electron@1.6.16 - Updated to material-ui@0.17 -- Treat .FLAC as playable audio -- Move release instructions to contributing.md -- Replace release scripts with instructions -- Downloads section on Preferences renamed to "Folders" +- Treat .FLAC as playable audio (#1127) ### Fixed -- Fixed width minutes -- Use tabular nums and fixed width for no jitter on time -- Fixed resuming when downloading finishes -- Fixed styling issues; returning early in pauseActiveTorrents -- Fixes for Standard v10 -- Fix 'About WebTorrent' menu location on Windows +- Fix time and duration so it doesn't bounce in the UI (#1233) +- Fix 'About WebTorrent' menu location on Windows (#1120) -## v0.18.0 +## v0.18.0 - 2017-02-03 ### Added - Add a new "Transfers" menu for pausing or resuming all torrents (#1027) @@ -99,7 +86,7 @@ ## v0.16.0 - 2016-09-18 ### Added -- **Windows 64-bit support!** ([#931](https://github.com/webtorrent/webtorrent-desktop/pull/931)) +- **Windows 64-bit support!** (#931) - Existing 32-bit users will update to 64-bit automatically in next release - 64-bit reduces likelihood of out-of-memory errors by increasing the address space From 5bf7618dde79f939a782870559a1f5ccacf837ca Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Fri, 26 Jan 2018 16:13:05 +0800 Subject: [PATCH 20/21] 0.19.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 89229fa5..4820f11d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "webtorrent-desktop", "description": "WebTorrent, the streaming torrent client. For Mac, Windows, and Linux.", - "version": "0.18.0", + "version": "0.19.0", "author": { "name": "WebTorrent, LLC", "email": "feross@webtorrent.io", From b5bbd9b6a5f0e60eb19124a46102e789e477970c Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Fri, 26 Jan 2018 16:52:39 +0800 Subject: [PATCH 21/21] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdf89d1b..87e2503c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ - Add pinch-to-zoom gesture to enter/exit fullscreen (#1148) ### Changed -- [SECURITY] Mitigate +- [SECURITY] Mitigate Electron protocol handler issue (Windows) - Moved project from Feross's GitHub account to the WebTorrent GitHub organization - Updated to electron@1.6.16 - Updated to material-ui@0.17