NeriPlayer icon indicating copy to clipboard operation
NeriPlayer copied to clipboard

[BUG] 网易云播放音乐缓存命中率低的问题

Open zoinve opened this issue 3 months ago • 2 comments

问题描述 / Problem description

重复播放已经缓存好的网易云,无法命中本地缓存,需要重新拉取

复现步骤 / Steps to reproduce

切歌播放任意已缓存的网易云歌曲

预期行为 / Expected behaviour

命中本地缓存,无需拉取音源

实际行为 / Actual behaviour

缓存失效,重新拉取

你使用的安卓系统版本 / Your Android version

16

你正在使用的手机型号 / Your phone model

Honor Magic 6 Pro

问题涉及的播放平台 / Affected playback platform

网易云音乐 / NetEase Cloud Music

复现时的音频输出设备 / Audio output during reproduction

不涉及播放 / Not related to playback

是否开启 USB 独占播放 / Is USB exclusive playback enabled

不涉及播放 / Not related to playback

USB 音频设备与播放设置(如适用) / USB audio device and playback settings (if applicable)

No response

播放内容与相关设置(如适用) / Playback item and related settings (if applicable)

No response

版本和其他要求 / Version and Other Requirements

  • [x] 我使用的是最新 CI 版本,并已开启开发者模式(在设置中连续点击 7 次版本号)。/ I'm using the latest CI build with DEBUG Mode enabled (by tapping the version number 7 times in Settings).
  • [x] 我已经在 Issue Tracker 中找过我要提出的问题,没有找到相同问题。重复问题会被关闭。 / I have searched in the Issue Tracker and found no similar issues. Duplicate issues will be closed.
  • [x] 我已知晓并同意,如果我不按照模板提供的指示进行填写,则我的 Issue 可能会被无条件删除。 / I understand and agree that my issue may be deleted without notice if I do not follow the instructions provided in the template.

日志 / Logs

No response

补充说明(可选) / Additional information (optional)

问题 JSONObject.NULL 被 optString() 解析成字符串 "null",导致缓存描述符指纹不一致,缓存被误判失效。 修复方法 在 optNullableString() 中先判断: if (!has(key) || isNull(key)) return null 无需修改缓存长度容忍策略。相关单元测试已通过。

zoinve avatar Sep 02 '26 06:09 zoinve

Image修复后可大幅提升缓存命中率

zoinve avatar Sep 02 '26 06:09 zoinve

Fixed By #408 .

zoinve avatar Sep 02 '26 07:09 zoinve