isVariant( 'oa_participant_identifier', 'enabled', $userContext ); $isOaSpotifyArtistKeyEnabled = $featuresService->isVariant( 'ccm_oa_spotify_artist_key', 'enabled', $userContext ); $isOAFeatureToPrimaryEnabled = $featuresService->isVariant( 'oa_feature_to_primary', 'enabled', $userContext ); $isUpdateSpotifyAppleIdsWithGraphqlEnabled = $featuresService->isVariant( 'update_spotify_apple_ids_with_graphql', 'enabled', $userContext ); if ($isUpdateSpotifyAppleIdsWithGraphqlEnabled) { $isOaParticipantIdentifierEnabled = false; } $userId = $_SESSION['S_USERID']; $graphqlGatewayServiceClient = new GraphqlGatewayServiceClient($userId, $logger); // *******************************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 INNER JOIN track t ON t.upc = r.upc WHERE t.id = ?'; $dataParams = new QueryData(); $dataParams->addDataParam('i', $track_id); $vendorResult = $wrapperObj->executeQuery($vendorSql, $dataParams); if ($vendorResult === false) { showierror($vendorSql); } $vendorResult = $vendorResult[0]; // ******************************************************************************************** $configuration = Zend_Registry::get('configuration'); $oauthConfig = new Vectorapi\ApiConfig($configuration); $oauthConfig->setVapiConfig('oa', $_SESSION['S_USERID']); /* Validation for Performer as there must be a performer must be performer */ if(in_array($frmSubmit,array('update','add'))){ $artist_name = isset($artist_name)?trim($artist_name):''; $artist_name = trimCommas($artist_name); $artistArray = getTrackArtistArray($track_id, $wrapperObj); if($track_artist_id) $artistArray[$track_artist_id] = $type; $err_msg = ''; if(!empty($artistArray) && $type != 'performer' && !in_array('performer', $artistArray)){ $err_msg = '&err_msg[]=b338fe69'; }elseif (empty($artistArray) && $type != 'performer'){ $err_msg = '&err_msg[]=48dbb466'; }elseif($type=='performer' && empty($artist_name)){ $err_msg = '&err_msg[]=112e209d'; } if (in_array($frmSubmit,array('update')) && (!empty($apple_artist) && !ctype_digit($apple_artist))) { $encrypt = WebMessage::getParamHandler('Encrypt'); $apple_artist_id = '1419227'; $msg_apple_artist_id = $encrypt->process($apple_artist_id); $err_msg .= '&err_msg[]=32edty66&msg_apple_artist_id=' . $msg_apple_artist_id; } if (in_array($frmSubmit, array('update')) && (!empty($spotify_artist) && !ctype_alnum($spotify_artist))) { $encrypt = WebMessage::getParamHandler('Encrypt'); $spotify_artist_id = '3Nrfpe0tUJi4K4DXYWgMUX'; $msg_spotify_artist_id = $encrypt->process($spotify_artist_id); $err_msg .= '&err_msg[]=32edty65&msg_spotify_artist_id=' . $msg_spotify_artist_id; } if ($err_msg){ header("Location: add_track_artist_pop.php?track_id=$track_id". $err_msg); exit(); } } if ($frmSubmit == 'update') { if ($track_artist_id) { $isParticipantSaveFailed = false; $dataParams = new QueryData(); $sql = 'UPDATE track_artist SET name = ?, type = ? WHERE id = ?'; $dataParams->addDataParam('s', stripControlChars(trimCommas($artist_name))); $dataParams->addDataParam('s', $type); $dataParams->addDataParam('i', $track_artist_id); if ($wrapperObj->executeQuery($sql, $dataParams, MysqliWrapper::RETURN_AFFECTED_ROWS) === false) { showierror($sql); } // *******************************Update Artist URIs*********************************** if ($isUpdateSpotifyAppleIdsWithGraphqlEnabled) { $artistInfo = $vendorResult; $artistInfo['vendorId'] = $artistInfo['vendor_id']; $artistInfo['subaccountId'] = $artistInfo['subaccount_id']; $artistInfo['name'] = $artist_name; $artistInfo['id'] = $participant_id; $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 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); } } // ************************************************************************************ $msg = $isParticipantSaveFailed === true ? '&err_msg[]=jbs19120' : '&confirm_msg=7d9bc4a6'; } } elseif ($frmSubmit == 'add') { $dataParams = new QueryData(); $insert_query = 'INSERT INTO track_artist (track_id, type, name) VALUES (?, ?, ?)'; $dataParams->addDataParam('i', $track_id); $dataParams->addDataParam('s', $type); $dataParams->addDataParam('s', stripControlChars(trimCommas($artist_name))); if ($wrapperObj->executeQuery($insert_query, $dataParams, MysqliWrapper::RETURN_INSERT_ID) === false) { showierror($insert_query); } if ($isUpdateSpotifyAppleIdsWithGraphqlEnabled) { $artistInfo = $vendorResult; $artistInfo['vendorId'] = $artistInfo['vendor_id']; $artistInfo['subaccountId'] = $artistInfo['subaccount_id']; $artistInfo['name'] = $artist_name; $artistInfo['id'] = $participant_id; $artistInfo['spotifyId'] = null; $artistInfo['appleMusicId'] = null; $artistInfo['spotifyArtistKey'] = $spotifyArtistKey; unset($artistInfo['vendor_id']); unset($artistInfo['subaccount_id']); $graphqlGatewayServiceClient->createLabelParticipants($artistInfo); } $msg = '565865f8'; } elseif ($delete and $id) { $artistArray = getTrackArtistArray($track_id, $wrapperObj); $artistCount = array_count_values($artistArray); $totalPerformers = $artistCount['performer']; if($totalPerformers <= 1 && $type == "performer"){ $err_msg = 'd8d0974b'; header("Location: add_track_artist_pop.php?track_id=$track_id&err_msg=$err_msg"); exit(); } $dataParams = new QueryData(); $sql = 'DELETE FROM track_artist WHERE id = ?'; $dataParams->addDataParam('i', $id); if ($wrapperObj->executeQuery($sql, $dataParams, MysqliWrapper::RETURN_AFFECTED_ROWS) === false) { showierror($sql); } $msg = 'e99ae22d'; } if ($msg and $track_id) { header("Location: add_track_artist_pop.php?track_id=$track_id&confirm_msg=$msg"); exit(); } #get all previously entered artist. $dataParams = new QueryData(); $get_artist_query = 'SELECT ta.id, ta.type, ta.name FROM track_artist ta WHERE ta.track_id = ?'; $dataParams->addDataParam('s', $track_id); $get_artist_result = $wrapperObj->executeQuery($get_artist_query, $dataParams); if ($get_artist_result === false) { showierror($sql); } $track_artists = array(); foreach ($get_artist_result as $get_artist_row) { $type = strtolower($get_artist_row['type']); switch ($type) { case 'musician': case 'mastered by': case 'recording artist': $theType = 'performer'; break; default: $theType = $type; } $track_artists[$get_artist_row['id']] = array('type'=>$theType, 'name'=>$get_artist_row['name']); } $artistUriClass = ''; if ($isOaParticipantIdentifierEnabled && is_array($track_artists)) { $piResult = fetchParticipantIdentifier($wrapperObj, $vendorResult); foreach ($track_artists as $key => $value) { foreach ($piResult as $row) { $storeArtistId = $row['orchard_artist_name_md5'] == md5($value['name']) ? $row['store_artist_id']: null; if (!is_null($storeArtistId) && $row['store_id'] == APPLE_STORE_ID) { $track_artists[$key]['apple_artist_id'] = $storeArtistId; } elseif (!is_null($storeArtistId) && $row['store_id'] == SPOTIFY_STORE_ID) { $track_artists[$key]['spotify_artist_id'] = $storeArtistId; } } } $artistUriClass = 'artist_uri'; } else if ($isUpdateSpotifyAppleIdsWithGraphqlEnabled) { $trackParticipantIdentifierData = $graphqlGatewayServiceClient->getParticipantIdsByTrackId((int)$track_id); if (!empty($trackParticipantIdentifierData) && is_array($track_artists)) { foreach ($track_artists as $key => $value) { $normalized_track_artist_name = mb_strtolower(preg_replace('/\s+/u', '', $value['name']), 'UTF-8'); foreach ($trackParticipantIdentifierData as $participantIdentifier) { $normalized_participant_name = mb_strtolower(preg_replace('/\s+/u', '', $participantIdentifier['participant']['name']), 'UTF-8'); if ($normalized_track_artist_name == $normalized_participant_name) { $track_artists[$key]['apple_artist_id'] = isset($participantIdentifier['participant']['appleMusicId']) ? $participantIdentifier['participant']['appleMusicId'] : null; $track_artists[$key]['spotify_artist_id'] = isset($participantIdentifier['participant']['spotifyId']) ? $participantIdentifier['participant']['spotifyId'] : null; $track_artists[$key]['participant_id'] = $participantIdentifier['participant']['id']; $track_artists[$key]['spotify_artist_key'] = isset($participantIdentifier['participant']['spotifyArtistKey']) ? $participantIdentifier['participant']['spotifyArtistKey'] : null; } } } } $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 Track Artists

$artist_info) { $row_class = (++$rci & 1) ? '' : 'alt'; ?>
Track Artist Name Track 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
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/