pyloid 0.23.2__tar.gz → 0.23.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pyloid
3
- Version: 0.23.2
3
+ Version: 0.23.3
4
4
  Summary:
5
5
  Author: aesthetics-of-record
6
6
  Author-email: 111675679+aesthetics-of-record@users.noreply.github.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyloid"
3
- version = "0.23.2"
3
+ version = "0.23.3"
4
4
  description = ""
5
5
  authors = ["aesthetics-of-record <111675679+aesthetics-of-record@users.noreply.github.com>"]
6
6
  readme = "README.md"
@@ -43,7 +43,7 @@ from PySide6.QtWebEngineCore import (
43
43
  QWebEngineDesktopMediaRequest,
44
44
  )
45
45
 
46
- from .url_interceptor import CustomUrlInterceptor
46
+ # from .url_interceptor import CustomUrlInterceptor
47
47
  from .rpc import PyloidRPC
48
48
 
49
49
  if TYPE_CHECKING:
@@ -323,8 +323,8 @@ class _BrowserWindow:
323
323
  self.rpc_url = None
324
324
 
325
325
  # interceptor ( all url request )
326
- self.interceptor = CustomUrlInterceptor(rpc_url=self.rpc_url)
327
- self.web_view.page().setUrlRequestInterceptor(self.interceptor)
326
+ # self.interceptor = CustomUrlInterceptor(rpc_url=self.rpc_url)
327
+ # self.web_view.page().setUrlRequestInterceptor(self.interceptor)
328
328
 
329
329
  self._window.closeEvent = self.closeEvent # Override closeEvent method
330
330
  ###########################################################################################
@@ -338,7 +338,7 @@ class _BrowserWindow:
338
338
  self.context_menu = context_menu
339
339
  self.dev_tools = dev_tools
340
340
 
341
- self.js_apis = [BaseAPI(self.id, self.app.data, self.app)]
341
+ self.js_apis = [BaseAPI(self.id, self.app.data, self.app, self.rpc_url)]
342
342
 
343
343
  # for js_api in js_apis:
344
344
  # self.js_apis.append(js_api)
@@ -10,11 +10,12 @@ if TYPE_CHECKING:
10
10
 
11
11
 
12
12
  class BaseAPI(PyloidAPI):
13
- def __init__(self, window_id: str, data: dict, app: "Pyloid"):
13
+ def __init__(self, window_id: str, data: dict, app: "Pyloid", rpc_url: Optional[str] = None):
14
14
  super().__init__()
15
15
  self.window_id: str = window_id
16
16
  self.data: dict = data
17
17
  self.app: "Pyloid" = app
18
+ self.rpc_url: Optional[str] = rpc_url
18
19
 
19
20
  @Bridge(result=dict)
20
21
  def getData(self):
@@ -252,4 +253,9 @@ class BaseAPI(PyloidAPI):
252
253
  """Returns the production path of the application."""
253
254
  return get_production_path(path)
254
255
 
256
+ @Bridge(result=str)
257
+ def getRpcUrl(self):
258
+ """Returns the RPC URL of the application."""
259
+ return self.rpc_url
260
+
255
261
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes