Skip to content

Commit 2b937f7

Browse files
committed
fix(Deezer): Treat record_type as lowercase
Deezer returns the record_type value in lowercase, while the code for handling the "compile" type was expecting it to be returned in uppercase.
1 parent b43e363 commit 2b937f7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

providers/Deezer/api_types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export type Release = MinimalRelease & {
8282
/** The number of album's Fans */
8383
fans: number;
8484
rating: number; // missing from https://developers.deezer.com/api/album
85-
/** The record type of the album (EP / ALBUM / COMPILE etc..) */
85+
/** The record type of the album (ep / album / compile etc..) */
8686
record_type: string;
8787
available: boolean;
8888
/** Whether the album contains explicit lyrics */

providers/Deezer/mod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ export class DeezerReleaseLookup extends ReleaseApiLookup<DeezerProvider, Releas
289289
}
290290

291291
private convertReleaseType(sourceType: string): ReleaseGroupType {
292-
return capitalizeReleaseType(sourceType.replace('COMPILE', 'COMPILATION'));
292+
return capitalizeReleaseType(sourceType.replace('compile', 'compilation'));
293293
}
294294

295295
private determineAvailability(media: HarmonyMedium[]): string[] | undefined {

0 commit comments

Comments
 (0)