OverviewFilesCommitsIssuesDocsReleasesPeers

kodi-jacktook commits / 1be2a94

Point self-update at the name, not the address it lost (1.16.1)
UPDATE_HOST was http://192.168.50.38:7221. That address stopped existing on 2026-09-02: stortron ran two interfaces, the WiFi carrying .38 was disconnected for good, and another host on the LAN had already been seen claiming it. So self-update has been dead for two days, and dead in the worst way -- a Kodi that cannot reach its update server simply never offers an update. Nothing failed, nothing was logged, the box just quietly stopped receiving releases. It surfaced only because 1.16.0 was pushed and the Pi did not take it. The stremio addon registration was re-pointed at stortron.local when the address moved. This was missed in the same sweep, because it is not part of playback and had no symptom to notice. The name is the fix rather than a newer address: it follows the DHCP lease, and the whole failure was pinning to something that does not. The Pi resolves it -- `getent ahostsv4 stortron.local` -> 192.168.50.215. (`getent hosts` returns only a link-local IPv6 address and looks like a reason to avoid the name; it is not the lookup path that gets used.) A test now refuses any UPDATE_HOST that is a bare IP, because this class of bug cannot be caught by noticing it: the next DHCP change would kill self-update just as silently, and by then the addon in the field is the one that cannot update itself. Note the ordering problem this leaves: 1.15.8 in the field still points at the dead address, so it cannot fetch this fix. That one install has to be replaced by hand; every release after it self-updates again. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1be2a946ee123a9af496edd66753201009329da6
by plankatron <fleeky@gmail.com> · 2026-09-05T01:13:16.000Z

Changed files (3) +47 -2

plugin.video.jacktook/addon.xml +1 -1
……@@ -1,5 +1,5 @@
11<?xml version="1.0" encoding="utf-8"?>
2 <addon id="plugin.video.jacktook" name="Jacktook" version="1.16.0" provider-name="Sam-Max">
2 <addon id="plugin.video.jacktook" name="Jacktook" version="1.16.1" provider-name="Sam-Max">
33 <requires>
44 <import addon="xbmc.python" version="3.00.0"/>
55 <import addon="script.module.requests" version="2.25.1"/>
plugin.video.jacktook/lib/updater.py +13 -1
……@@ -51,7 +51,19 @@ CHANGELOG_PATH = translate_path(f"special://home/addons/{ADDON_ID}/CHANGELOG.md"
5151#
5252# Served by the kodi-repo unit on stortron, which tracks the addon repo from the
5353# pear-git forge; the last hop is plain HTTP because that is all Kodi speaks.
54UPDATE_HOST = "http://192.168.50.38:7221"
54#
55# The NAME, not an address. This was 192.168.50.38 until 2026-09-04, and that
56# address stopped existing on 2026-09-02: stortron ran two interfaces, the WiFi
57# carrying .38 was disconnected for good, and another host on the LAN had
58# already been seen claiming it. Self-update had been quietly dead ever since --
59# quietly because a Kodi that cannot reach its update server simply never offers
60# one. The stremio addon registration was re-pointed at the name for the same
61# reason; this was missed because nothing fails loudly when it breaks.
62#
63# The Pi resolves it: `getent ahostsv4 stortron.local` -> 192.168.50.215. Note
64# `getent hosts` returns only a link-local IPv6 address and looks like a reason
65# to avoid the name -- it is not the lookup path that gets used.
66UPDATE_HOST = "http://stortron.local:7221"
5567BASE_REPO_URL = f"{UPDATE_HOST}/packages"
5668BASE_ZIP_URL = f"{UPDATE_HOST}/zips"
5769
plugin.video.jacktook/tests/unit/test_updater.py +33 -0
……@@ -156,3 +156,36 @@ def test_update_addon_installs_valid_downgrade(monkeypatch, tmp_path):
156156 )
157157 assert not os.path.exists(os.path.join(str(packages_dir), f"{updater.ADDON_ID}-backup"))
158158 assert not os.path.exists(os.path.join(str(packages_dir), f"{updater.ADDON_ID}-staging"))
159
160
161class TestUpdateHostSurvivesDHCP:
162 """UPDATE_HOST was a bare IP, and that IP went away.
163
164 stortron ran two interfaces; on 2026-09-02 the WiFi carrying
165 192.168.50.38 was disconnected for good and another host on the LAN had
166 already been seen claiming the address. Everything pinned to it broke
167 silently -- the stremio addon registration, Jellyfin, and this, which had
168 been unable to reach its own update server ever since.
169
170 The name is not cosmetic. The Pi's getaddrinfo resolves stortron.local to
171 192.168.50.215 (`getent hosts` shows only a link-local v6 address and is the
172 wrong thing to check), so the name follows the lease and a bare IP cannot.
173 """
174
175 def test_the_update_host_is_not_a_bare_ip(self):
176 import re
177
178 from lib import updater
179
180 host = updater.UPDATE_HOST
181 assert not re.match(r"^https?://\d+\.\d+\.\d+\.\d+", host), (
182 f"UPDATE_HOST is pinned to a literal IP ({host}). It has to be a "
183 "name, or the next DHCP change silently kills self-update again."
184 )
185
186 def test_the_derived_urls_all_hang_off_it(self):
187 from lib import updater
188
189 for url in (updater.BASE_REPO_URL, updater.BASE_ZIP_URL,
190 updater.VERSION_FILE, updater.CHANGELOG_FILE):
191 assert url.startswith(updater.UPDATE_HOST), url