Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
# Changelog

## v2.2.0 (2026-11-7)
## v2.2.0 (2026-11-10)

### 🌟 新增功能与体验升级

- **Subsonic 评分歌单与联动补数据 (#508 @pyss56)**:新增按 1–5 星汇总的虚拟评分歌单,1 星歌单包含命中不喜欢规则的歌曲,空星级不生成歌单;接入评分快照创建、导出与恢复,并在后台提供目标用户选择和两个方向的手动联动补数据入口。
- **快照导入与恢复完善 (#508 @pyss56)**:歌单及不喜欢快照区分导入与系统生成来源,支持按来源筛选,避免导入记录参与系统快照自动清理;恢复前先保存当前状态。
- **Web 播放器歌曲评分**:播放器、歌曲列表、歌单、排行榜及本地音乐支持 1–5 星评分与清除,「我的评分」集中查看、筛选及导出;与 Subsonic 共用评分数据,独立保存到评分目录,不写入歌单。本地歌曲关联在线版后,在线已有评分优先,否则迁移本地评分、来源与历史,并删除本地重复记录。
- ![Web 播放器歌曲评分与我的评分](md/log/2.2.0-6.png)
- **后台评分与不喜欢数据查看**:按用户查看歌曲、歌手、专辑的评分与不喜欢记录,展示封面、音乐平台、添加或评分来源及详细资料;支持组合筛选、排序、分页和导出筛选结果。
- ![后台查看用户评分数据](md/log/2.2.0-7.png)
- **Subsonic 缓存优先时优先使用 OpenList**:后台新增「缓存优先时优先使用 OpenList」设置,可在缓存优先播放流程中优先尝试该用户可用的 OpenList 播放来源。
- ![后台缓存优先时优先使用 OpenList 设置](md/log/2.2.0-8.png)
- **Web 不喜欢自动补分设置**:在 Web 设置中为当前账号单独开启或关闭「不喜欢自动补分」,默认关闭;将歌曲加入不喜欢时,仅为未评分歌曲补 1 星,已有评分不覆盖。设置保存到服务器,同一账号跨设备生效,后台手动补分独立执行。
- ![Web 设置中的不喜欢自动补分](md/log/2.2.0-9.png)
- **聚合搜索关键词联想**:并发获取多源联想,快源先展示,合并重复词并优先展示多源共同推荐内容;增加短期缓存、超时与中文输入法处理,切换输入或正式搜索时取消旧联想,支持方向键选词和回车搜索,保留聚合音源选择。
- **歌曲搜索分批加载与聚合排序**:各音源先请求一页并按歌名相关性及原始排名交错展示,保留按设置数量的本地分页,翻到未加载页面时自动取下一批,也可点击常驻「加载更多」按钮;独立记录各源页码、结束与失败状态,避免深页翻唱因歌手名字较短挤到前列,修复跨源 ID 碰撞,并保留手动追加前的页码、结果顺序与滚动位置。
- **内置音乐 SDK 接口更新**:同步 QQ 签名搜索、推荐歌单、歌手与歌单详情及 QRC 逐字歌词,更新酷我歌词、网易歌手和咪咕封面接口,补齐酷狗分享歌单解析;保留被替换的旧实现为注释,修复歌词时间精度、分页与取消请求问题。
Expand All @@ -21,6 +31,12 @@

### 🐛 缺陷修复与体验优化

- **评分模块归类与迁移边界修复**:评分服务、偏好、快照、校验、身份锁及事务迁移集中到 `src/server/rating/`;修复无评分用户的关联整理、仅评分事务覆盖未保存不喜欢数据的问题,并在不喜欢数据初始化时恢复遗留事务。

- **评分迁移与恢复一致性修复**:本地关联在线歌曲时同步迁移不喜欢原因中的评分 ID;评分、歌曲资料与相关不喜欢快照通过事务日志提交,写入失败可回滚,中断后可恢复。旧评分快照恢复时直接整理关联身份,保留手动不喜欢原因与历史快照。

- 修复不喜欢规则括号空格重复、同身份资料补全及跨来源隔离;记录评分与不喜欢来源,手动同步增加候选预览、资料补全统计及未解析失败计数。
- 修复 Subsonic 评分歌单显示与自动联动开关耦合,补齐评分歌单配置和评分快照备份分类;恢复评分时保留收藏,缓存淘汰后尝试重新解析评分歌曲,并提示评分已保存但联动失败的情况。
- **酷狗码导入修复 (#483)**:完善酷狗分享歌单的链接解析与歌曲列表获取,修复部分歌单导入失败的问题。
- **备份记录详情面板优化**:加宽桌面详情弹窗,分开展示标题与文件名,优化表格间距及长路径、SHA-256 和元数据换行,避免内容撑出面板或挤压关闭按钮,并适配移动端宽度。
- **列表长文本滚动优化**:Web 播放器及后台多类列表中,超出宽度的文件名、歌曲名、歌单名等文字在桌面端悬停时滚动,移开后恢复开头;移动端保持自动滚动,完整显示的文字保持静止。
Expand Down Expand Up @@ -228,7 +244,7 @@
- **Media Session 媒体会话控制、封面渲染与播放恢复稳定性提升 (#432 @pokemonred06-creator)**:
- **播放控制与指令幂等执行**: 修复系统媒体控制栏(Media Session)的播放/暂停指令未比对当前播放状态导致的逻辑反转问题,确保系统与锁屏快捷指令严格幂等。
- **意外暂停后的错误恢复守护**: 保留系统意外打断(如来电、系统音频中断)时的错误恢复监听,确保用户在恢复播放时重新挂载错误恢复能力,避免状态丢失。
- **Media Session 封面与车载渲染规范化**: 通过内建下载代理中转跨![1791824601110](image/changelog/1791824601110.png)![1791824602639](image/changelog/1791824602639.png)域封面,避免 Canvas 污染与跨域访问失败;统一在离屏 Canvas 居中缩放为标准 512×512 JPEG 位图(失败时优雅回退),防止尺寸或格式不符导致蓝牙车机或锁屏黑屏;增加版本锁与内存缓存,杜绝切歌时旧封面异步覆盖新歌曲,并补充专辑名 (`song.meta.albumName`) 读取。
- **Media Session 封面与车载渲染规范化**: 通过内建下载代理中转跨域封面,避免 Canvas 污染与跨域访问失败;统一在离屏 Canvas 居中缩放为标准 512×512 JPEG 位图(失败时优雅回退),防止尺寸或格式不符导致蓝牙车机或锁屏黑屏;增加版本锁与内存缓存,杜绝切歌时旧封面异步覆盖新歌曲,并补充专辑名 (`song.meta.albumName`) 读取。
- **iOS 后台保活桥接重连与打断恢复**: 在音频图重建(如调节均衡器/音效)时自动重新连接 MediaStreamDestination,避免桥接断开或静音;优化切回前台(`visibilitychange`)时的 AudioContext 状态恢复;捕获并容忍自动播放限制(`NotAllowedError`),保留锚点以便后续用户手势重试。
- **服务端缓存音频流 Range 请求与连接管理优化**: 严格限制只读取缓存目录内合法普通文件,增强路径遍历安全校验;补齐 HEAD 请求支持;完整支持不区分大小写的 `bytes=` 范围头、后缀范围(如 `bytes=-500`)及单边范围,对超出文件大小的请求规范返回 `416 Range Not Satisfiable`;并在客户端断开或读取出错时及时销毁读取流并释放文件描述符。

Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ services:
# Subsonic 独立服务
# - SUBSONIC_STANDALONE=true
# - SUBSONIC_PORT=4050
# WebDAV 备份目标
# WebDAV 备份目标(仅填地址与凭据不会启动同步,需显式开启 WEBDAV_ENABLE)
# - WEBDAV_ENABLE=true
# - WEBDAV_URL=
# - WEBDAV_USERNAME=
# - WEBDAV_PASSWORD=
# 网页播放器鉴权
# - ENABLE_WEBPLAYER_AUTH=true
# - WEBPLAYER_PASSWORD=123456
# - WEBPLAYER_PASSWORD=<请设置强密码,勿使用默认值>
# 其他常用项
# - SYNC_INTERVAL=60
# - CONFIG_PATH=/server/data/config.js
Expand Down
14 changes: 14 additions & 0 deletions docs/en/guide/backup-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,17 @@ Content verification is a separate historical result, not a real-time guarantee.
In records, choose Check files, select local, cloud or both, and selected records, current filtered results or all records for this connection. Checks cover primary record files; use content verification for attachments. Historical objects are excluded. Checks inspect existence, size and modification time without uploading, downloading bodies, deleting files or producing SHA-256 results. Cloud requests run sequentially and can be stopped while preserving completed observations.

Advanced filters show checked X/Y records and the newest check time for the matching scope; hover for the oldest timestamp. This does not imply every file was checked successfully in one run. Details show per-file timestamps. Listing records refreshes local metadata; manual local check times are retained separately. Cloud observations persist by connection and backup version across restarts. Interrupted jobs must be restarted.

### Subsonic ratings and snapshots

The rating-playlist switch controls virtual playlist visibility only. Each link switch controls its own direction; a zero threshold disables linking. Links only fill missing data: raising or clearing a rating preserves dislike rules, removing a dislike preserves ratings, and existing ratings are never overwritten. The one-star playlist also includes disliked tracks while preserving their actual ratings.

Restoring a rating snapshot replaces ratings only and preserves current artist and album favorites, including when reading legacy snapshots. Rating snapshots and their index belong to the snapshots backup scope; the current subsonic-meta.json belongs to user data. Select both scopes for a complete backup. If ratings are saved but dislike resolution or writing fails, the client receives a partial-success error and can retry or use manual synchronization. The two stores are not a cross-file transaction. Evicted rated tracks are resolved again when possible; unavailable sources retain their ratings but may temporarily prevent playlist display.

New dislike rules are deduplicated and matched by source; rules without a source explicitly apply to all sources. Duplicate records with matching source and non-conflicting song identity fill missing fields while preserving valid data and display names. Dislikes record provenance and enrichedBy; rating provenance is stored in ratingOrigins. Manual linking previews candidates including the online cache, counts unresolved targets as failures, and reports enrichment separately.

Configuration changes do not reconcile historical data. Raising the threshold allows manual linking to add newly qualifying rules. Lowering it, setting it to zero, disabling linking, or clearing ratings does not remove existing rules. Matching and visibility settings only change subsequent filtering and display. Automatic Web-to-rating linking applies only to individual songs with a source and song ID; artist and album dislikes are not written as song ratings.

The admin Data view includes a Dislikes tab for the selected user, combining dislike rules and disliked artist/album libraries. Filter by type, creation channel, platform, or keyword; inspect saved covers, rules, ratings, and complete fields. Missing provenance is explicitly shown as unrecorded rather than inferred. The view is read-only and does not change linking or ratings.

Rating identity migration and restore use a transaction journal: write failures roll back, and the next rating access completes an interrupted commit. Restore normalizes local/online scores against current file links and updates rating IDs in dislike reasons while preserving manual reasons and older snapshots. The temporary journal is stored in each user’s `rating/transaction.json` and removed after completion. Multiple server processes must not write to the same data directory concurrently.
38 changes: 38 additions & 0 deletions docs/en/guide/web-player.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,41 @@ Favorite artists/albums and dislike rules are stored separately. Subsonic can hi
Server downloads, sync-download and matching run in the backend; browser downloads run on the visiting device. Closing the page does not cancel submitted server work. Inspect task status and use its stop/cancel action rather than refreshing to stop it.

See [operations](./operations.md) for diagnosis and [API reference](../api/reference.md) for fields.

### Song ratings

After signing in to a local account, rate songs from 1 to 5 stars or clear ratings using the player, song menus, artist detail, charts, local music, and custom directories. Favorites → My ratings provides a searchable rating collection.

Web and Subsonic share per-user `ratings` and `ratingOrigins` in `subsonic-meta.json`. Rating snapshots live in `rating/snapshot/`; `rating/songs.json` stores essential Web-submitted song descriptions without playback URLs or authentication parameters. Ratings do not modify playlists or audio tags. Current ratings and song descriptions belong to the user-data backup scope; snapshots belong to the snapshots scope.

Online songs use source-specific IDs, preferring QQ song mids. Unlinked local files use stable registry IDs shared by Web and Subsonic. Once linked, the online ID becomes authoritative: reads and writes share the online version and other linked copies. If the online version already has a rating, it wins and the local score record is deleted. Otherwise the local score, origin and history move to the online ID, and the local entry is deleted. Relinking selects the new online ID; titles are never used to merge ratings. Files recognized as new after importing, rebuilding, or moving are not automatically matched to old ratings by name.

Low ratings only add dislike rules when linking and the threshold allow it. Raising or clearing ratings does not delete dislike rules. Direct Web ratings record `web`; Web rating-to-dislike linking records `web-rating-link`; direct Subsonic ratings record `subsonic`. Partial snapshot/link failures are reported after the rating is saved. Lists load ratings in batches and refresh periodically or when returning to the page.


### Rating identity, reconciliation and backups

Unlinked local songs use local IDs. Linking keeps an existing online score or migrates the local score when the online version is unrated, then removes the local score record. The dialog shows the target ID and linked copy count; Admin Data View no longer has rating status labels or filters.

The two supplement actions remain additive. Saving settings does not delete historical rules. To apply a changed threshold, select the user and choose Recalculate by threshold, preview the changes, then execute. Only invalid reasons traceable to a specific rating ID are removed. Rules with manual or other valid reasons remain; historical rules without precise provenance are preserved. Disabling linking does not trigger cleanup.

My ratings → Export rating backup includes scores, origins, song descriptions and local link references, without audio files. New rating snapshots also contain descriptions. Importing/restoring a rating backup in the admin interface restores scores and available descriptions while preserving current favorites and file links. Link references are for comparison: backup paths never locate or move files or revert associations. A score-only backup cannot recreate missing covers or titles.

Recommendation exclusion uses the same policy for daily, random and similar tracks: matching dislike rules and scores at or below the threshold are excluded. This is independent of ordinary list hiding and automatic linking.

Admin rating and dislike dashboards support platform, action origin, cover availability, record age, combined keywords and score filters. Platform options show user totals, including zero-count platforms. Click the score distribution to filter, change page size, inspect records or export the current selection. Rating statistics follow platform, origin, age and keyword filters; type and score further narrow the list.

### Per-user dislike auto-rating

Settings → Logic → Dislike auto-rating is saved to the current account on the server and defaults to off. Adding a Web song dislike supplements 1 star only when unrated; existing ratings remain. Other users and the low-score threshold do not control this preference. The global reverse-link switch has been removed. Admin backfill is an independent, previewable operation and works with auto-rating off or threshold zero. Sources are labeled Web manual rating, Subsonic manual rating, Dislike automatic rating, and Admin backfill. The preference is stored in each user’s `rating/preferences.json`; score backup restore does not change this preference.

Playlist detail supports direct rating. Open rating collections refresh periodically, on returning to the page and after local rating/dislike actions, preserving filters and list scroll. Each entity retains up to 30 recent score changes, including clearing, backfill and restore; identical submissions keep origin timestamps. Old history is not fabricated. Failed auto-rating reports partial completion while retaining the dislike. Recoverable restore write errors roll back files; this does not guarantee cross-file atomicity during process termination or power loss.


### Metadata repair and synchronization status

Identical scores keep their origin and timestamp while allowing available metadata to be repaired. Direct ratings and automatic/admin backfill share one write service; backfill only supplements missing scores. Resolved Subsonic metadata is stored in the user's `rating/songs.json`, reducing dependence on runtime caches. Favorite operations retain rating origins and history.

My ratings and admin Ratings show pending work with Retry failed items. The user's `rating/sync-status.json` tracks backfill writes, catalog writes, unresolved metadata and snapshot failures. Retries preserve newer scores; metadata resolution still depends on provider availability. Corrupt primary rating files block writes and exports without replacing the original. Corrupt status files request manual inspection instead of being cleared.

Admin previews separate additions, already-rated skips, duplicate linked identities and resolution failures. Saved scores with failed snapshots report partial completion. Version checks avoid unnecessary full refreshes. The Web collection average follows the current selection; the distribution follows the other filters, so users can switch score levels.
Loading
Loading