dev: add explicit dev update channel and repo addon 1.0.1

This commit is contained in:
2026-02-24 20:17:10 +01:00
parent e5bc67eef8
commit f438ff88fa
5 changed files with 30 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<addon id="plugin.video.viewit" name="ViewIt" version="0.1.63-dev" provider-name="ViewIt">
<addon id="plugin.video.viewit" name="ViewIt" version="0.1.64-dev" provider-name="ViewIt">
<requires>
<import addon="xbmc.python" version="3.0.0" />
<import addon="script.module.requests" />

View File

@@ -967,6 +967,7 @@ def _normalize_update_info_url(raw: str) -> str:
UPDATE_CHANNEL_MAIN = 0
UPDATE_CHANNEL_NIGHTLY = 1
UPDATE_CHANNEL_CUSTOM = 2
UPDATE_CHANNEL_DEV = 3
AUTO_UPDATE_INTERVAL_SEC = 6 * 60 * 60
UPDATE_HTTP_TIMEOUT_SEC = 8
UPDATE_ADDON_ID = "plugin.video.viewit"
@@ -976,7 +977,7 @@ RESOLVEURL_AUTO_INSTALL_INTERVAL_SEC = 6 * 60 * 60
def _selected_update_channel() -> int:
channel = _get_setting_int("update_channel", default=UPDATE_CHANNEL_MAIN)
if channel not in {UPDATE_CHANNEL_MAIN, UPDATE_CHANNEL_NIGHTLY, UPDATE_CHANNEL_CUSTOM}:
if channel not in {UPDATE_CHANNEL_MAIN, UPDATE_CHANNEL_NIGHTLY, UPDATE_CHANNEL_CUSTOM, UPDATE_CHANNEL_DEV}:
return UPDATE_CHANNEL_MAIN
return channel
@@ -984,6 +985,8 @@ def _selected_update_channel() -> int:
def _channel_label(channel: int) -> str:
if channel == UPDATE_CHANNEL_NIGHTLY:
return "Nightly"
if channel == UPDATE_CHANNEL_DEV:
return "Dev"
if channel == UPDATE_CHANNEL_CUSTOM:
return "Custom"
return "Main"
@@ -1010,11 +1013,17 @@ def _is_nightly_version(version: str) -> bool:
return bool(re.match(r"^\d+\.\d+\.\d+-nightly$", str(version or "").strip()))
def _is_dev_version(version: str) -> bool:
return bool(re.match(r"^\d+\.\d+\.\d+-dev$", str(version or "").strip()))
def _filter_versions_for_channel(channel: int, versions: list[str]) -> list[str]:
if channel == UPDATE_CHANNEL_MAIN:
return [v for v in versions if _is_stable_version(v)]
if channel == UPDATE_CHANNEL_NIGHTLY:
return [v for v in versions if _is_nightly_version(v)]
if channel == UPDATE_CHANNEL_DEV:
return [v for v in versions if _is_dev_version(v)]
return list(versions)
@@ -1022,6 +1031,8 @@ def _resolve_update_info_url() -> str:
channel = _selected_update_channel()
if channel == UPDATE_CHANNEL_NIGHTLY:
raw = _get_setting_string("update_repo_url_nightly")
elif channel == UPDATE_CHANNEL_DEV:
raw = _get_setting_string("update_repo_url_dev")
elif channel == UPDATE_CHANNEL_CUSTOM:
raw = _get_setting_string("update_repo_url")
else:
@@ -1168,6 +1179,8 @@ def _fetch_changelog_for_channel(channel: int, version: str) -> str:
url = "https://gitea.it-drui.de/viewit/ViewIT/raw/branch/dev/CHANGELOG-DEV.md"
elif version_text.endswith("-nightly"):
url = "https://gitea.it-drui.de/viewit/ViewIT/raw/branch/nightly/CHANGELOG-NIGHTLY.md"
elif channel == UPDATE_CHANNEL_DEV:
url = "https://gitea.it-drui.de/viewit/ViewIT/raw/branch/dev/CHANGELOG-DEV.md"
elif channel == UPDATE_CHANNEL_MAIN:
url = "https://gitea.it-drui.de/viewit/ViewIT/raw/branch/main/CHANGELOG.md"
else:

View File

@@ -36,7 +36,7 @@
</category>
<category label="Updates">
<setting id="update_channel" type="enum" label="Update-Kanal" default="1" values="Main|Nightly|Custom" />
<setting id="update_channel" type="enum" label="Update-Kanal" default="1" values="Main|Nightly|Custom|Dev" />
<setting id="apply_update_channel" type="action" label="Update-Kanal jetzt anwenden" action="RunPlugin(plugin://plugin.video.viewit/?action=apply_update_channel)" option="close" />
<setting id="auto_update_enabled" type="bool" label="Automatische Updates (beim Start pruefen)" default="false" />
<setting id="select_update_version" type="action" label="Version waehlen und installieren" action="RunPlugin(plugin://plugin.video.viewit/?action=select_update_version)" option="close" />
@@ -49,6 +49,7 @@
<setting id="update_active_repo_url" type="text" label="Aktive Repo URL" default="-" enable="false" />
<setting id="update_repo_url_main" type="text" label="Main URL (addons.xml)" default="https://gitea.it-drui.de/viewit/ViewIT-Kodi-Repo/raw/branch/main/addons.xml" />
<setting id="update_repo_url_nightly" type="text" label="Nightly URL (addons.xml)" default="https://gitea.it-drui.de/viewit/ViewIT-Kodi-Repo/raw/branch/nightly/addons.xml" />
<setting id="update_repo_url_dev" type="text" label="Dev URL (addons.xml)" default="https://gitea.it-drui.de/viewit/ViewIT-Kodi-Repo/raw/branch/dev/addons.xml" />
<setting id="update_repo_url" type="text" label="Custom URL (addons.xml)" default="https://gitea.it-drui.de/viewit/ViewIT-Kodi-Repo/raw/branch/nightly/addons.xml" />
<setting id="auto_update_last_ts" type="text" label="Auto-Update letzte Pruefung (intern)" default="0" visible="false" />
<setting id="resolveurl_last_ts" type="text" label="ResolveURL letzte Pruefung (intern)" default="0" visible="false" />