Merge pull request #188 from lbryio/fix-DaemonRequest-import

fix DaemonRequest import in apps
This commit is contained in:
Jack Robison 2016-10-14 23:04:52 -04:00 committed by GitHub
commit 3e86254324
5 changed files with 11 additions and 7 deletions

View file

@ -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

View file

@ -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)

View file

@ -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 = []

View file

@ -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]
}
]
}

View file

@ -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