isVariant( 'oa_participant_identifier', 'enabled', $userContext ); $isOaSpotifyArtistKeyEnabled = $featuresService->isVariant( 'ccm_oa_spotify_artist_key', 'enabled', $userContext ); $isUpdateSpotifyAppleIdsWithGraphqlEnabled = $featuresService->isVariant( 'update_spotify_apple_ids_with_graphql', 'enabled', $userContext ); $isOAFeatureToPrimaryEnabled = $featuresService->isVariant( 'oa_feature_to_primary', 'enabled', $userContext ); if ($isUpdateSpotifyAppleIdsWithGraphqlEnabled) { $isOaParticipantIdentifierEnabled = false; } $userId = $_SESSION['S_USERID']; $graphqlGatewayServiceClient = new GraphqlGatewayServiceClient($userId, $logger); $wrapperObj = new MysqliWrapper($mysqli); $release_id = getReleaseIdByUpc($wrapperObj, $upc); // *******************************Fetch vendor_id and subaccount_id******************************* $vendorSql = 'SELECT p.vendor_id, p.subaccount_id FROM project p INNER JOIN releases r ON r.project_id = p.project_id WHERE r.upc = ?'; $dataParams = new QueryData(); $dataParams->addDataParam('i', $upc); $vendorResult = $wrapperObj->executeQuery($vendorSql, $dataParams); if ($vendorResult === false) { showierror($vendorSql); } $vendorResult = $vendorResult[0]; // ***************************************************************************** if ($action == 'edit' and $release_artist_id) { if (trim($artist_name) && (empty($apple_artist) || ctype_digit($apple_artist)) && (empty($spotify_artist) || ctype_alnum($spotify_artist))) { $sql = 'UPDATE release_artist SET artist_name = ?, role = ?'; if (!$isOaParticipantIdentifierEnabled && !$isUpdateSpotifyAppleIdsWithGraphqlEnabled) { $sql .= ', url = ?'; } $sql .= ' WHERE release_artist_id = ?'; $data_params = new QueryData(); $data_params->addDataParam('s', trimCommas($artist_name)); $data_params->addDataParam('s', $role); if (!$isOaParticipantIdentifierEnabled && !$isUpdateSpotifyAppleIdsWithGraphqlEnabled) { $data_params->addDataParam('s', $url); } $data_params->addDataParam('i', $release_artist_id); if ($wrapperObj->executeQuery($sql, $data_params, MysqliWrapper::RETURN_AFFECTED_ROWS) === false) { showierror($sql); } // *******************************Update Artist URIs***************************** $isParticipantSaveFailed = false; if ($isOaParticipantIdentifierEnabled) { $artistInfo = $vendorResult; $artistInfo['orchard_artist_name'] = $artist_name; $artistInfo['store_id'] = APPLE_STORE_ID; if (!empty($apple_artist)) { $artistInfo['store_artist_id'] = $apple_artist; updateArtistURIs($wrapperObj, $artistInfo); } else { deleteParticipantIdentifier($wrapperObj, $artistInfo); } $artistInfo['store_id'] = SPOTIFY_STORE_ID; if (!empty($spotify_artist)) { $artistInfo['store_artist_id'] = $spotify_artist; updateArtistURIs($wrapperObj, $artistInfo); } else { deleteParticipantIdentifier($wrapperObj, $artistInfo); } } elseif ($isUpdateSpotifyAppleIdsWithGraphqlEnabled) { if (!empty($labelParticipantId)){ $artistInfo = $vendorResult; $artistInfo['vendorId'] = $artistInfo['vendor_id']; $artistInfo['subaccountId'] = $artistInfo['subaccount_id']; $artistInfo['name'] = trim($artist_name); $artistInfo['id'] = $labelParticipantId; $artistInfo['spotifyId'] = !empty($spotify_artist) ? trim($spotify_artist) : null; $artistInfo['appleMusicId'] = !empty($apple_artist) ? trim($apple_artist) : null; $artistInfo['spotifyArtistKey'] = !empty($spotify_artist_key) ? trim($spotify_artist_key) : null; unset($artistInfo['vendor_id']); unset($artistInfo['subaccount_id']); $updateParticipant = $graphqlGatewayServiceClient->updateParticipantById($artistInfo); if ($updateParticipant['errors']) { $isParticipantSaveFailed = true; } } else { $artistInfo = $vendorResult; $artistInfo['vendorId'] = $artistInfo['vendor_id']; $artistInfo['subaccountId'] = $artistInfo['subaccount_id']; $artistInfo['name'] = trim($artist_name); $artistInfo['spotifyId'] = !empty($spotify_artist) ? trim($spotify_artist) : null; $artistInfo['appleMusicId'] = !empty($apple_artist) ? trim($apple_artist) : null; $artistInfo['spotifyArtistKey'] = !empty($spotify_artist_key) ? trim($spotify_artist_key) : null; unset($artistInfo['vendor_id']); unset($artistInfo['subaccount_id']); $createParticipant = $graphqlGatewayServiceClient->createLabelParticipants($artistInfo); if ($createParticipant['errors']) { $isParticipantSaveFailed = true; } } } // ****************************************************************************** $msg = $isParticipantSaveFailed === true ? '&err_msg[]=jbs19120' : '&confirm_msg=jbs19101'; header("Location: manage_release_artists.php?upc=$upc" . $msg); exit(); } else { $msg = ''; if (!trim($artist_name)) { $msg .= '&err_msg[]=jbs19102'; } if (!empty($apple_artist) && !ctype_digit($apple_artist)) { $encrypt = WebMessage::getParamHandler('Encrypt'); $apple_artist_id = '1419227'; $msg_apple_artist_id = $encrypt->process($apple_artist_id); $msg .= '&err_msg[]=32edty66&msg_apple_artist_id=' . $msg_apple_artist_id; } if (!empty($spotify_artist) && !ctype_alnum($spotify_artist)) { $encrypt = WebMessage::getParamHandler('Encrypt'); $spotify_artist_id = '3Nrfpe0tUJi4K4DXYWgMUX'; $msg_spotify_artist_id = $encrypt->process($spotify_artist_id); $msg .= '&err_msg[]=32edty65&msg_spotify_artist_id=' . $msg_spotify_artist_id; } header("Location: manage_release_artists.php?upc=$upc" . $msg); exit(); } } elseif ($action == 'add') { if (trim($artist_name)) { $urlQuerystr = ', url'; $urlPlaceholder = ', ?'; if ($isOaParticipantIdentifierEnabled || $isUpdateSpotifyAppleIdsWithGraphqlEnabled) { $urlQuerystr = ''; $urlPlaceholder = ''; } $sql = 'INSERT INTO release_artist (upc, artist_name'. $urlQuerystr .', role, release_id) VALUES (?, ?'. $urlPlaceholder .', ?, ?)'; $data_params = new QueryData(); $data_params->addDataParam('i', $upc); $data_params->addDataParam('s', trimCommas($artist_name)); if (!$isOaParticipantIdentifierEnabled && !$isUpdateSpotifyAppleIdsWithGraphqlEnabled) { $data_params->addDataParam('s', $url); } $data_params->addDataParam('s', $role); $data_params->addDataParam('i', $release_id); if ($wrapperObj->executeQuery($sql, $data_params, MysqliWrapper::RETURN_INSERT_ID) === false) { showierror($sql); } $msg = 'jbs19103'; header("Location: manage_release_artists.php?upc=$upc&confirm_msg=$msg"); exit(); } else { $msg = 'jbs19102'; header("Location: manage_release_artists.php?upc=$upc&err_msg=$msg"); exit(); } } elseif ($action == 'delete' and $release_artist_id) { $sql = 'DELETE FROM release_artist WHERE release_artist_id = ? AND upc = ?'; $data_params = new QueryData(); $data_params->addDataParam('i', $release_artist_id); $data_params->addDataParam('i', $upc); if ($wrapperObj->executeQuery($sql, $data_params, MysqliWrapper::RETURN_AFFECTED_ROWS) === false) { showierror($sql); } $msg = 'jbs19104'; header("Location: manage_release_artists.php?upc=$upc&confirm_msg=$msg"); exit(); } $sql = 'SELECT release_artist_id, artist_name, url, role FROM release_artist WHERE release_id = ?'; $data_params = new QueryData(); $data_params->addDataParam('i', $release_id); $result = $wrapperObj->executeQuery($sql, $data_params); if ($result === false) { showierror($sql); } $artistUriClass = ''; if ($isOaParticipantIdentifierEnabled && is_array($result)) { $piResult = fetchParticipantIdentifier($wrapperObj, $vendorResult); 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; } } } $artistUriClass = 'artist_uri'; } 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; $result[$key]['spotify_artist_key'] = isset($participantIdentifier['labelParticipant']['spotifyArtistKey']) ? $participantIdentifier['labelParticipant']['spotifyArtistKey'] : null; $result[$key]['id'] = $participantIdentifier['labelParticipant']['id']; } } } } $artistUriClass = 'artist_uri'; } if ($isOAFeatureToPrimaryEnabled && !array_search("feature_to_primary", $release_track_artist_roles)) { array_splice($release_track_artist_roles, 9, 0, "feature_to_primary" ); } ?>

Manage Release Artists

Artist Name Artist Role Spotify Artist URI
Please only enter the alphanumeric ID portion of the Spotify Artist URI e.g. https://open.spotify.com/artist/3Nrfpe0tUJi4K4DXYWgMUX
Apple Artist ID
Please only enter the numerical ID portion of the URL e.g. music.apple.com/us/artist/1419227
URL
spotify:artist: music.apple.com/artist/ spotify:artist:
Please only enter the alphanumeric ID portion of the Spotify Artist URI e.g. https://open.spotify.com/artist/3Nrfpe0tUJi4K4DXYWgMUX

APP Key
APP (Artist Profile Protection) was a feature launched by Spotify in 2026. Read the Press Release
music.apple.com/artist/ http://
http://