diff --git a/packaging/osx/lbry-osx-app/lbrygui/LBRYApp.py b/packaging/osx/lbry-osx-app/lbrygui/LBRYApp.py index 072eb9f00..c690023d9 100644 --- a/packaging/osx/lbry-osx-app/lbrygui/LBRYApp.py +++ b/packaging/osx/lbry-osx-app/lbrygui/LBRYApp.py @@ -27,7 +27,8 @@ if not os.path.isfile(lbrycrdd_path_conf): f.write(lbrycrdd_path) f.close() -from lbrynet.lbrynet_daemon.DaemonServer import DaemonServer, DaemonRequest +from lbrynet.lbrynet_daemon.DaemonServer import DaemonServer +from lbrynet.lbrynet_daemon.DaemonRequest import DaemonRequest from lbrynet.conf import API_PORT, API_INTERFACE, ICON_PATH, APP_NAME from lbrynet.conf import UI_ADDRESS diff --git a/packaging/osx/lbry-osx-app/lbrygui/LBRYNotify.py b/packaging/osx/lbry-osx-app/lbrygui/LBRYNotify.py index d4a88e7ce..82df8bc38 100644 --- a/packaging/osx/lbry-osx-app/lbrygui/LBRYNotify.py +++ b/packaging/osx/lbry-osx-app/lbrygui/LBRYNotify.py @@ -1,10 +1,10 @@ import Foundation import objc -import AppKit NSUserNotification = objc.lookUpClass('NSUserNotification') NSUserNotificationCenter = objc.lookUpClass('NSUserNotificationCenter') + def LBRYNotify(message): notification = NSUserNotification.alloc().init() notification.setTitle_("LBRY") @@ -15,7 +15,9 @@ def LBRYNotify(message): notification.setDeliveryDate_(Foundation.NSDate.dateWithTimeInterval_sinceDate_(0, Foundation.NSDate.date())) NSUserNotificationCenter.defaultUserNotificationCenter().scheduleNotification_(notification) -def notify(title, subtitle, info_text, delay=0, sound=False, userInfo={}): + +def notify(title, subtitle, info_text, delay=0, sound=False, userInfo=None): + userInfo = userInfo or {} notification = NSUserNotification.alloc().init() notification.setTitle_(title) notification.setSubtitle_(subtitle) diff --git a/packaging/osx/lbry-osx-app/setup_app.py b/packaging/osx/lbry-osx-app/setup_app.py index 28e0ca981..1f4cba717 100644 --- a/packaging/osx/lbry-osx-app/setup_app.py +++ b/packaging/osx/lbry-osx-app/setup_app.py @@ -2,8 +2,7 @@ import os from setuptools import setup -from lbrynet.conf import PROTOCOL_PREFIX, APP_NAME, ICON_PATH -import sys +from lbrynet.conf import APP_NAME, ICON_PATH APP = [os.path.join('lbrygui', 'main.py')] DATA_FILES = [] diff --git a/packaging/osx/lbry-osx-app/setup_uri_handler.py b/packaging/osx/lbry-osx-app/setup_uri_handler.py index 26097d8a4..21b2050a9 100644 --- a/packaging/osx/lbry-osx-app/setup_uri_handler.py +++ b/packaging/osx/lbry-osx-app/setup_uri_handler.py @@ -1,5 +1,6 @@ from setuptools import setup import os +from lbrynet.conf import PROTOCOL_PREFIX APP = [os.path.join('lbry_uri_handler', 'LBRYURIHandler.py')] DATA_FILES = [] @@ -11,7 +12,7 @@ OPTIONS = {'argv_emulation': True, 'CFBundleURLTypes': [ { 'CFBundleURLTypes': 'LBRYURIHandler', - 'CFBundleURLSchemes': ['lbry'] + 'CFBundleURLSchemes': [PROTOCOL_PREFIX] } ] } diff --git a/packaging/windows/lbry-win32-app/LBRYWin32App.py b/packaging/windows/lbry-win32-app/LBRYWin32App.py index d197f8cfc..1a35e29b4 100644 --- a/packaging/windows/lbry-win32-app/LBRYWin32App.py +++ b/packaging/windows/lbry-win32-app/LBRYWin32App.py @@ -18,7 +18,8 @@ try: except ImportError: import win32gui -from lbrynet.lbrynet_daemon.DaemonServer import DaemonServer, DaemonRequest +from lbrynet.lbrynet_daemon.DaemonServer import DaemonServer +from lbrynet.lbrynet_daemon.DaemonRequest import DaemonRequest from lbrynet.conf import API_PORT, API_INTERFACE, ICON_PATH, APP_NAME from lbrynet.conf import UI_ADDRESS, API_CONNECTION_STRING, LOG_FILE_NAME from packaging.uri_handler.LBRYURIHandler import LBRYURIHandler