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

Pref: default torrent file handler #771

Merged
merged 1 commit into from
Aug 11, 2016
Merged

Pref: default torrent file handler #771

merged 1 commit into from
Aug 11, 2016

Conversation

dcposch
Copy link
Contributor

@dcposch dcposch commented Aug 10, 2016

Before, the app made itself the default torrent file handler automatically, pissing off some of our users. Now, it's not by default, and you can change it in the prefs.

Fixes #367

Before, the app made itself the default torrent file handler automatically, pissing off some of our users. Now, it's not by default, and you can change it in the prefs.
@dcposch
Copy link
Contributor Author

dcposch commented Aug 10, 2016

@feross @diimdeep @mathiasvr

@dcposch
Copy link
Contributor Author

dcposch commented Aug 10, 2016

www gifcreator me_hyspcw


function toggleFileHandlers () {
var isFileHandler = state.unsaved.prefs.isFileHandler
dispatch('updatePreferences', 'isFileHandler', !isFileHandler)
Copy link
Member

Choose a reason for hiding this comment

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

Should use setStateValue to match the other place it's used. Or, better just get rid of that function and call dispatch('updatePreferences', ...) directly everywhere.

@feross
Copy link
Member

feross commented Aug 11, 2016

LGTM 👍

@feross feross merged commit 8420c65 into master Aug 11, 2016
@feross feross deleted the dc/file-handler branch August 11, 2016 00:27
@mathiasvr
Copy link
Contributor

mathiasvr commented Aug 11, 2016

I think the program should initially associate with the .torrent extension but not make itself the default handler, that should be up to the user through the OS. For magnet links I would add a button that makes WebTorrent the default handler when clicked and not every time it is started.

@feross
Copy link
Member

feross commented Aug 11, 2016

@mathiasvr The menu label is misleading. This preference affects both .torrent and magnet handling.

On macOS, the .torrent association is automatic (defined in Info.plist). So if there's no other handler, WebTorrent will be default. If there's another default, then the user can still use "Open With..." to select WebTorrent.

On Windows / Linux, the current situation (after this PR) is that WebTorrent does nothing until the preference is toggled. This is not ideal -- thanks for pointing this out.

With this change, now the .desktop file will not get installed on Linux systems until the user toggles the preference option. But that file is needed for the app icon to show up correctly in the Unity launcher, and to support pinning etc.

I think we need to change handlers.js to distinguish between installing handlers and making WebTorrent the default.

  • install: associate with .torrent (but not as the default program), i.e. install .desktop file (linux), add to registry (windows)
  • makeDefault: become default .torrent handler, register magnet handler (there can only be one)
  • removeDefault: give up .torrent handler, unregister magnet handler
  • uninstall: only used by the Windows program uninstaller to completely clean up registry entries, never called on Mac or Linux

@dcposch Does that seem reasonable to you?

@feross
Copy link
Member

feross commented Aug 11, 2016

Let's move discussion to this new issue: #773

(Don't want to lose track of it by discussing in this closed PR.)

@feross
Copy link
Member

feross commented Aug 20, 2016

Released in WebTorrent Desktop v0.11!

@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants