fix: only re-categorize download group items, not other/compilation (#149)

The "other" group contains podcast episodes with release_type "album"
that should stay in Others, not be moved to Albums. Only "download"
group items should be re-categorized since download is a distribution
channel, not a content classification.
This commit is contained in:
vicrodh committed 2026-03-07 23:07:10 -06:00
1 parent 6bcfaa8f90
commit df37b2c15d
1 file changed
+7 -5
+7 -5
View File
@@ -679,9 +679,11 @@ export function convertPageArtist(response: PageArtistResponse): ArtistDetail {
const summary = pageReleaseToSummary(release, response.id); const summary = pageReleaseToSummary(release, response.id);
if (!summary) continue; if (!summary) continue;
// For groups like "download", "other", "awardedRelease" that map to "others", // Only re-categorize items from the "download" group by their individual release_type,
// re-categorize each item by its individual release_type (single → eps, album → albums, etc.) // since "download" is a distribution channel, not a content type.
const itemCategory = groupCategory === 'others' && release.release_type // Groups like "other" and "compilation" are intentional content classifications
// (e.g., podcast episodes have release_type "album" but belong in Others).
const itemCategory = group.type === 'download' && release.release_type
? mapReleaseType(release.release_type) ? mapReleaseType(release.release_type)
: groupCategory; : groupCategory;
@@ -799,8 +801,8 @@ export function appendPageReleases(
const summary = pageReleaseToSummary(release, artist.id); const summary = pageReleaseToSummary(release, artist.id);
if (!summary || allExistingIds.has(summary.id)) continue; if (!summary || allExistingIds.has(summary.id)) continue;
// Re-categorize items from "others" groups by their individual release_type // Only re-categorize items from the "download" group (distribution channel, not content type)
const itemCategory = groupCategory === 'others' && release.release_type const itemCategory = releaseType === 'download' && release.release_type
? mapReleaseType(release.release_type) ? mapReleaseType(release.release_type)
: groupCategory; : groupCategory;