Revert "feat: Deezer artist photo fallback for local artists with no Navidrome image"
This reverts commit 569af968c5.
This commit is contained in:
1 parent
569af968c5
commit
e059c358b3
5 files changed
+4
-18
No files matched your search
@@ -80,7 +80,6 @@ Big change: **the entire metadata/search stack moved from Apple's iTunes to Deez
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- **Web + Android** — Owned albums were wrongly shown as **"Unvollständig 1 / 0 Tracks"** on the artist page. Deezer's `/artist/{id}/albums` list omits `nb_tracks`, so the total read as 0 and every matched album looked incomplete. Web now resolves the real track count from the Deezer album endpoint for **matched (owned) albums only** and treats an unknown total as complete; Android treats an unknown total as complete (never a false partial)
|
- **Web + Android** — Owned albums were wrongly shown as **"Unvollständig 1 / 0 Tracks"** on the artist page. Deezer's `/artist/{id}/albums` list omits `nb_tracks`, so the total read as 0 and every matched album looked incomplete. Web now resolves the real track count from the Deezer album endpoint for **matched (owned) albums only** and treats an unknown total as complete; Android treats an unknown total as complete (never a false partial)
|
||||||
- **Web + Android** — Local Navidrome artist pages with **no artist image** (niche artists like N!GHT that Navidrome's metadata agents have no art for) showed a blank hero. They now fall back to the **matched Deezer artist photo** (Navidrome image → Deezer photo → album cover)
|
|
||||||
|
|
||||||
### Notes
|
### Notes
|
||||||
- Deploy: `git pull`, then rebuild the frontend (`docker compose up -d --build novasonic-frontend`) and restart the backend (`docker compose restart novasonic-backend`). Service worker bumped to `ns-v54`
|
- Deploy: `git pull`, then rebuild the frontend (`docker compose up -d --build novasonic-frontend`) and restart the backend (`docker compose restart novasonic-backend`). Service worker bumped to `ns-v54`
|
||||||
|
|||||||
@@ -218,10 +218,7 @@ fun ArtistDetailScreen(
|
|||||||
|
|
||||||
// Hero card
|
// Hero card
|
||||||
item {
|
item {
|
||||||
// Navidrome's own artist image first; if its agents have none (niche artists like N!GHT),
|
|
||||||
// fall back to the matched Deezer artist photo, then the album cover.
|
|
||||||
val imgUrl = state.info?.largeImageUrl?.takeIf { it.isNotBlank() }
|
val imgUrl = state.info?.largeImageUrl?.takeIf { it.isNotBlank() }
|
||||||
?: state.deezerImage
|
|
||||||
?: coverUrl(artist.coverArt)
|
?: coverUrl(artist.coverArt)
|
||||||
Box(
|
Box(
|
||||||
Modifier
|
Modifier
|
||||||
|
|||||||
@@ -43,8 +43,6 @@ data class ArtistUiState(
|
|||||||
val showEventsSheet: Boolean = false,
|
val showEventsSheet: Boolean = false,
|
||||||
// Deezer fan count of the matched artist (shown under the name), null if unknown
|
// Deezer fan count of the matched artist (shown under the name), null if unknown
|
||||||
val fanCount: Long? = null,
|
val fanCount: Long? = null,
|
||||||
// Deezer artist photo — hero fallback when Navidrome's agents have no image (niche artists)
|
|
||||||
val deezerImage: String? = null,
|
|
||||||
// Preview + download
|
// Preview + download
|
||||||
val previewingId: Long? = null,
|
val previewingId: Long? = null,
|
||||||
val downloadSheetItem: ItunesItem? = null,
|
val downloadSheetItem: ItunesItem? = null,
|
||||||
@@ -123,10 +121,7 @@ class ArtistViewModel(app: Application, savedState: SavedStateHandle) : AndroidV
|
|||||||
?: artists.firstOrNull()
|
?: artists.firstOrNull()
|
||||||
)
|
)
|
||||||
val iArtistId = iArtist?.artistId
|
val iArtistId = iArtist?.artistId
|
||||||
if (iArtist != null) _state.value = _state.value.copy(
|
if (iArtist?.fanCount != null) _state.value = _state.value.copy(fanCount = iArtist.fanCount)
|
||||||
fanCount = iArtist.fanCount ?: _state.value.fanCount,
|
|
||||||
deezerImage = iArtist.artworkUrl100?.takeIf { it.isNotBlank() } ?: _state.value.deezerImage,
|
|
||||||
)
|
|
||||||
|
|
||||||
if (iArtistId != null) {
|
if (iArtistId != null) {
|
||||||
coroutineScope {
|
coroutineScope {
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
const CACHE = 'ns-v56';
|
const CACHE = 'ns-v55';
|
||||||
const PRECACHE = ['/', 'index.html', 'manifest.json', 'icon.svg'];
|
const PRECACHE = ['/', 'index.html', 'manifest.json', 'icon.svg'];
|
||||||
const SKIP_PATHS = ['/rest/stream', '/rest/download', '/config.js'];
|
const SKIP_PATHS = ['/rest/stream', '/rest/download', '/config.js'];
|
||||||
// Auth token params stripped from cache keys so artwork survives across sessions/token refreshes.
|
// Auth token params stripped from cache keys so artwork survives across sessions/token refreshes.
|
||||||
|
|||||||
+2
-7
@@ -178,12 +178,8 @@ export async function loadArtistDetail(artist) {
|
|||||||
const itunesArtistId = knownItunes ?? iArtistMatch?.artistId ?? null;
|
const itunesArtistId = knownItunes ?? iArtistMatch?.artistId ?? null;
|
||||||
if (!knownFans) _showFans(iArtistMatch?.fanCount); // local artist: show the matched Deezer artist's fans
|
if (!knownFans) _showFans(iArtistMatch?.fanCount); // local artist: show the matched Deezer artist's fans
|
||||||
|
|
||||||
// Artist photo: Navidrome (from its metadata agents) first; if it has none, fall back to the
|
// Non-local (Deezer) artist has no Navidrome photo — fetch the Deezer artist picture for the hero.
|
||||||
// matched Deezer artist's picture. Covers non-local Deezer artists AND niche local artists
|
if (!hasND && itunesArtistId && pfpWrap) {
|
||||||
// (e.g. N!GHT) that Navidrome's agents have no art for — the hero was blank for those before.
|
|
||||||
if (itunesArtistId && pfpWrap) {
|
|
||||||
const ndImg = await imgP.catch(() => null);
|
|
||||||
if (!ndImg) {
|
|
||||||
const dzImg = iArtistMatch?.artworkUrl100 || await deezerArtistImage(itunesArtistId);
|
const dzImg = iArtistMatch?.artworkUrl100 || await deezerArtistImage(itunesArtistId);
|
||||||
if (dzImg) {
|
if (dzImg) {
|
||||||
const pfpImg = document.createElement('img');
|
const pfpImg = document.createElement('img');
|
||||||
@@ -194,7 +190,6 @@ export async function loadArtistDetail(artist) {
|
|||||||
document.getElementById('artist-hero-pfp-initial')?.style.setProperty('display', 'none');
|
document.getElementById('artist-hero-pfp-initial')?.style.setProperty('display', 'none');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
const [iAlbumsRes, iTracksRes] = itunesArtistId
|
const [iAlbumsRes, iTracksRes] = itunesArtistId
|
||||||
? await Promise.allSettled([
|
? await Promise.allSettled([
|
||||||
|
|||||||
Reference in new issue
Block a user