Feature/play event annual report - #409
Open
GuiltySpark-343 wants to merge 4 commits into
Open
GuiltySpark-343 wants to merge 4 commits into
GuiltySpark-343 wants to merge 4 commits into
Conversation
GuiltySpark-343
force-pushed
the
feature/play-event-annual-report
branch
from
September 8, 2026 15:50
2487e77 to
00030bd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR_DESCRIPTION.md
播放事件记录 + 年度听歌报告(Play Event Recording for Annual Report)
摘要
为 APlayer 增加逐次播放事件记录能力,为“年度听歌报告”提供可靠的本地原始数据,同时保留现有
History/最近播放。事件遵循跨平台协议(eventId/deviceId/schemaVersion/canonicalId+ UTC ISO 时间),可导出 JSONL,供 PC/桌面端按eventId幂等导入合并。动机
现有
History只保存累计play_count与last_play,无法还原“一次播放”的起止、实际收听时长与来源,因此无法准确生成按年/月/时段/来源分布的报告。本改动新增独立的play_events表与会话级采集。主要改动(按提交)
.gitmodules从../taglib.git(在当前 fork 下失效)改为https://github.com/rRemix/taglib.git。io.github.biezhi:TinyPinyin。修复“按文件名排序”与原版不一致的问题。PlayEvent实体(schema v2)、PlayEventDao、PlayEventRepository、Room 迁移 8→9、DeviceIdProvider、CanonicalIdProvider。PlayEventRecorder会话状态机(位置增量累计、seek 防虚增、单曲循环分轮、<10% 丢弃、>=90%/自然结束记完整),并接入MusicService;区分播放来源与结束原因。song_added事件类型(首次出现登记),支撑“年度新增歌曲”。MediaType(local/webdav/smb)、sessionId、loopCount、稳定 ID 等 v2 字段;播放类聚合只统计eventType='playback'。测试
:app:assembleNormalDebug构建成功。注意
local.properties、app/build、Aplayer.apk、backups/、gradle-wrapper.properties的本地调整均未纳入本 PR。docs/play-event-design.md。