Skip to content

fix: NetEase source tagging + lossless quality, and lyrics-card extended Unicode glyphs#2442

Merged
theovilardo merged 1 commit into
masterfrom
fix/netease-source-and-lyrics-glyphs
Jun 22, 2026
Merged

fix: NetEase source tagging + lossless quality, and lyrics-card extended Unicode glyphs#2442
theovilardo merged 1 commit into
masterfrom
fix/netease-source-and-lyrics-glyphs

Conversation

@lostf1sh

Copy link
Copy Markdown
Collaborator

Combined fix for two unrelated bugs.

#2431 — NetEase Cloud Music sync

Songs miscategorized as local + broken playlist/cleanup sync. NeteaseRepository.syncUnifiedLibrarySongsFromNetease() built its SongEntity rows without sourceType, so they defaulted to SourceType.LOCAL (0). Consequences:

  • NetEase tracks surfaced in the local media library (the local/cloud split keys on source_type).
  • The incremental-sync deletion diff was a permanent no-op, because getAllNeteaseSongIds() filters source_type = 2 and the repo rows were 0 — so playlists never reconciled.
  • Logout cleanup (clearAllNeteaseSongs()) deleted nothing for the same reason.

Every other source repo (Navidrome / GDrive / QQ / Jellyfin) sets sourceType, and the SyncWorker NetEase path already set both sourceType and artistsJson; only this repository copy omitted them. Now fixed to match.

Quality capped despite SVIP. getSongUrl() defaulted to "exhigh" with a fallback set of higher/standard — no lossless tier was ever requested, so SVIP accounts could not get FLAC. The API already maps level=losslessencodeType=flac. Default is now "lossless" with a graceful fallback chain lossless → exhigh → higher → standard, so non-privileged accounts still resolve a URL.

#2427 — Extended Unicode glyphs missing in Lyrics Card

Glyphs like Icelandic æ, ð, þ rendered as tofu (□) in the lyrics card. The lyrics text used the bundled Google Sans Rounded variable font, which drops those codepoints at runtime. The lyrics text style now uses the platform default font (fontFamily = null), which has full Latin Extended coverage.

Trade-off: lyrics now render in the system font rather than Google Sans Rounded. A multi-entry FontFamily does not fix this — Compose resolves one font per weight and has no per-glyph fall-through within a family; platform-level fallback is the reliable path.

Verification

  • ./gradlew :app:compileDebugKotlin — BUILD SUCCESSFUL.
  • NetEase lossless delivery and the on-device glyph rendering still want a real SVIP account / affected device to confirm end-to-end; the code paths and the level=lossless → flac API mapping are verified statically.

Follow-up (not in this PR)

NeteaseRepository.syncUnifiedLibrarySongsFromNetease() and the NetEase block in SyncWorker duplicate the song→entity mapping and had drifted — that drift is what caused the #2431 miscategorization. Worth consolidating into one shared mapper so they cannot diverge again.

Closes #2431
Closes #2427

… glyphs

NetEase library sync (#2431):
- syncUnifiedLibrarySongsFromNetease() built SongEntity without sourceType,
  so rows defaulted to SourceType.LOCAL. NetEase tracks showed up in the
  local media library, the incremental-sync deletion diff was a no-op
  (getAllNeteaseSongIds filters source_type=2), and logout cleanup via
  clearAllNeteaseSongs deleted nothing. Now set sourceType = NETEASE and
  artistsJson, matching the SyncWorker path.
- getSongUrl defaulted to "exhigh" with no lossless tier, so SVIP accounts
  were capped to lower quality. Default to "lossless" and fall back through
  exhigh/higher/standard so non-privileged accounts still resolve a URL.

Lyrics card glyphs (#2427):
- Extended Unicode glyphs (e.g. Icelandic æ ð þ) rendered as tofu because
  the lyrics text used the bundled Google Sans Rounded variable font, which
  drops those codepoints at runtime. Render lyrics with the platform default
  font (fontFamily = null), which has full Latin Extended coverage.
@theovilardo theovilardo merged commit 905974a into master Jun 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Issues with Syncing Playlists on NetEase Cloud Music [Bug]: Extended Unicode glyphs missing in Lyrics Card

2 participants