Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P2P updater #473

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"nodecast-js": "^1.0.1",
"opensubtitles-api": "^3.1.0",
"peerflix": "^0.35.0",
"webtorrent": "0.97.2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better use 0.x.x or ^0.97.2

"q": "2.0.3",
"read-torrent": "1.3.0",
"readdirp": "*",
Expand Down
2 changes: 1 addition & 1 deletion src/app/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ var

// Torrent engines
peerflix = require('peerflix'),

WebTorrent = require('webtorrent'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need this as a global, please keep it in updater.js

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will need it with the new streamer running on Webtorrent Please see #424 #470

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can change that when it gets merged.

// NodeJS
child = require('child_process');
1 change: 1 addition & 0 deletions src/app/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ Settings.tmpLocation = path.join(os.tmpDir(), Settings.projectName);
Settings.databaseLocation = path.join(data_path, 'data');
Settings.deleteTmpOnClose = true;
Settings.automaticUpdating = true;
Settings.UpdateSeed = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

either Settings.update = {seed: true}, or Settings.seedUpdate

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Settings.seedUpdate is a parameter on setting container ,
People can disable seeding if they are on the last version

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's just a name nitpick 'seedUpdate' isn't really clear to me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how windowsy of you

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming convention is bad, you should use seedUpdate or redistributeUpdater, but don't start with an uppercase :)

Settings.events = true;
Settings.minimizeToTray = false;
Settings.bigPicture = false;
Expand Down
8 changes: 6 additions & 2 deletions src/app/templates/settings-container.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,12 @@
<label class="settings-label" for="cb5"><%= i18n.__("Activate automatic updating") %></label>
</span>
<span>
<input class="settings-checkbox" name="events" id="cb6" type="checkbox" <%=(Settings.events? "checked='checked'":"")%>>
<label class="settings-label" for="cb6"><%= i18n.__("Celebrate various events") %></label>
<input class="settings-checkbox" name="UpdateSeed" id="cb6" type="checkbox" <%=(Settings.UpdateSeed? "checked='checked'":"")%>>
<label class="settings-label" for="cb6"><%= i18n.__("Activate Update Seeding") %></label>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's personnal and doesn't really impair the merge of this, but I don't like the string. For starter, you don't need the word "activate" in it, the checkbox says that already.
How about:

  • "Seed update files to other users"
  • "Redistribute the update packages"

</span>
<span>
<input class="settings-checkbox" name="events" id="cb7" type="checkbox" <%=(Settings.events? "checked='checked'":"")%>>
<label class="settings-label" for="cb7"><%= i18n.__("Celebrate various events") %></label>
</span>
<span>
<input class="settings-checkbox" name="minimizeToTray" id="minimizeToTray" type="checkbox" <%=(Settings.minimizeToTray? "checked='checked'":"")%>>
Expand Down
Loading