<a href="requests.php?action=edit&id=<?php echo $RequestID; ?> " class="brackets">Edit</a> <?php } if ($UserCanEdit || check_perms('users_mod')) { //check_perms('site_moderate_requests')) { ?> <a href="requests.php?action=delete&id=<?php echo $RequestID; ?> " class="brackets">Delete</a> <?php } if (Bookmarks::has_bookmarked('request', $RequestID)) { ?> <a href="#" id="bookmarklink_request_<?php echo $RequestID; ?> " onclick="Unbookmark('request', <?php echo $RequestID; ?> , 'Bookmark'); return false;" class="brackets">Remove bookmark</a> <?php } else { ?> <a href="#" id="bookmarklink_request_<?php echo $RequestID; ?> " onclick="Bookmark('request', <?php
</a> <?php } if (check_perms('site_collages_delete') || check_perms('site_edit_wiki') && !$Locked) { ?> <a href="collages.php?action=edit&collageid=<?php echo $CollageID; ?> " class="brackets">Edit description</a> <?php } else { ?> <span class="brackets">Locked</span> <?php } if (Bookmarks::has_bookmarked('collage', $CollageID)) { ?> <a href="#" id="bookmarklink_collage_<?php echo $CollageID; ?> " class="brackets" onclick="Unbookmark('collage', <?php echo $CollageID; ?> , 'Bookmark'); return false;">Remove bookmark</a> <?php } else { ?> <a href="#" id="bookmarklink_collage_<?php echo $CollageID; ?> " class="brackets" onclick="Bookmark('collage', <?php
} $GroupID = $TorrentDetails['ID']; $ArtistForm = Artists::get_artist($GroupID); if ($TorrentDetails['CategoryID'] == 0) { $CategoryName = "Unknown"; } else { $CategoryName = $Categories[$TorrentDetails['CategoryID'] - 1]; } $JsonMusicInfo = array(); if ($CategoryName == "Music") { $JsonMusicInfo = array('composers' => $ArtistForm[4] == null ? array() : pullmediainfo($ArtistForm[4]), 'dj' => $ArtistForm[6] == null ? array() : pullmediainfo($ArtistForm[6]), 'artists' => $ArtistForm[1] == null ? array() : pullmediainfo($ArtistForm[1]), 'with' => $ArtistForm[2] == null ? array() : pullmediainfo($ArtistForm[2]), 'conductor' => $ArtistForm[5] == null ? array() : pullmediainfo($ArtistForm[5]), 'remixedBy' => $ArtistForm[3] == null ? array() : pullmediainfo($ArtistForm[3]), 'producer' => $ArtistForm[7] == null ? array() : pullmediainfo($ArtistForm[7])); } else { $JsonMusicInfo = null; } $TagList = explode('|', $TorrentDetails['GROUP_CONCAT(DISTINCT tags.Name SEPARATOR \'|\')']); $JsonTorrentDetails = array('wikiBody' => Text::full_format($TorrentDetails['WikiBody']), 'wikiImage' => $TorrentDetails['WikiImage'], 'id' => (int) $TorrentDetails['ID'], 'name' => $TorrentDetails['Name'], 'year' => (int) $TorrentDetails['Year'], 'recordLabel' => $TorrentDetails['RecordLabel'], 'catalogueNumber' => $TorrentDetails['CatalogueNumber'], 'releaseType' => (int) $TorrentDetails['ReleaseType'], 'categoryId' => (int) $TorrentDetails['CategoryID'], 'categoryName' => $CategoryName, 'time' => $TorrentDetails['Time'], 'vanityHouse' => $TorrentDetails['VanityHouse'] == 1, 'isBookmarked' => Bookmarks::has_bookmarked('torrent', $GroupID), 'musicInfo' => $JsonMusicInfo, 'tags' => $TagList); $Torrent = $TorrentList[$TorrentID]; $Reports = Torrents::get_reports($TorrentID); if (count($Reports) > 0) { $Torrent['Reported'] = true; } else { $Torrent['Reported'] = false; } // Convert file list back to the old format $FileList = explode("\n", $Torrent['FileList']); foreach ($FileList as &$File) { $File = Torrents::filelist_old_format($File); } unset($File); $FileList = implode('|||', $FileList); $Userinfo = Users::user_info($Torrent['UserID']);
<?php if ($RevisionID && check_perms('site_edit_wiki')) { ?> <a href="torrents.php?action=revert&groupid=<?php echo $GroupID; ?> &revisionid=<?php echo $RevisionID; ?> &auth=<?php echo $LoggedUser['AuthKey']; ?> " class="brackets">Revert to this revision</a> <?php } if (Bookmarks::has_bookmarked('torrent', $GroupID)) { ?> <a href="#" id="bookmarklink_torrent_<?php echo $GroupID; ?> " class="remove_bookmark brackets" onclick="Unbookmark('torrent', <?php echo $GroupID; ?> , 'Bookmark'); return false;">Remove bookmark</a> <?php } else { ?> <a href="#" id="bookmarklink_torrent_<?php echo $GroupID; ?> " class="add_bookmark brackets" onclick="Bookmark('torrent', <?php
$JsonSimilar[] = array('artistId' => (int) $Similar['ArtistID'], 'name' => $Similar['Name'], 'score' => (int) $Similar['Score'], 'similarId' => (int) $Similar['SimilarID']); } } $JsonRequests = array(); foreach ($Requests as $RequestID => $Request) { $JsonRequests[] = array('requestId' => (int) $RequestID, 'categoryId' => (int) $Request['CategoryID'], 'title' => $Request['Title'], 'year' => (int) $Request['Year'], 'timeAdded' => $Request['TimeAdded'], 'votes' => (int) $Request['Votes'], 'bounty' => (int) $Request['Bounty']); } //notifications disabled by default $notificationsEnabled = false; if (check_perms('site_torrents_notify')) { if (($Notify = $Cache->get_value('notify_artists_' . $LoggedUser['ID'])) === false) { $DB->query("\n\t\t\tSELECT ID, Artists\n\t\t\tFROM users_notify_filters\n\t\t\tWHERE UserID = '{$LoggedUser['ID']}'\n\t\t\t\tAND Label = 'Artist notifications'\n\t\t\tLIMIT 1"); $Notify = $DB->next_record(MYSQLI_ASSOC, false); $Cache->cache_value('notify_artists_' . $LoggedUser['ID'], $Notify, 0); } if (stripos($Notify['Artists'], "|{$Name}|") === false) { $notificationsEnabled = false; } else { $notificationsEnabled = true; } } // Cache page for later use if ($RevisionID) { $Key = "artist_{$ArtistID}" . "_revision_{$RevisionID}"; } else { $Key = "artist_{$ArtistID}"; } $Data = array(array($Name, $Image, $Body, $NumSimilar, $SimilarArray, array(), array(), $VanityHouseArtist)); $Cache->cache_value($Key, $Data, 3600); json_print("success", array('id' => (int) $ArtistID, 'name' => $Name, 'notificationsEnabled' => $notificationsEnabled, 'hasBookmarked' => Bookmarks::has_bookmarked('artist', $ArtistID), 'image' => $Image, 'body' => Text::full_format($Body), 'vanityHouse' => $VanityHouseArtist == 1, 'tags' => array_values($Tags), 'similarArtists' => $JsonSimilar, 'statistics' => array('numGroups' => $NumGroups, 'numTorrents' => $NumTorrents, 'numSeeders' => $NumSeeders, 'numLeechers' => $NumLeechers, 'numSnatches' => $NumSnatches), 'torrentgroup' => $JsonTorrents, 'requests' => $JsonRequests));
$RequestVotes = Requests::get_votes_array($RequestID); $VoteCount = count($RequestVotes['Voters']); $ProjectCanEdit = check_perms('project_team') && !$IsFilled && ($CategoryID == 0 || $CategoryName == 'Music' && $Request['Year'] == 0); $UserCanEdit = !$IsFilled && $LoggedUser['ID'] == $Request['UserID'] && $VoteCount < 2; $CanEdit = $UserCanEdit || $ProjectCanEdit || check_perms('site_moderate_requests'); if ($CategoryName == "Music") { $JsonMusicInfo = array('composers' => isset($ArtistForm[4]) ? pullmediainfo($ArtistForm[4]) : array(), 'dj' => isset($ArtistForm[6]) ? pullmediainfo($ArtistForm[6]) : array(), 'artists' => isset($ArtistForm[1]) ? pullmediainfo($ArtistForm[1]) : array(), 'with' => isset($ArtistForm[2]) ? pullmediainfo($ArtistForm[2]) : array(), 'conductor' => isset($ArtistForm[5]) ? pullmediainfo($ArtistForm[5]) : array(), 'remixedBy' => isset($ArtistForm[3]) ? pullmediainfo($ArtistForm[3]) : array(), 'producer' => isset($ArtistForm[7]) ? pullmediainfo($ArtistForm[7]) : array()); } else { $JsonMusicInfo = new stdClass(); //json_encodes into an empty object: {} } $JsonTopContributors = array(); $VoteMax = $VoteCount < 5 ? $VoteCount : 5; for ($i = 0; $i < $VoteMax; $i++) { $User = array_shift($RequestVotes['Voters']); $JsonTopContributors[] = array('userId' => (int) $User['UserID'], 'userName' => $User['Username'], 'bounty' => (int) $User['Bounty']); } reset($RequestVotes['Voters']); list($NumComments, $Page, $Thread) = Comments::load('requests', $RequestID, false); $JsonRequestComments = array(); foreach ($Thread as $Key => $Post) { list($PostID, $AuthorID, $AddedTime, $Body, $EditedUserID, $EditedTime, $EditedUsername) = array_values($Post); list($AuthorID, $Username, $PermissionID, $Paranoia, $Artist, $Donor, $Warned, $Avatar, $Enabled, $UserTitle) = array_values(Users::user_info($AuthorID)); $JsonRequestComments[] = array('postId' => (int) $PostID, 'authorId' => (int) $AuthorID, 'name' => $Username, 'donor' => $Donor == 1, 'warned' => $Warned != '0000-00-00 00:00:00', 'enabled' => $Enabled == 2 ? false : true, 'class' => Users::make_class_string($PermissionID), 'addedTime' => $AddedTime, 'avatar' => $Avatar, 'comment' => Text::full_format($Body), 'editedUserId' => (int) $EditedUserID, 'editedUsername' => $EditedUsername, 'editedTime' => $EditedTime); } $JsonTags = array(); foreach ($Request['Tags'] as $Tag) { $JsonTags[] = $Tag; } json_print('success', array('requestId' => (int) $RequestID, 'requestorId' => (int) $Request['UserID'], 'requestorName' => $Requestor['Username'], 'isBookmarked' => Bookmarks::has_bookmarked('request', $RequestID), 'requestTax' => $RequestTax, 'timeAdded' => $Request['TimeAdded'], 'canEdit' => $CanEdit, 'canVote' => $CanVote, 'minimumVote' => $MinimumVote, 'voteCount' => $VoteCount, 'lastVote' => $Request['LastVote'], 'topContributors' => $JsonTopContributors, 'totalBounty' => (int) $RequestVotes['TotalBounty'], 'categoryId' => (int) $CategoryID, 'categoryName' => $CategoryName, 'title' => $Request['Title'], 'year' => (int) $Request['Year'], 'image' => $Request['Image'], 'bbDescription' => $Request['Description'], 'description' => Text::full_format($Request['Description']), 'musicInfo' => $JsonMusicInfo, 'catalogueNumber' => $Request['CatalogueNumber'], 'releaseType' => (int) $Request['ReleaseType'], 'releaseName' => $ReleaseName, 'bitrateList' => preg_split('/\\|/', $Request['BitrateList'], null, PREG_SPLIT_NO_EMPTY), 'formatList' => preg_split('/\\|/', $Request['FormatList'], null, PREG_SPLIT_NO_EMPTY), 'mediaList' => preg_split('/\\|/', $Request['MediaList'], null, PREG_SPLIT_NO_EMPTY), 'logCue' => html_entity_decode($Request['LogCue']), 'isFilled' => $IsFilled, 'fillerId' => (int) $Request['FillerID'], 'fillerName' => $Filler ? $Filler['Username'] : '', 'torrentId' => (int) $Request['TorrentID'], 'timeFilled' => $Request['TimeFilled'], 'tags' => $JsonTags, 'comments' => $JsonRequestComments, 'commentPage' => (int) $Page, 'commentPages' => (int) ceil($NumComments / TORRENT_COMMENTS_PER_PAGE), 'recordLabel' => $Request['RecordLabel'], 'oclc' => $Request['OCLC']));
function generate_torrent_table($Caption, $Tag, $Details, $Limit) { global $LoggedUser, $Categories, $ReleaseTypes, $GroupBy; ?> <h3>Top <?php echo "{$Limit} {$Caption}"; if (empty($_GET['advanced'])) { ?> <small class="top10_quantity_links"> <?php switch ($Limit) { case 100: ?> - <a href="top10.php?details=<?php echo $Tag; ?> " class="brackets">Top 10</a> - <span class="brackets">Top 100</span> - <a href="top10.php?type=torrents&limit=250&details=<?php echo $Tag; ?> " class="brackets">Top 250</a> <?php break; case 250: ?> - <a href="top10.php?details=<?php echo $Tag; ?> " class="brackets">Top 10</a> - <a href="top10.php?type=torrents&limit=100&details=<?php echo $Tag; ?> " class="brackets">Top 100</a> - <span class="brackets">Top 250</span> <?php break; default: ?> - <span class="brackets">Top 10</span> - <a href="top10.php?type=torrents&limit=100&details=<?php echo $Tag; ?> " class="brackets">Top 100</a> - <a href="top10.php?type=torrents&limit=250&details=<?php echo $Tag; ?> " class="brackets">Top 250</a> <?php } ?> </small> <?php } ?> </h3> <table class="torrent_table cats numbering border"> <tr class="colhead"> <td class="center" style="width: 15px;"></td> <td class="cats_col"></td> <td>Name</td> <td style="text-align: right;">Size</td> <td style="text-align: right;">Data</td> <td style="text-align: right;" class="sign snatches"><img src="static/styles/<?php echo $LoggedUser['StyleName']; ?> /images/snatched.png" alt="Snatches" title="Snatches" class="tooltip" /></td> <td style="text-align: right;" class="sign seeders"><img src="static/styles/<?php echo $LoggedUser['StyleName']; ?> /images/seeders.png" alt="Seeders" title="Seeders" class="tooltip" /></td> <td style="text-align: right;" class="sign leechers"><img src="static/styles/<?php echo $LoggedUser['StyleName']; ?> /images/leechers.png" alt="Leechers" title="Leechers" class="tooltip" /></td> <td style="text-align: right;">Peers</td> </tr> <?php // Server is already processing a top10 query. Starting another one will make things slow if ($Details === false) { ?> <tr class="rowb"> <td colspan="9" class="center"> Server is busy processing another top list request. Please try again in a minute. </td> </tr> </table><br /> <?php return; } // in the unlikely event that query finds 0 rows... if (empty($Details)) { ?> <tr class="rowb"> <td colspan="9" class="center"> Found no torrents matching the criteria. </td> </tr> </table><br /> <?php return; } $Rank = 0; foreach ($Details as $Detail) { $GroupIDs[] = $Detail[1]; } $Artists = Artists::get_artists($GroupIDs); foreach ($Details as $Detail) { list($TorrentID, $GroupID, $GroupName, $GroupCategoryID, $WikiImage, $TagsList, $Format, $Encoding, $Media, $Scene, $HasLog, $HasCue, $LogScore, $Year, $GroupYear, $RemasterTitle, $Snatched, $Seeders, $Leechers, $Data, $ReleaseType, $Size) = $Detail; $IsBookmarked = Bookmarks::has_bookmarked('torrent', $GroupID); $IsSnatched = Torrents::has_snatched($TorrentID); // highlight every other row $Rank++; $Highlight = $Rank % 2 ? 'a' : 'b'; // generate torrent's title $DisplayName = ''; if (!empty($Artists[$GroupID])) { $DisplayName = Artists::display_artists($Artists[$GroupID], true, true); } $DisplayName .= "<a href=\"torrents.php?id={$GroupID}&torrentid={$TorrentID}\" class=\"tooltip\" title=\"View torrent\" dir=\"ltr\">{$GroupName}</a>"; if ($GroupCategoryID == 1 && $GroupYear > 0) { $DisplayName .= " [{$GroupYear}]"; } if ($GroupCategoryID == 1 && $ReleaseType > 0) { $DisplayName .= ' [' . $ReleaseTypes[$ReleaseType] . ']'; } // append extra info to torrent title $ExtraInfo = ''; $AddExtra = ''; if (empty($GroupBy)) { if ($Format) { $ExtraInfo .= $Format; $AddExtra = ' / '; } if ($Encoding) { $ExtraInfo .= $AddExtra . $Encoding; $AddExtra = ' / '; } // "FLAC / Lossless / Log (100%) / Cue / CD"; if ($HasLog) { $ExtraInfo .= $AddExtra . 'Log (' . $LogScore . '%)'; $AddExtra = ' / '; } if ($HasCue) { $ExtraInfo .= $AddExtra . 'Cue'; $AddExtra = ' / '; } if ($Media) { $ExtraInfo .= $AddExtra . $Media; $AddExtra = ' / '; } if ($Scene) { $ExtraInfo .= $AddExtra . 'Scene'; $AddExtra = ' / '; } if ($Year > 0) { $ExtraInfo .= $AddExtra . $Year; $AddExtra = ' '; } if ($RemasterTitle) { $ExtraInfo .= $AddExtra . $RemasterTitle; } if ($IsSnatched) { if ($GroupCategoryID == 1) { $ExtraInfo .= ' / '; } $ExtraInfo .= Format::torrent_label('Snatched!'); } if ($ExtraInfo != '') { $ExtraInfo = "- [{$ExtraInfo}]"; } } $TorrentTags = new Tags($TagsList); //Get report info, use the cache if available, if not, add to it. $Reported = false; $Reports = Torrents::get_reports($TorrentID); if (count($Reports) > 0) { $Reported = true; } // print row ?> <tr class="torrent row<?php echo $Highlight . ($IsBookmarked ? ' bookmarked' : '') . ($IsSnatched ? ' snatched_torrent' : ''); ?> "> <td style="padding: 8px; text-align: center;"><strong><?php echo $Rank; ?> </strong></td> <td class="center cats_col"><div title="<?php echo $TorrentTags->title(); ?> " class="tooltip <?php echo Format::css_category($GroupCategoryID); ?> <?php echo $TorrentTags->css_name(); ?> "></div></td> <td class="big_info"> <?php if ($LoggedUser['CoverArt']) { ?> <div class="group_image float_left clear"> <?php ImageTools::cover_thumb($WikiImage, $GroupCategoryID); ?> </div> <?php } ?> <div class="group_info clear"> <span><a href="torrents.php?action=download&id=<?php echo $TorrentID; ?> &authkey=<?php echo $LoggedUser['AuthKey']; ?> &torrent_pass=<?php echo $LoggedUser['torrent_pass']; ?> " title="Download" class="brackets tooltip">DL</a></span> <strong><?php echo $DisplayName; ?> </strong> <?php echo $ExtraInfo; if ($Reported) { ?> - <strong class="torrent_label tl_reported">Reported</strong><?php } if ($IsBookmarked) { ?> <span class="remove_bookmark float_right"> <a href="#" id="bookmarklink_torrent_<?php echo $GroupID; ?> " class="bookmarklink_torrent_<?php echo $GroupID; ?> brackets" onclick="Unbookmark('torrent', <?php echo $GroupID; ?> , 'Bookmark'); return false;">Remove bookmark</a> </span> <?php } else { ?> <span class="add_bookmark float_right"> <a href="#" id="bookmarklink_torrent_<?php echo $GroupID; ?> " class="bookmarklink_torrent_<?php echo $GroupID; ?> brackets" onclick="Bookmark('torrent', <?php echo $GroupID; ?> , 'Remove bookmark'); return false;">Bookmark</a> </span> <?php } ?> <div class="tags"><?php echo $TorrentTags->format(); ?> </div> </div> </td> <td class="number_column nobr"><?php echo Format::get_size($Size); ?> </td> <td class="number_column nobr"><?php echo Format::get_size($Data); ?> </td> <td class="number_column"><?php echo number_format((double) $Snatched); ?> </td> <td class="number_column"><?php echo number_format((double) $Seeders); ?> </td> <td class="number_column"><?php echo number_format((double) $Leechers); ?> </td> <td class="number_column"><?php echo number_format($Seeders + $Leechers); ?> </td> </tr> <?php } //foreach ($Details as $Detail) ?> </table><br /> <?php }
?> " class="brackets">Notify of new uploads</a> <?php } else { ?> <a href="artist.php?action=notifyremove&artistid=<?php echo $ArtistID; ?> &auth=<?php echo $LoggedUser['AuthKey']; ?> " class="brackets">Do not notify of new uploads</a> <?php } } if (Bookmarks::has_bookmarked('artist', $ArtistID)) { ?> <a href="#" id="bookmarklink_artist_<?php echo $ArtistID; ?> " onclick="Unbookmark('artist', <?php echo $ArtistID; ?> , 'Bookmark'); return false;" class="brackets">Remove bookmark</a> <?php } else { ?> <a href="#" id="bookmarklink_artist_<?php echo $ArtistID; ?> " onclick="Bookmark('artist', <?php
$CollageData = $Cache->get_value($CacheKey); if ($CollageData) { list($Name, $Description, $CommentList, $Deleted, $CollageCategoryID, $CreatorID, $Locked, $MaxGroups, $MaxGroupsPerUser, $Updated, $Subscribers) = $CollageData; } else { $DB->query("\n\t\tSELECT\n\t\t\tName,\n\t\t\tDescription,\n\t\t\tUserID,\n\t\t\tDeleted,\n\t\t\tCategoryID,\n\t\t\tLocked,\n\t\t\tMaxGroups,\n\t\t\tMaxGroupsPerUser,\n\t\t\tUpdated,\n\t\t\tSubscribers\n\t\tFROM collages\n\t\tWHERE ID = '{$CollageID}'"); if (!$DB->has_results()) { json_die("failure"); } list($Name, $Description, $CreatorID, $Deleted, $CollageCategoryID, $Locked, $MaxGroups, $MaxGroupsPerUser, $Updated, $Subscribers) = $DB->next_record(MYSQLI_NUM); $CommentList = null; $SetCache = true; } // TODO: Cache this $DB->query("\n\tSELECT GroupID\n\tFROM collages_torrents\n\tWHERE CollageID = {$CollageID}"); $TorrentGroups = $DB->collect('GroupID'); $JSON = array('id' => (int) $CollageID, 'name' => $Name, 'description' => Text::full_format($Description), 'creatorID' => (int) $CreatorID, 'deleted' => (bool) $Deleted, 'collageCategoryID' => (int) $CollageCategoryID, 'collageCategoryName' => $CollageCats[(int) $CollageCategoryID], 'locked' => (bool) $Locked, 'maxGroups' => (int) $MaxGroups, 'maxGroupsPerUser' => (int) $MaxGroupsPerUser, 'hasBookmarked' => Bookmarks::has_bookmarked('collage', $CollageID), 'subscriberCount' => (int) $Subscribers, 'torrentGroupIDList' => $TorrentGroups); if ($CollageCategoryID != array_search(ARTIST_COLLAGE, $CollageCats)) { // torrent collage $TorrentGroups = array(); $DB->query("\n\t\tSELECT\n\t\t\tct.GroupID\n\t\tFROM collages_torrents AS ct\n\t\t\tJOIN torrents_group AS tg ON tg.ID = ct.GroupID\n\t\tWHERE ct.CollageID = '{$CollageID}'\n\t\tORDER BY ct.Sort"); $GroupIDs = $DB->collect('GroupID'); $GroupList = Torrents::get_groups($GroupIDs); foreach ($GroupIDs as $GroupID) { if (!empty($GroupList[$GroupID])) { $GroupDetails = Torrents::array_group($GroupList[$GroupID]); if ($GroupDetails['GroupCategoryID'] > 0 && $Categories[$GroupDetails['GroupCategoryID'] - 1] == 'Music') { $ArtistForm = $GroupDetails['ExtendedArtists']; $JsonMusicInfo = array('composers' => isset($ArtistForm[4]) ? pullmediainfo($ArtistForm[4]) : array(), 'dj' => isset($ArtistForm[6]) ? pullmediainfo($ArtistForm[6]) : array(), 'artists' => isset($ArtistForm[1]) ? pullmediainfo($ArtistForm[1]) : array(), 'with' => isset($ArtistForm[2]) ? pullmediainfo($ArtistForm[2]) : array(), 'conductor' => isset($ArtistForm[5]) ? pullmediainfo($ArtistForm[5]) : array(), 'remixedBy' => isset($ArtistForm[3]) ? pullmediainfo($ArtistForm[3]) : array(), 'producer' => isset($ArtistForm[7]) ? pullmediainfo($ArtistForm[7]) : array()); } else { $JsonMusicInfo = null; }