Playback - A preparation finishing after Home no longer starts playing in the background; the post-play countdown only runs while Kaleido is on screen. - Closing or backgrounding during preparation keeps the requested resume position instead of reporting the player's unprepared 0. - Progress, scrobble and transcode-stop reports stay pinned to the server the title came from, even after a server change. Networking - Cancelling a request now cancels its OkHttp call, so timeouts such as the 3-second server-stop check actually return on time. - Connection discovery accepts the most preferred answering address without waiting for slower, less preferred probes. State and navigation - Server/account changes clear episode queues, shuffle, version choices, episode selections and search. - Leaving Search cancels its pending request. - Version selection updates the format badges and technical line. - Down from the Home tab enters the rows when there is no featured title. - Back (or a new Cancel button) closes Settings > Choose server. - One unavailable show no longer discards the whole New Seasons row. Release - package_release.py and CI check the APK's own versionName/versionCode (and that it is not debuggable) via scripts/verify_distribution.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
1.6 KiB
Python
21 lines
1.6 KiB
Python
"""Stage a locally signed APK for Git distribution and tag-triggered Forgejo releases."""
|
|
import hashlib, json, pathlib, re, shutil, subprocess
|
|
ROOT=pathlib.Path(__file__).resolve().parents[1]
|
|
version=dict(l.split('=',1) for l in (ROOT/'version.properties').read_text(encoding='utf-8').splitlines() if '=' in l)
|
|
apk=ROOT/'app/build/outputs/apk/release/app-release.apk'
|
|
if not apk.exists():raise SystemExit('Run Build.ps1 -Release first.')
|
|
# The APK left by an earlier build must not be published under this version's name.
|
|
from verify_distribution import check_apk
|
|
check_apk(apk,version['versionName'],int(version['versionCode']))
|
|
out=ROOT/'distribution';out.mkdir(exist_ok=True)
|
|
shutil.copyfile(apk,out/'Kaleido.apk')
|
|
digest=hashlib.sha256(apk.read_bytes()).hexdigest()
|
|
(out/'Kaleido.apk.sha256').write_text(digest+' Kaleido.apk\n')
|
|
repo='https://git.elijahkuntz.com/Elijah/Kaleido'
|
|
tag='v'+version['versionName']
|
|
# Only this version's section, matching the release body the app shows as notes.
|
|
changelog=(ROOT/'CHANGELOG.md').read_text(encoding='utf-8') if (ROOT/'CHANGELOG.md').exists() else ''
|
|
section=re.search(r'^## v?'+re.escape(version['versionName'])+r'[ \t]*$(.*?)(?=^## |\Z)',changelog,re.M|re.S)
|
|
manifest={'version':version['versionName'],'versionCode':int(version['versionCode']),'url':repo+'/raw/tag/'+tag+'/distribution/Kaleido.apk','checksumUrl':repo+'/raw/tag/'+tag+'/distribution/Kaleido.apk.sha256','notes':section.group(1).strip() if section else ''}
|
|
(out/'latest.json').write_text(json.dumps(manifest,indent=2)+'\n',encoding='utf-8')
|
|
print('Packaged',tag,'SHA-256',digest)
|