diff libervia/pages/photos/album/_browser/__init__.py @ 1510:5ea06e8b06ed

browser: make bridge API closer to the one use with other frontends: `bridge.AsyncBridge` is not used instead of `aio_bridge.Bridge`
author Goffi <goffi@goffi.org>
date Mon, 22 May 2023 11:57:44 +0200
parents 106bae41f5c8
children
line wrap: on
line diff
--- a/libervia/pages/photos/album/_browser/__init__.py	Sat Apr 08 13:44:11 2023 +0200
+++ b/libervia/pages/photos/album/_browser/__init__.py	Mon May 22 11:57:44 2023 +0200
@@ -1,7 +1,6 @@
 from browser import document, window, bind, html, DOMNode, aio
 from javascript import JSON
-from bridge import bridge
-from aio_bridge import bridge as AIOBridge
+from bridge import Bridge, AsyncBridge
 from template import Template
 import dialog
 from slideshow import SlideShow
@@ -19,8 +18,8 @@
     affiliations = window.affiliations.to_dict()
 except AttributeError:
     pass
-bridge = bridge()
-aio_bridge = AIOBridge()
+bridge = Bridge()
+async_bridge = AsyncBridge()
 
 alt_media_player.install_if_needed()
 
@@ -192,7 +191,7 @@
     img_name = img_elt.src.rsplit('/', 1)[-1]
     img_size = img_blob.size
 
-    slot = await aio_bridge.file_http_upload_get_slot(
+    slot = await async_bridge.file_http_upload_get_slot(
         img_name,
         img_size,
         '',
@@ -209,7 +208,7 @@
         return
     extra = {"thumb_url": get_url}
     album_name = files_path.rsplit('/', 1)[-1]
-    await aio_bridge.interests_file_sharing_register(
+    await async_bridge.interests_file_sharing_register(
         files_service,
         "photos",
         "",