Feature/continue seeding after closing player#607
Feature/continue seeding after closing player#607chtrinh wants to merge 6 commits intobutterproject:masterfrom
Conversation
'autoSeed' - starts up a forked process with a WebTorrent client which enables this feature. Torrent files are create and saved in tmp folder to be used later for seeding. Randomly selects files for join swarm. 'seedLimit' - starting limit for number of torrents connected.
xaiki
left a comment
There was a problem hiding this comment.
heads up this is a very important patch for us so it might be a bit of time in review =)
it looks like it's missing the 'named seeder' thing we talked about.
also, we probably want to hook this up into the torrent updater code too
still has a lot of whitespace changes.
| <!-- Global variables --> | ||
| <script src="global.js"></script> | ||
| <!-- Global variables --> | ||
| <script src="global.js"></script> |
There was a problem hiding this comment.
are you guys using tabs or spaces here? jshint doesn't seem to lint for me..
| <script src="lib/models/content_item.js"></script> | ||
| <script src="lib/models/movie.js"></script> | ||
| <script src="lib/models/show.js"></script> | ||
| <script src="lib/models/show.js"></script> |
| <script src="lib/models/stream_info.js"></script> | ||
| <script src="lib/models/show_collection.js"></script> | ||
| <script src="lib/models/anime_collection.js"></script> | ||
| <script src="lib/models/anime_collection.js"></script> |
| <script src="lib/models/indie_collection.js"></script> | ||
| <script src="lib/models/favorite_collection.js"></script> | ||
| <script src="lib/models/watchlist_collection.js"></script> | ||
| <script src="lib/models/watchlist_collection.js"></script> |
|
|
||
| // Focus the window when the app opens | ||
| win.focus(); | ||
|
|
| getTorrentFiles: function() { | ||
| if (this.torrentFiles === null) { | ||
| var regexp = /\.torrent$/i; | ||
| var files = fs.readdirSync(this.torrentDir); |
There was a problem hiding this comment.
instead of calling fs here, i think i'd rather maintain a registery of things that have been 'added/removed' to this module.
| seedLimit: Settings.seedLimit | ||
| }); | ||
|
|
||
| this.worker = child.fork(taskFile, [args], {silent: true, execPath:'node'}); |
There was a problem hiding this comment.
'node' will fail on machines that don't have nodejs installed (we bundle)
|
@xaiki: yup no worries about the time it'll take. I got other PRs bug/suggestions to make :) |
|
hey any news on this ? |
Uses a forked process with WebTorrent client and saved torrents in cache tmp directory to accomplish this.