dev: bump to 0.1.66 and harden resolveurl + serienstream
This commit is contained in:
@@ -96,6 +96,35 @@ def notify_url(
|
||||
return
|
||||
|
||||
|
||||
def show_notification(
|
||||
heading: str,
|
||||
message: str,
|
||||
*,
|
||||
icon: int | None = None,
|
||||
milliseconds: int = 3000,
|
||||
) -> None:
|
||||
"""Zeigt eine kurze Kodi-Notification an (falls `xbmcgui` verfuegbar ist)."""
|
||||
|
||||
if xbmcgui is None:
|
||||
return
|
||||
try:
|
||||
icon_value = icon if icon is not None else xbmcgui.NOTIFICATION_INFO
|
||||
xbmcgui.Dialog().notification(str(heading or ""), str(message or ""), icon_value, int(milliseconds))
|
||||
except Exception:
|
||||
return
|
||||
|
||||
|
||||
def show_error(heading: str, message: str, *, milliseconds: int = 4000) -> None:
|
||||
"""Zeigt eine einheitliche Fehlermeldung im Kodi-UI."""
|
||||
|
||||
if xbmcgui is None:
|
||||
return
|
||||
try:
|
||||
xbmcgui.Dialog().notification(str(heading or ""), str(message or ""), xbmcgui.NOTIFICATION_ERROR, int(milliseconds))
|
||||
except Exception:
|
||||
return
|
||||
|
||||
|
||||
def _profile_logs_dir(addon_id: str) -> Optional[str]:
|
||||
if xbmcaddon is None or xbmcvfs is None:
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user