From d68d1c4c7181ea27fab5d29afd793bd26408b6e0 Mon Sep 17 00:00:00 2001 From: Gregorio Litenstein Date: Thu, 21 May 2020 10:53:17 -0400 Subject: [PATCH] Handle magnet URLs in macOS This is dependent on a patch to gtk-mac-integration/GTKOSXApplication (MR already sent upstream) --- deluge/ui/gtk3/gtkui.py | 1 + packaging/osx/Info.plist.in | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/deluge/ui/gtk3/gtkui.py b/deluge/ui/gtk3/gtkui.py index 303c110cec..2ae726a8c9 100644 --- a/deluge/ui/gtk3/gtkui.py +++ b/deluge/ui/gtk3/gtkui.py @@ -222,6 +222,7 @@ def nsapp_open_file(osxapp, filename): process_args([filename]) self.osxapp.connect('NSApplicationOpenFile', nsapp_open_file) + self.osxapp.connect('NSApplicationOpenURLs', nsapp_open_file) from .menubar_osx import menubar_osx menubar_osx(self, self.osxapp) diff --git a/packaging/osx/Info.plist.in b/packaging/osx/Info.plist.in index 7021497a20..6cb6e869b6 100644 --- a/packaging/osx/Info.plist.in +++ b/packaging/osx/Info.plist.in @@ -55,5 +55,16 @@ + CFBundleURLTypes + + + CFBundleURLName + BitTorrent Magnet URL + CFBundleURLSchemes + + magnet + + +