addDataParam('i', $release_id); $result = $mysqliWrapperObj->executeQuery($sql, $data_params); if ($result === false) { showierror($sql); } //******************fetch Participant Identifier's data and map with release artists****************** if ($isOaParticipantIdentifierEnabled && is_array($result)) { $vendorDetails['vendor_id'] = $vendor_id; $vendorDetails['subaccount_id'] = !empty($subaccountId) ? $subaccountId : 0; $piResult = fetchParticipantIdentifier($mysqliWrapperObj, $vendorDetails); foreach ($result as $key => $value) { foreach ($piResult as $row) { $storeArtistId = $row['orchard_artist_name_md5'] == md5($value['artist_name']) ? $row['store_artist_id']: null; if (!is_null($storeArtistId) && $row['store_id'] == APPLE_STORE_ID) { $result[$key]['apple_artist_id'] = $storeArtistId; } elseif (!is_null($storeArtistId) && $row['store_id'] == SPOTIFY_STORE_ID) { $result[$key]['spotify_artist_id'] = $storeArtistId; } } } } elseif ($isUpdateSpotifyAppleIdsWithGraphqlEnabled && is_array($result)) { $vendorDetails['vendor_id'] = $vendor_id; $vendorDetails['subaccount_id'] = !empty($subaccountId) ? $subaccountId : 0; $participantIdentifierData = $graphqlGatewayServiceClient->getParticipantIdsByProductId(strval($release_id)); if (!empty($participantIdentifierData)) { foreach ($result as $key => $value) { $normalized_release_artist_name = mb_strtolower(preg_replace('/\s+/u', '', $value['artist_name']), 'UTF-8'); foreach ($participantIdentifierData as $participantIdentifier) { $normalized_participant_name = mb_strtolower(preg_replace('/\s+/u', '', $participantIdentifier['labelParticipant']['name']), 'UTF-8'); if ($normalized_release_artist_name == $normalized_participant_name) { $result[$key]['apple_artist_id'] = isset($participantIdentifier['labelParticipant']['appleMusicId']) ? $participantIdentifier['labelParticipant']['appleMusicId'] : null; $result[$key]['spotify_artist_id'] = isset($participantIdentifier['labelParticipant']['spotifyId']) ? $participantIdentifier['labelParticipant']['spotifyId'] : null; } } } } } //************************************************************************************************* ?>
| Artist Name | Artist Role | Spotify Artist URI | Apple Artist ID | URL |
|---|---|---|---|---|
| =$row['artist_name']?> | =($row['role'] == 'performer') ? 'primary artist' : $row['role']?> | =$row['spotify_artist_id'] ? 'spotify:artist:'.$row['spotify_artist_id'] : ''?> | =$row['apple_artist_id'] ? 'music.apple.com/artist/'.$row['apple_artist_id'] : ''?> | =$row['url']?> |
| No release artists found. | ||||