Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Fix webtorrent, don't exclude dependencies #5921

Merged
merged 2 commits into from
Nov 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/browser/webtorrent.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const electron = require('electron')
const ipc = electron.ipcMain
const messages = require('../../js/constants/messages')
const WebTorrentRemoteServer = require('webtorrent-remote/server')

module.exports = {init}

Expand All @@ -17,8 +16,11 @@ let channels = {}
// Receive messages via the window process, ultimately from the UI in a <webview> process
function init () {
if (DEBUG_IPC) console.log('WebTorrent IPC init')
server = new WebTorrentRemoteServer(send, {trace: DEBUG_IPC})
ipc.on(messages.TORRENT_MESSAGE, function (e, msg) {
if (server === null) {
const WebTorrentRemoteServer = require('webtorrent-remote/server')
server = new WebTorrentRemoteServer(send, {trace: DEBUG_IPC})
}
if (DEBUG_IPC) console.log('Received IPC: ' + JSON.stringify(msg))
channels[msg.clientKey] = e.sender
server.receive(msg)
Expand Down
2 changes: 0 additions & 2 deletions tools/lib/ignoredPaths.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module.exports = [
'cppunitlite',
'caniuse-db',
'spectron',
'speedometer',
'abp-filter-parser-cpp/(node_modules|test|perf|sample|scripts|test|vendor|ABPFilterParserData.dat)',
'abp-filter-parser-cpp/build/Release/(obj|obj.target|.deps|abp-filter-parser-cpp.pdb|abp-filter-parser-cpp.map)',
'tracking-protection/(node_modules|test|data|scripts|vendor)',
Expand Down Expand Up @@ -47,7 +46,6 @@ module.exports = [
'electron-winstaller-fixed',
'electron-installer-redhat',
'flow-bin',
'mkdirp',
'babel$',
'babel-(?!polyfill|regenerator-runtime)',
'jsdom-global',
Expand Down