ruff check --fix
This commit is contained in:
@@ -7,7 +7,7 @@ from nicegui import background_tasks, app
|
|||||||
|
|
||||||
import config
|
import config
|
||||||
import globals
|
import globals
|
||||||
import web
|
import web.routes
|
||||||
from movies.db import MoviesDB
|
from movies.db import MoviesDB
|
||||||
from rooms.db import RoomsDB
|
from rooms.db import RoomsDB
|
||||||
from users.db import UsersDB
|
from users.db import UsersDB
|
||||||
@@ -57,7 +57,7 @@ async def after_startup():
|
|||||||
asyncio.run(before_startup())
|
asyncio.run(before_startup())
|
||||||
app.on_startup(after_startup())
|
app.on_startup(after_startup())
|
||||||
|
|
||||||
web.ui.run(
|
web.routes.ui.run(
|
||||||
host=config.HOST,
|
host=config.HOST,
|
||||||
port=config.PORT,
|
port=config.PORT,
|
||||||
dark=config.USE_DARK_THEME,
|
dark=config.USE_DARK_THEME,
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
from web.web import *
|
|
||||||
@@ -2,3 +2,5 @@ from web.custom_widgets.header import draw_header
|
|||||||
from web.custom_widgets.content_dialog import ContentDialog
|
from web.custom_widgets.content_dialog import ContentDialog
|
||||||
from web.custom_widgets.content_card import ContentCard
|
from web.custom_widgets.content_card import ContentCard
|
||||||
from web.custom_widgets.PlyrVideoPlayer import PlyrVideoPlayer
|
from web.custom_widgets.PlyrVideoPlayer import PlyrVideoPlayer
|
||||||
|
|
||||||
|
__all__ = ["draw_header", "ContentDialog", "ContentCard", "PlyrVideoPlayer",]
|
||||||
@@ -49,9 +49,9 @@ class ContentDialog(ui.dialog):
|
|||||||
itertools.chain.from_iterable([s.episodes for s in self.content.seasons])])
|
itertools.chain.from_iterable([s.episodes for s in self.content.seasons])])
|
||||||
ui.html(f"<b>Total Runtime: </b>{convert_runtime(total_runtime)}").style("font-size: 12px")
|
ui.html(f"<b>Total Runtime: </b>{convert_runtime(total_runtime)}").style("font-size: 12px")
|
||||||
if self.content.in_production:
|
if self.content.in_production:
|
||||||
ui.html(f"<b><i>Currently in production</i></b>").style("font-size: 12px")
|
ui.html("<b><i>Currently in production</i></b>").style("font-size: 12px")
|
||||||
else:
|
else:
|
||||||
ui.html(f"<b><i>Finished</i></b>").style("font-size: 12px")
|
ui.html("<b><i>Finished</i></b>").style("font-size: 12px")
|
||||||
|
|
||||||
with self.card, ui.row(wrap=False).classes("w-full").style("display: flex; justify-content: center;"):
|
with self.card, ui.row(wrap=False).classes("w-full").style("display: flex; justify-content: center;"):
|
||||||
ui.button("Create Room").on_click(self.create_room).props("rounded push")
|
ui.button("Create Room").on_click(self.create_room).props("rounded push")
|
||||||
|
|||||||
@@ -2,3 +2,5 @@ import web.pages.all_rooms as rooms_page
|
|||||||
import web.pages.contents as movies_page
|
import web.pages.contents as movies_page
|
||||||
import web.pages.index as index_page
|
import web.pages.index as index_page
|
||||||
import web.pages.room as room_page
|
import web.pages.room as room_page
|
||||||
|
|
||||||
|
__all__ = ["rooms_page", "movies_page", "index_page", "room_page"]
|
||||||
+1
-1
@@ -13,7 +13,7 @@ from web.misc import check_user, is_portrait
|
|||||||
|
|
||||||
|
|
||||||
def _check_room(room_uid: str):
|
def _check_room(room_uid: str):
|
||||||
return not globals.ROOMS_DATABASE.by_uid.get(room_uid) is None
|
return globals.ROOMS_DATABASE.by_uid.get(room_uid) is not None
|
||||||
|
|
||||||
|
|
||||||
async def _join_room(room_uid: str, user_uid: str):
|
async def _join_room(room_uid: str, user_uid: str):
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ from nicegui import ui
|
|||||||
|
|
||||||
from web.custom_widgets.PlyrVideoPlayer import install_plyr
|
from web.custom_widgets.PlyrVideoPlayer import install_plyr
|
||||||
from web.misc import default_page_setup
|
from web.misc import default_page_setup
|
||||||
from web.pages import *
|
from web.pages import index_page, movies_page, rooms_page, room_page
|
||||||
|
|
||||||
|
|
||||||
@ui.page("/")
|
@ui.page("/")
|
||||||
Reference in New Issue
Block a user