From b4083874ac0c6daecb99fd73c33d1bbe1643f4c1 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Fri, 16 Feb 2024 08:41:00 +0900 Subject: [PATCH] fix: invalid podcast artist name :facepalm: --- src/providers/song-info.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/providers/song-info.ts b/src/providers/song-info.ts index a62cce00..8b356410 100644 --- a/src/providers/song-info.ts +++ b/src/providers/song-info.ts @@ -125,6 +125,18 @@ const handleData = async ( break; default: songInfo.mediaType = MediaType.OtherVideo; + // HACK: This is a workaround for "podcast" types where "musicVideoType" doesn't exist. Google :facepalm: + if ( + !config.get('options.usePodcastParticipantAsArtist') && + ( + data.responseContext.serviceTrackingParams + ?.at(0) + ?.params + ?.find((it) => it.key === 'ipcc')?.value ?? '1' + ) != '0' + ) { + songInfo.artist = cleanupName(data.microformat.microformatDataRenderer.pageOwnerDetails.name); + } break; }