zijunchiang c1fd0fa319 V1.5.4: 新增可用源 gz.ac16.vip;修复"点歌失败不入下载列表";下载列表删除按状态区分
一、新增歌曲源 gz.ac16.vip(置于源列表首位)
实测(DoH 取真实 IP 154.222.26.244,绕开本机网关 fake-IP 干扰):
- i.php: HTTP 200,下发 token,end_date=2027-10-05(比现用镜像源的 2026-10-05 更晚);
- music/do.php: 对 7303235/7200188/8614960 分别返回各自不同的真源地址
  (http://txog.ktvsky.com/.../<编号>.ts?token=... / http://download.origjoy.com/.../<编号>.ts?sign=...),
  文件名均等于点歌编号;
- 这些地址能真实下载:HTTP 206 video/MP2T,逐曲内容各不相同,
  TS 流同步字节按 188 字节对齐(41/43 包同步);
- 对照:其余 7 个入口对每首歌(含不存在的编号)统一返回同一段
  https://wb66.cn/f/d/7b7c9/10188555.ts(广告/测试资源),主源 w.w345.my/i.php 直接 403。

因此把 gz.ac16.vip 加入源列表:ktv_api.js 的 CONFIG.HOSTS 与
SongUrlResolver.DEFAULT_HOSTS 各一处(均置于首位)。
⚠️ 边界:该域名**自己**的 /<编号>.ts 永远是同一段广告,所以它继续留在
AdVideoFilter.AD_HOSTS(媒体层拦截);广告黑名单只作用于"返回地址的 host",
不作用于"取址入口的 host",两者不可混淆,否则会误杀唯一可用源。
KTV_BRIDGE_API 9 → 10(ktv_api.js 两处标记 + KtvJsBridge 两处校验),保证设备热更新到新脚本。

二、修复"点歌失败时歌曲不出现在下载列表"
根因:DownloadTask 只在 onDownloadStart 里创建,所以"取址失败(无法生成下载地址)"这类
还没真正开始下载的失败**不会留下任何记录**,下载列表里什么都没有。
修复:downloadSong() 在**发起下载之前**就登记任务(状态「排队中」),
失败时由既有回调就地改成「失败:原因」,条目保留在列表里,可看原因、可重试、可清理。

三、下载列表删除功能(按状态区分语义)
- 有本地文件 → 「删除文件」(confirmDeleteLocalFile,同时清掉下载记录);
- 失败/进行中(无文件)→ 「移出下载列表」(confirmRemoveDownloadEntry):
  只删记录 + stateDatabase.removeDownload,**绝不动任何歌曲文件**
  (历史上"顺手清缓存"删光公放曲库的教训见 AGENTS);
- 「更多」菜单在下载列表内额外提供「移出列表」;
- SongListAdapter 的「更多」图标由装饰改为**可点/可聚焦**(遥控器可达,不再只能长按)。

版本 1.5.3(35) → 1.5.4(36);签名证书不变。测试 9 例全通过。
2026-10-04 00:04:20 +08:00

Maidong KTV Logo

Maidong KTV

A local karaoke application for Android TV and landscape song-selection devices

Remote Control · Song Discovery · Request Queue · Download Management · Stable Playback

Core Features

  • Full TV remote navigation with directional keys, confirmation, back, and long-press actions.
  • Consistent focus feedback for buttons, lists, cards, switches, and dialogs.
  • Home entries for charts, song titles, singers, frequently played songs, favorites, categories, and local songs.
  • Online and local search with language filters, paging, and initial-letter keyboard input.
  • Singer browsing with portrait tags and singer-specific song lists.
  • Song ordering, batch ordering, queue prioritization, favorites, and file management.
  • Real-time synchronization across queued, played, and downloaded song lists.
  • New requests join the end of the queue without interrupting the current requested song.
  • Automatic playback when requested songs are available, including smooth transitions from public playback.

Playback

  • IJK-based playback for local and downloaded songs.
  • Continuous playback while navigating between pages or switching between windowed and full-screen modes.
  • Play, pause, skip, replay, progress display, and seeking controls.
  • Original-vocal and accompaniment switching without changing the current play or pause state.
  • Synchronized playback state across windowed controls, full-screen controls, and status overlays.
  • Song title overlays, temporary mode prompts, and persistent pause indicators.
  • Video ratio, automatic full screen, audio-video synchronization, and public playback settings.
  • Maximum song volume and configurable original-vocal and accompaniment behavior.

Downloads And Data

  • Background downloads with progress, resume support, and automatic retry.
  • Automatic cleanup and retry after download or decryption failures.
  • Recognition, counting, and playback of downloaded local songs.
  • Segmented database download, verification, merge, and atomic update.
  • Directory creation, database scanning, and download startup only after storage permission is granted.
  • Local disk and USB song scanning, reserved storage settings, and automatic cleanup.
  • Unified Maidong KTV data storage to avoid conflicts with other applications.

Settings

  • Data settings for library updates, local scanning, reserved space, automatic cleanup, and database maintenance.
  • Playback settings for public playback, automatic full screen, video ratio, synchronization, and title overlays.
  • Sound settings for volume behavior, maximum song volume, original vocals, and accompaniment.
  • Interface settings for language, floating controls, carousel content, and song title overlays.
  • Dialog selections remain temporary until confirmed and provide clear remote-control focus feedback.

Interface And Interaction

  • Landscape TV layout optimized for long-distance viewing.
  • Consistent state and meaning across top, windowed, and full-screen playback controls.
  • Stable focus during list refreshes, paging, tab changes, and song ordering.
  • Focus changes color only and preserves each control's original dimensions, corners, and layout.
  • A consistent circular Maidong logo across the home screen, player, and application information.

Project Notice

This repository: https://gitea.kasugano.cn/zijunchiang/maidong-ktv

UI/feature framework credit: https://gitee.com/yangyachao-X/maidong-ktv

This repository reworks the upstream "Maidong KTV" UI and feature framework, and the core/data layer was rewritten with DSH (DeepSeek Harness): library sync, song-source integration, device auth, risk-control handling, remote logging, and ad blocking are all new implementations.

Highlights of the reworked data layer:

  • Library: synced exclusively from the official Muse service (mconn.cherryonline.cn mls-api/v1/sqlite/sync); the code host carries source only, no database files.
  • Song source: w.w345.my (i.php token → do.php playback URL) with fixed device identity and reproduced signing; ad/mismatched resources (e.g. wb66.cn/.../719.ts) are blocked and retried.
  • JS hot-update: app/src/main/assets/mobile/ktv_api.js, requires the KTV_BRIDGE_API: 7 marker.

Building

Requirements: JDK 17, Android SDK (compileSdk 35, minSdk 21, targetSdk 25), Gradle wrapper 8.13 (bundled).

cd maidong-ktv
export JAVA_HOME=/path/to/jdk-17
export ANDROID_HOME=/path/to/android-sdk
export ANDROID_SDK_ROOT=$ANDROID_HOME
./gradlew assembleRelease

The release signing config in app/build.gradle expects ../../ktv_keystore.jks (one level above the repo root) with alias ktv / password 123456; adjust paths or use signingConfigs.debug for a quick unsigned build. Output: app/build/outputs/apk/release/app-release.apk (dual ABI: armeabi-v7a + arm64-v8a). Install with adb install -r <apk>.

For non-commercial learning purposes only. Respect upstream copyright and song licensing.

S
Description
麦动KTV Android 项目源码(DSH 重写内核与数据源)
Readme
18 MiB
2026-10-18 11:41:38 +08:00
Languages
Kotlin 50.7%
Python 41.5%
Java 4.6%
JavaScript 2.7%
HTML 0.3%
Other 0.2%