fix DaemonRequest import in apps
This commit is contained in:
parent
5f129faf32
commit
b5311dd1c3
5 changed files with 11 additions and 7 deletions
|
@ -27,7 +27,8 @@ if not os.path.isfile(lbrycrdd_path_conf):
|
||||||
f.write(lbrycrdd_path)
|
f.write(lbrycrdd_path)
|
||||||
f.close()
|
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 API_PORT, API_INTERFACE, ICON_PATH, APP_NAME
|
||||||
from lbrynet.conf import UI_ADDRESS
|
from lbrynet.conf import UI_ADDRESS
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import Foundation
|
import Foundation
|
||||||
import objc
|
import objc
|
||||||
import AppKit
|
|
||||||
|
|
||||||
NSUserNotification = objc.lookUpClass('NSUserNotification')
|
NSUserNotification = objc.lookUpClass('NSUserNotification')
|
||||||
NSUserNotificationCenter = objc.lookUpClass('NSUserNotificationCenter')
|
NSUserNotificationCenter = objc.lookUpClass('NSUserNotificationCenter')
|
||||||
|
|
||||||
|
|
||||||
def LBRYNotify(message):
|
def LBRYNotify(message):
|
||||||
notification = NSUserNotification.alloc().init()
|
notification = NSUserNotification.alloc().init()
|
||||||
notification.setTitle_("LBRY")
|
notification.setTitle_("LBRY")
|
||||||
|
@ -15,7 +15,9 @@ def LBRYNotify(message):
|
||||||
notification.setDeliveryDate_(Foundation.NSDate.dateWithTimeInterval_sinceDate_(0, Foundation.NSDate.date()))
|
notification.setDeliveryDate_(Foundation.NSDate.dateWithTimeInterval_sinceDate_(0, Foundation.NSDate.date()))
|
||||||
NSUserNotificationCenter.defaultUserNotificationCenter().scheduleNotification_(notification)
|
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 = NSUserNotification.alloc().init()
|
||||||
notification.setTitle_(title)
|
notification.setTitle_(title)
|
||||||
notification.setSubtitle_(subtitle)
|
notification.setSubtitle_(subtitle)
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from lbrynet.conf import PROTOCOL_PREFIX, APP_NAME, ICON_PATH
|
from lbrynet.conf import APP_NAME, ICON_PATH
|
||||||
import sys
|
|
||||||
|
|
||||||
APP = [os.path.join('lbrygui', 'main.py')]
|
APP = [os.path.join('lbrygui', 'main.py')]
|
||||||
DATA_FILES = []
|
DATA_FILES = []
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
import os
|
import os
|
||||||
|
from lbrynet.conf import PROTOCOL_PREFIX
|
||||||
|
|
||||||
APP = [os.path.join('lbry_uri_handler', 'LBRYURIHandler.py')]
|
APP = [os.path.join('lbry_uri_handler', 'LBRYURIHandler.py')]
|
||||||
DATA_FILES = []
|
DATA_FILES = []
|
||||||
|
@ -11,7 +12,7 @@ OPTIONS = {'argv_emulation': True,
|
||||||
'CFBundleURLTypes': [
|
'CFBundleURLTypes': [
|
||||||
{
|
{
|
||||||
'CFBundleURLTypes': 'LBRYURIHandler',
|
'CFBundleURLTypes': 'LBRYURIHandler',
|
||||||
'CFBundleURLSchemes': ['lbry']
|
'CFBundleURLSchemes': [PROTOCOL_PREFIX]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,8 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import win32gui
|
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 API_PORT, API_INTERFACE, ICON_PATH, APP_NAME
|
||||||
from lbrynet.conf import UI_ADDRESS, API_CONNECTION_STRING, LOG_FILE_NAME
|
from lbrynet.conf import UI_ADDRESS, API_CONNECTION_STRING, LOG_FILE_NAME
|
||||||
from packaging.uri_handler.LBRYURIHandler import LBRYURIHandler
|
from packaging.uri_handler.LBRYURIHandler import LBRYURIHandler
|
||||||
|
|
Loading…
Reference in a new issue