From 1c5c6fa344438c174b7d6e46eab3e3ced95c91de Mon Sep 17 00:00:00 2001 From: anon Date: Sat, 26 Oct 2024 17:44:08 +0200 Subject: [PATCH] fix stupid apple naming --- scrobble-handler.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scrobble-handler.php b/scrobble-handler.php index 3516d19..18eb0a9 100644 --- a/scrobble-handler.php +++ b/scrobble-handler.php @@ -458,6 +458,18 @@ class ScrobbleHandler { } public function fetch_and_save_album_cover($artist_name, $album_name) { + $album_exceptions = [ + 'Dios' => [ + 'Gasoline EP' => 'Gasoline EP - EP' + ] + ]; + + // Check if there's an exception for this artist and album + if (isset($album_exceptions[$artist_name]) && + isset($album_exceptions[$artist_name][$album_name])) { + $album_name = $album_exceptions[$artist_name][$album_name]; + } + // Encode the artist and album name for the URL $search_term = urlencode($artist_name . ' ' . $album_name);