Skip to content

Album-artist grouping for cloud libraries + trust user-installed CAs#16

Open
lostf1sh wants to merge 2 commits into
mainfrom
fix/album-artist-cloud-and-user-ca-trust
Open

Album-artist grouping for cloud libraries + trust user-installed CAs#16
lostf1sh wants to merge 2 commits into
mainfrom
fix/album-artist-cloud-and-user-ca-trust

Conversation

@lostf1sh

Copy link
Copy Markdown
Collaborator

Implements two issues.

#7 — Allow self-signed certificates (Closes #7)

Release builds trusted only system CAs, so a root certificate the user imported via Android Settings was ignored and self-hosted Navidrome/Subsonic/Jellyfin servers with a private CA were refused.

  • Adds <certificates src="user"/> to the release network_security_config.xml (debug already had it).
  • User-controlled, declarative trust — the user must deliberately install the cert. Not a validation bypass, so F-Droid compliance is intact.

#8 — "Sort artists by Album Artist" ignored for Subsonic/Navidrome (Closes #8)

Two problems: cloud sync hardcoded albumArtist = null (so the Subsonic albumArtist / Jellyfin AlbumArtist tag was dropped), and the toggle only relabeled albums — the Artists tab always listed every track-level artist, so featured/compilation artists cluttered it for every source.

  • Capture album artist end to end for Navidrome and Jellyfin: API parser → DTO → cache entity → unified song.
  • songs.album_artist_id — id of the effective album artist (album_artist when present, else the primary track artist), populated at sync for local + both cloud sources. Album-artist-only names (e.g. "Various Artists") get a real artist row and are preserved by deleteOrphanedArtists.
  • When the toggle is on, the Artists tab and artist detail collapse onto album_artist_id. The column is preference-independent, so toggling switches queries at runtime with no re-sync. Default (toggle off) behavior is byte-for-byte unchanged.
  • MIGRATION_1_2 (v1 → v2) adds the three columns with defensive PRAGMA table_info guards and backfills album_artist_id from the existing primary artist so the collapsed tab is non-empty before the next sync. Verified the migration DDL matches the exported 2.json schema exactly.

Testing

All three pre-PR checks pass (JDK 21):

  • :app:compileDebugKotlin
  • :app:lintDebug
  • :app:testDebugUnitTest

Not done: live on-device DB upgrade test (no connected device); the schema-identity check against the exported v2 schema is the proxy.

lostf1sh added 2 commits June 18, 2026 01:59
Self-hosted Navidrome/Subsonic/Jellyfin servers commonly use a private or
self-signed CA. Release builds previously trusted only system CAs, so a root
certificate the user imported via Android Settings was ignored and the
connection was refused.

Add <certificates src="user"/> to the release network security config so the
app honors user-installed CAs. This is a declarative, user-controlled trust
decision (the user must deliberately install the cert), not a validation
bypass, and keeps F-Droid compliance intact.

Fixes #7
"Group by Album Artist" was effectively ignored for Subsonic/Navidrome and
Jellyfin libraries, and never decluttered the Artists tab for any source.

Two problems:
- Cloud sync hardcoded albumArtist = null, so the album-artist tag the Subsonic
  (albumArtist) and Jellyfin (AlbumArtist) APIs return was dropped and the
  setting could not work for cloud albums.
- The preference only relabeled album entities; the Artists tab always listed
  every track-level artist, so featured/compilation artists cluttered it even
  for local libraries.

Changes:
- Capture the album-artist tag end to end for Navidrome and Jellyfin
  (API parser -> DTO -> cache entity -> unified song).
- Add songs.album_artist_id, the id of the effective album artist (album_artist
  when present, else the primary track artist), populated at sync for local and
  both cloud sources. Album-artist-only names (e.g. "Various Artists") get a
  real artist row and are preserved by deleteOrphanedArtists.
- When the toggle is on, the Artists tab and artist detail collapse onto
  album_artist_id. The column is preference-independent, so toggling switches
  queries at runtime with no re-sync. Default (toggle off) behavior is unchanged.
- MIGRATION_1_2 (v1 -> v2) adds the columns with defensive PRAGMA guards and
  backfills album_artist_id from the existing primary artist.

Closes #8
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]: "Sort artists by Album Artist" setting ignored for Subsonic/Gonic synced libraries [Feature]: Allowing self-singed certificates

1 participant