Optimize some content

This commit is contained in:
zhaoyafan 2025-02-17 15:34:47 +08:00
parent 4a99176d22
commit 99cd09a823
1 changed files with 10 additions and 8 deletions

View File

@ -1154,6 +1154,7 @@ class BrowserPluginParent:
self.message_except(e)
def message(self, message=None):
print('[%s]: %s' % (str(self.app_id), message), file=sys.stderr)
if len(str(message)) <= 4096:
notification_send(app_id=self.app_id, title=self.name, message='%s' % (message,))
self.instant_message and self.instant_message(json.dumps({
@ -1164,6 +1165,7 @@ class BrowserPluginParent:
notification_send(app_id=self.app_id, title='%s ' % (self.name,), message='%s' % (exception_info,))
def logging(self, logging=None):
print('[%s]: %s' % (str(self.app_id), logging), file=sys.stderr)
if len(str(logging)) <= 1024:
self.instant_message and self.instant_message(json.dumps({
'time': int(time.time()), 'type': 'logging', 'data': {'user_id': str(self.user_id), 'content': str(logging)}
@ -2249,14 +2251,14 @@ class MainRunner:
self.application_scale_rate = None
self.window = None
self.plugin_list = [
BrowserPluginFileTest,
BrowserPluginTextTest,
BrowserPluginMultFileTest,
BrowserPluginMultTextTest,
BrowserPluginLoggingTest,
BrowserPluginMessageTest,
BrowserPluginFileCommandDebug,
BrowserPluginTextCommandDebug
# BrowserPluginFileTest,
# BrowserPluginTextTest,
# BrowserPluginMultFileTest,
# BrowserPluginMultTextTest,
# BrowserPluginLoggingTest,
# BrowserPluginMessageTest,
# BrowserPluginFileCommandDebug,
# BrowserPluginTextCommandDebug
]
def _copy_files_and_directories(self, src, dst):