|
|
|
@ -113,9 +113,9 @@ public static function get_groups($GroupIDs, $Return = true, $GetArtists = true,
|
|
|
|
|
|
|
|
|
|
// Cache it all
|
|
|
|
|
foreach ($Found as $GroupID => $GroupInfo) {
|
|
|
|
|
$Cache->cache_value('torrent_group_'.$GroupID,
|
|
|
|
|
$Cache->cache_value("torrent_group_$GroupID",
|
|
|
|
|
array('ver' => CACHE::GROUP_VERSION, 'd' => $GroupInfo), 0);
|
|
|
|
|
$Cache->cache_value('torrent_group_light_'.$GroupID,
|
|
|
|
|
$Cache->cache_value("torrent_group_light_$GroupID",
|
|
|
|
|
array('ver' => CACHE::GROUP_VERSION, 'd' => $GroupInfo), 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -246,11 +246,11 @@ public static function delete_torrent($ID, $GroupID = 0, $OcelotReason = -1) {
|
|
|
|
|
list($UserID) = $DB->next_record();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$RecentUploads = $Cache->get_value('recent_uploads_'.$UserID);
|
|
|
|
|
$RecentUploads = $Cache->get_value("recent_uploads_$UserID");
|
|
|
|
|
if (is_array($RecentUploads)) {
|
|
|
|
|
foreach ($RecentUploads as $Key => $Recent) {
|
|
|
|
|
if ($Recent['ID'] == $GroupID) {
|
|
|
|
|
$Cache->delete_value('recent_uploads_'.$UserID);
|
|
|
|
|
$Cache->delete_value("recent_uploads_$UserID");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -259,11 +259,11 @@ public static function delete_torrent($ID, $GroupID = 0, $OcelotReason = -1) {
|
|
|
|
|
$DB->query("
|
|
|
|
|
SELECT info_hash
|
|
|
|
|
FROM torrents
|
|
|
|
|
WHERE ID = ".$ID);
|
|
|
|
|
WHERE ID = $ID");
|
|
|
|
|
list($InfoHash) = $DB->next_record(MYSQLI_BOTH, false);
|
|
|
|
|
$DB->query("
|
|
|
|
|
DELETE FROM torrents
|
|
|
|
|
WHERE ID = ".$ID);
|
|
|
|
|
WHERE ID = $ID");
|
|
|
|
|
Tracker::update_tracker('delete_torrent', array('info_hash' => rawurlencode($InfoHash), 'id' => $ID, 'reason' => $OcelotReason));
|
|
|
|
|
|
|
|
|
|
$Cache->decrement('stats_torrent_count');
|
|
|
|
@ -286,7 +286,7 @@ public static function delete_torrent($ID, $GroupID = 0, $OcelotReason = -1) {
|
|
|
|
|
FROM users_notify_torrents
|
|
|
|
|
WHERE TorrentID = '$ID'");
|
|
|
|
|
while (list($UserID) = $DB->next_record()) {
|
|
|
|
|
$Cache->delete_value('notifications_new_'.$UserID);
|
|
|
|
|
$Cache->delete_value("notifications_new_$UserID");
|
|
|
|
|
}
|
|
|
|
|
$DB->query("
|
|
|
|
|
DELETE FROM users_notify_torrents
|
|
|
|
@ -297,7 +297,7 @@ public static function delete_torrent($ID, $GroupID = 0, $OcelotReason = -1) {
|
|
|
|
|
SET
|
|
|
|
|
Status = 'Resolved',
|
|
|
|
|
LastChangeTime = '".sqltime()."',
|
|
|
|
|
ModComment='Report already dealt with (Torrent deleted)'
|
|
|
|
|
ModComment = 'Report already dealt with (torrent deleted)'
|
|
|
|
|
WHERE TorrentID = $ID
|
|
|
|
|
AND Status != 'Resolved'");
|
|
|
|
|
$Reports = $DB->affected_rows();
|
|
|
|
@ -310,31 +310,31 @@ public static function delete_torrent($ID, $GroupID = 0, $OcelotReason = -1) {
|
|
|
|
|
WHERE TorrentID = '$ID'");
|
|
|
|
|
$DB->query("
|
|
|
|
|
DELETE FROM torrents_bad_tags
|
|
|
|
|
WHERE TorrentID = ".$ID);
|
|
|
|
|
WHERE TorrentID = $ID");
|
|
|
|
|
$DB->query("
|
|
|
|
|
DELETE FROM torrents_bad_folders
|
|
|
|
|
WHERE TorrentID = ".$ID);
|
|
|
|
|
WHERE TorrentID = $ID");
|
|
|
|
|
$DB->query("
|
|
|
|
|
DELETE FROM torrents_bad_files
|
|
|
|
|
WHERE TorrentID = ".$ID);
|
|
|
|
|
WHERE TorrentID = $ID");
|
|
|
|
|
$DB->query("
|
|
|
|
|
DELETE FROM torrents_cassette_approved
|
|
|
|
|
WHERE TorrentID = ".$ID);
|
|
|
|
|
WHERE TorrentID = $ID");
|
|
|
|
|
$DB->query("
|
|
|
|
|
DELETE FROM torrents_lossymaster_approved
|
|
|
|
|
WHERE TorrentID = ".$ID);
|
|
|
|
|
WHERE TorrentID = $ID");
|
|
|
|
|
$DB->query("
|
|
|
|
|
DELETE FROM torrents_lossyweb_approved
|
|
|
|
|
WHERE TorrentID = ".$ID);
|
|
|
|
|
WHERE TorrentID = $ID");
|
|
|
|
|
|
|
|
|
|
// Tells Sphinx that the group is removed
|
|
|
|
|
$DB->query("
|
|
|
|
|
REPLACE INTO sphinx_delta (ID, Time)
|
|
|
|
|
VALUES ($ID, UNIX_TIMESTAMP())");
|
|
|
|
|
|
|
|
|
|
$Cache->delete_value('torrent_download_'.$ID);
|
|
|
|
|
$Cache->delete_value('torrent_group_'.$GroupID);
|
|
|
|
|
$Cache->delete_value('torrents_details_'.$GroupID);
|
|
|
|
|
$Cache->delete_value("torrent_download_$ID");
|
|
|
|
|
$Cache->delete_value("torrent_group_$GroupID");
|
|
|
|
|
$Cache->delete_value("torrents_details_$GroupID");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -377,9 +377,9 @@ public static function delete_group($GroupID) {
|
|
|
|
|
WHERE GroupID = '$GroupID'");
|
|
|
|
|
|
|
|
|
|
foreach ($CollageIDs as $CollageID) {
|
|
|
|
|
$Cache->delete_value('collage_'.$CollageID);
|
|
|
|
|
$Cache->delete_value("collage_$CollageID");
|
|
|
|
|
}
|
|
|
|
|
$Cache->delete_value('torrent_collages_'.$GroupID);
|
|
|
|
|
$Cache->delete_value("torrent_collages_$GroupID");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Artists
|
|
|
|
@ -387,7 +387,7 @@ public static function delete_group($GroupID) {
|
|
|
|
|
$DB->query("
|
|
|
|
|
SELECT ArtistID
|
|
|
|
|
FROM torrents_artists
|
|
|
|
|
WHERE GroupID = ".$GroupID);
|
|
|
|
|
WHERE GroupID = $GroupID");
|
|
|
|
|
$Artists = $DB->collect('ArtistID');
|
|
|
|
|
|
|
|
|
|
$DB->query("
|
|
|
|
@ -418,7 +418,7 @@ public static function delete_group($GroupID) {
|
|
|
|
|
Artists::delete_artist($ArtistID);
|
|
|
|
|
} else {
|
|
|
|
|
//Not the only group, still need to clear cache
|
|
|
|
|
$Cache->delete_value('artist_groups_'.$ArtistID);
|
|
|
|
|
$Cache->delete_value("artist_groups_$ArtistID");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -433,24 +433,36 @@ public static function delete_group($GroupID) {
|
|
|
|
|
SET GroupID = NULL
|
|
|
|
|
WHERE GroupID = '$GroupID'");
|
|
|
|
|
foreach ($Requests as $RequestID) {
|
|
|
|
|
$Cache->delete_value('request_'.$RequestID);
|
|
|
|
|
$Cache->delete_value("request_$RequestID");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$DB->query("DELETE FROM torrents_group WHERE ID='$GroupID'");
|
|
|
|
|
$DB->query("DELETE FROM torrents_tags WHERE GroupID='$GroupID'");
|
|
|
|
|
$DB->query("DELETE FROM torrents_tags_votes WHERE GroupID='$GroupID'");
|
|
|
|
|
$DB->query("DELETE FROM torrents_comments WHERE GroupID='$GroupID'");
|
|
|
|
|
$DB->query("DELETE FROM bookmarks_torrents WHERE GroupID='$GroupID'");
|
|
|
|
|
$DB->query("DELETE FROM wiki_torrents WHERE PageID='$GroupID'");
|
|
|
|
|
$DB->query("
|
|
|
|
|
DELETE FROM torrents_group
|
|
|
|
|
WHERE ID = '$GroupID'");
|
|
|
|
|
$DB->query("
|
|
|
|
|
DELETE FROM torrents_tags
|
|
|
|
|
WHERE GroupID = '$GroupID'");
|
|
|
|
|
$DB->query("
|
|
|
|
|
DELETE FROM torrents_tags_votes
|
|
|
|
|
WHERE GroupID = '$GroupID'");
|
|
|
|
|
$DB->query("
|
|
|
|
|
DELETE FROM torrents_comments
|
|
|
|
|
WHERE GroupID = '$GroupID'");
|
|
|
|
|
$DB->query("
|
|
|
|
|
DELETE FROM bookmarks_torrents
|
|
|
|
|
WHERE GroupID = '$GroupID'");
|
|
|
|
|
$DB->query("
|
|
|
|
|
DELETE FROM wiki_torrents
|
|
|
|
|
WHERE PageID = '$GroupID'");
|
|
|
|
|
|
|
|
|
|
$Cache->delete_value('torrents_details_'.$GroupID);
|
|
|
|
|
$Cache->delete_value('torrent_group_'.$GroupID);
|
|
|
|
|
$Cache->delete_value('groups_artists_'.$GroupID);
|
|
|
|
|
$Cache->delete_value("torrents_details_$GroupID");
|
|
|
|
|
$Cache->delete_value("torrent_group_$GroupID");
|
|
|
|
|
$Cache->delete_value("groups_artists_$GroupID");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Update the cache and sphinx delta index to keep everything up to date.
|
|
|
|
|
* Update the cache and sphinx delta index to keep everything up-to-date.
|
|
|
|
|
*
|
|
|
|
|
* @param int $GroupID
|
|
|
|
|
*/
|
|
|
|
@ -524,10 +536,10 @@ public static function update_hash($GroupID) {
|
|
|
|
|
GROUP BY ta.GroupID
|
|
|
|
|
) AS artists
|
|
|
|
|
JOIN torrents USING(GroupID)
|
|
|
|
|
ON DUPLICATE KEY UPDATE ArtistName=values(ArtistName)");
|
|
|
|
|
ON DUPLICATE KEY UPDATE ArtistName = VALUES(ArtistName)");
|
|
|
|
|
*/
|
|
|
|
|
$Cache->delete_value('torrents_details_'.$GroupID);
|
|
|
|
|
$Cache->delete_value('torrent_group_'.$GroupID);
|
|
|
|
|
$Cache->delete_value("torrents_details_$GroupID");
|
|
|
|
|
$Cache->delete_value("torrent_group_$GroupID");
|
|
|
|
|
|
|
|
|
|
$ArtistInfo = Artists::get_artist($GroupID);
|
|
|
|
|
foreach ($ArtistInfo as $Importances => $Importance) {
|
|
|
|
@ -536,7 +548,7 @@ public static function update_hash($GroupID) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$Cache->delete_value('groups_artists_'.$GroupID);
|
|
|
|
|
$Cache->delete_value("groups_artists_$GroupID");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -553,7 +565,7 @@ public static function regenerate_filelist($TorrentID) {
|
|
|
|
|
FROM torrents_files AS tf
|
|
|
|
|
JOIN torrents AS t ON t.ID = tf.TorrentID
|
|
|
|
|
JOIN torrents_group AS tg ON tg.ID = t.GroupID
|
|
|
|
|
WHERE tf.TorrentID = ".$TorrentID);
|
|
|
|
|
WHERE tf.TorrentID = $TorrentID");
|
|
|
|
|
if ($DB->record_count() > 0) {
|
|
|
|
|
list($GroupID, $Contents) = $DB->next_record(MYSQLI_NUM, false);
|
|
|
|
|
if (Misc::is_new_torrent($Contents)) {
|
|
|
|
@ -572,7 +584,7 @@ public static function regenerate_filelist($TorrentID) {
|
|
|
|
|
UPDATE torrents
|
|
|
|
|
SET Size = $TotalSize, FilePath = '".db_string($FilePath)."', FileList = '".db_string($FileString)."'
|
|
|
|
|
WHERE ID = $TorrentID");
|
|
|
|
|
$Cache->delete_value('torrents_details_'.$GroupID);
|
|
|
|
|
$Cache->delete_value("torrents_details_$GroupID");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -643,8 +655,12 @@ public static function filelist_get_file($File) {
|
|
|
|
|
*/
|
|
|
|
|
public static function torrent_info($Data, $ShowMedia = false, $ShowEdition = false) {
|
|
|
|
|
$Info = array();
|
|
|
|
|
if (!empty($Data['Format'])) { $Info[] = $Data['Format']; }
|
|
|
|
|
if (!empty($Data['Encoding'])) { $Info[] = $Data['Encoding']; }
|
|
|
|
|
if (!empty($Data['Format'])) {
|
|
|
|
|
$Info[] = $Data['Format'];
|
|
|
|
|
}
|
|
|
|
|
if (!empty($Data['Encoding'])) {
|
|
|
|
|
$Info[] = $Data['Encoding'];
|
|
|
|
|
}
|
|
|
|
|
if (!empty($Data['HasLog'])) {
|
|
|
|
|
$Str = 'Log';
|
|
|
|
|
if (!empty($Data['LogScore'])) {
|
|
|
|
@ -652,19 +668,39 @@ public static function torrent_info($Data, $ShowMedia = false, $ShowEdition = fa
|
|
|
|
|
}
|
|
|
|
|
$Info[] = $Str;
|
|
|
|
|
}
|
|
|
|
|
if (!empty($Data['HasCue'])) { $Info[] = 'Cue'; }
|
|
|
|
|
if ($ShowMedia && !empty($Data['Media'])) { $Info[] = $Data['Media']; }
|
|
|
|
|
if (!empty($Data['Scene'])) { $Info[] = 'Scene'; }
|
|
|
|
|
if (!empty($Data['HasCue'])) {
|
|
|
|
|
$Info[] = 'Cue';
|
|
|
|
|
}
|
|
|
|
|
if ($ShowMedia && !empty($Data['Media'])) {
|
|
|
|
|
$Info[] = $Data['Media'];
|
|
|
|
|
}
|
|
|
|
|
if (!empty($Data['Scene'])) {
|
|
|
|
|
$Info[] = 'Scene';
|
|
|
|
|
}
|
|
|
|
|
if ($ShowEdition) {
|
|
|
|
|
$EditionInfo = array();
|
|
|
|
|
if (!empty($Data['RemasterYear'])) { $EditionInfo[] = $Data['RemasterYear']; }
|
|
|
|
|
if (!empty($Data['RemasterTitle'])) { $EditionInfo[] = $Data['RemasterTitle']; }
|
|
|
|
|
if (count($EditionInfo)) { $Info[] = implode(' ', $EditionInfo); }
|
|
|
|
|
if (!empty($Data['RemasterYear'])) {
|
|
|
|
|
$EditionInfo[] = $Data['RemasterYear'];
|
|
|
|
|
}
|
|
|
|
|
if (!empty($Data['RemasterTitle'])) {
|
|
|
|
|
$EditionInfo[] = $Data['RemasterTitle'];
|
|
|
|
|
}
|
|
|
|
|
if (count($EditionInfo)) {
|
|
|
|
|
$Info[] = implode(' ', $EditionInfo);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ($Data['IsSnatched']) {
|
|
|
|
|
$Info[] = Format::torrent_label('Snatched!');
|
|
|
|
|
}
|
|
|
|
|
if ($Data['FreeTorrent'] == '1') {
|
|
|
|
|
$Info[] = Format::torrent_label('Freeleech!');
|
|
|
|
|
}
|
|
|
|
|
if ($Data['FreeTorrent'] == '2') {
|
|
|
|
|
$Info[] = Format::torrent_label('Neutral Leech!');
|
|
|
|
|
}
|
|
|
|
|
if ($Data['PersonalFL']) {
|
|
|
|
|
$Info[] = Format::torrent_label('Personal Freeleech!');
|
|
|
|
|
}
|
|
|
|
|
if ($Data['IsSnatched']) { $Info[] = Format::torrent_label('Snatched!'); }
|
|
|
|
|
if ($Data['FreeTorrent'] == '1') { $Info[] = Format::torrent_label('Freeleech!'); }
|
|
|
|
|
if ($Data['FreeTorrent'] == '2') { $Info[] = Format::torrent_label('Neutral Leech!'); }
|
|
|
|
|
if ($Data['PersonalFL']) { $Info[] = Format::torrent_label('Personal Freeleech!'); }
|
|
|
|
|
return implode(' / ', $Info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -672,7 +708,7 @@ public static function torrent_info($Data, $ShowMedia = false, $ShowEdition = fa
|
|
|
|
|
/**
|
|
|
|
|
* Will freeleech / neutral leech / normalise a set of torrents
|
|
|
|
|
*
|
|
|
|
|
* @param array $TorrentIDs An array of torrents IDs to iterate over
|
|
|
|
|
* @param array $TorrentIDs An array of torrent IDs to iterate over
|
|
|
|
|
* @param int $FreeNeutral 0 = normal, 1 = fl, 2 = nl
|
|
|
|
|
* @param int $FreeLeechType 0 = Unknown, 1 = Staff picks, 2 = Perma-FL (Toolbox, etc.), 3 = Vanity House
|
|
|
|
|
*/
|
|
|
|
@ -691,14 +727,15 @@ public static function freeleech_torrents($TorrentIDs, $FreeNeutral = 1, $FreeLe
|
|
|
|
|
$DB->query('
|
|
|
|
|
SELECT ID, GroupID, info_hash
|
|
|
|
|
FROM torrents
|
|
|
|
|
WHERE ID IN ('.implode(', ', $TorrentIDs).') ORDER BY GroupID ASC');
|
|
|
|
|
WHERE ID IN ('.implode(', ', $TorrentIDs).')
|
|
|
|
|
ORDER BY GroupID ASC');
|
|
|
|
|
$Torrents = $DB->to_array(false, MYSQLI_NUM, false);
|
|
|
|
|
$GroupIDs = $DB->collect('GroupID');
|
|
|
|
|
|
|
|
|
|
foreach ($Torrents as $Torrent) {
|
|
|
|
|
list($TorrentID, $GroupID, $InfoHash) = $Torrent;
|
|
|
|
|
Tracker::update_tracker('update_torrent', array('info_hash' => rawurlencode($InfoHash), 'freetorrent' => $FreeNeutral));
|
|
|
|
|
$Cache->delete_value('torrent_download_'.$TorrentID);
|
|
|
|
|
$Cache->delete_value("torrent_download_$TorrentID");
|
|
|
|
|
Misc::write_log($LoggedUser['Username']." marked torrent $TorrentID freeleech type $FreeLeechType!");
|
|
|
|
|
Torrents::write_group_log($GroupID, $TorrentID, $LoggedUser['ID'], "marked as freeleech type $FreeLeechType!", 0);
|
|
|
|
|
}
|
|
|
|
@ -749,7 +786,7 @@ public static function has_token($TorrentID) {
|
|
|
|
|
static $TokenTorrents;
|
|
|
|
|
$UserID = $LoggedUser['ID'];
|
|
|
|
|
if (!isset($TokenTorrents)) {
|
|
|
|
|
$TokenTorrents = $Cache->get_value('users_tokens_'.$UserID);
|
|
|
|
|
$TokenTorrents = $Cache->get_value("users_tokens_$UserID");
|
|
|
|
|
if ($TokenTorrents === false) {
|
|
|
|
|
$DB->query("
|
|
|
|
|
SELECT TorrentID
|
|
|
|
@ -757,7 +794,7 @@ public static function has_token($TorrentID) {
|
|
|
|
|
WHERE UserID = $UserID
|
|
|
|
|
AND Expired = 0");
|
|
|
|
|
$TokenTorrents = array_fill_keys($DB->collect('TorrentID', false), true);
|
|
|
|
|
$Cache->cache_value('users_tokens_'.$UserID, $TokenTorrents);
|
|
|
|
|
$Cache->cache_value("users_tokens_$UserID", $TokenTorrents);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return isset($TokenTorrents[$TorrentID]);
|
|
|
|
@ -797,7 +834,7 @@ public static function has_snatched($TorrentID, $AllUsers = false) {
|
|
|
|
|
|
|
|
|
|
if (empty($SnatchedTorrents)) {
|
|
|
|
|
$SnatchedTorrents = array_fill(0, $Buckets, false);
|
|
|
|
|
$LastUpdate = $Cache->get_value('users_snatched_'.$UserID.'_lastupdate') ?: 0;
|
|
|
|
|
$LastUpdate = $Cache->get_value("users_snatched_{$UserID}_lastupdate") ?: 0;
|
|
|
|
|
} elseif (isset($SnatchedTorrents[$BucketID][$TorrentID])) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
@ -807,7 +844,7 @@ public static function has_snatched($TorrentID, $AllUsers = false) {
|
|
|
|
|
if ($CurSnatchedTorrents === false) {
|
|
|
|
|
$CurTime = time();
|
|
|
|
|
// This bucket hasn't been checked before
|
|
|
|
|
$CurSnatchedTorrents = $Cache->get_value('users_snatched_'.$UserID.'_'.$BucketID, true);
|
|
|
|
|
$CurSnatchedTorrents = $Cache->get_value("users_snatched_{$UserID}_$BucketID", true);
|
|
|
|
|
if ($CurSnatchedTorrents === false || $CurTime - $LastUpdate > 1800) {
|
|
|
|
|
$Updated = array();
|
|
|
|
|
if ($CurSnatchedTorrents === false || $LastUpdate == 0) {
|
|
|
|
@ -836,7 +873,7 @@ public static function has_snatched($TorrentID, $AllUsers = false) {
|
|
|
|
|
while (list($ID) = $DB->next_record(MYSQLI_NUM, false)) {
|
|
|
|
|
$CurBucketID = $ID & $LastBucket;
|
|
|
|
|
if ($SnatchedTorrents[$CurBucketID] === false) {
|
|
|
|
|
$SnatchedTorrents[$CurBucketID] = $Cache->get_value('users_snatched_'.$UserID.'_'.$CurBucketID, true);
|
|
|
|
|
$SnatchedTorrents[$CurBucketID] = $Cache->get_value("users_snatched_{$UserID}_$CurBucketID", true);
|
|
|
|
|
if ($SnatchedTorrents[$CurBucketID] === false) {
|
|
|
|
|
$SnatchedTorrents[$CurBucketID] = array();
|
|
|
|
|
}
|
|
|
|
@ -847,10 +884,10 @@ public static function has_snatched($TorrentID, $AllUsers = false) {
|
|
|
|
|
}
|
|
|
|
|
for ($i = 0; $i < $Buckets; $i++) {
|
|
|
|
|
if ($Updated[$i]) {
|
|
|
|
|
$Cache->cache_value('users_snatched_'.$UserID.'_'.$i, $SnatchedTorrents[$i], 0);
|
|
|
|
|
$Cache->cache_value("users_snatched_{$UserID}_$i", $SnatchedTorrents[$i], 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$Cache->cache_value('users_snatched_'.$UserID.'_lastupdate', $CurTime, 0);
|
|
|
|
|
$Cache->cache_value("users_snatched_{$UserID}_lastupdate", $CurTime, 0);
|
|
|
|
|
$LastUpdate = $CurTime;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -876,9 +913,9 @@ public static function edition_string(array $Torrent, array $Group) {
|
|
|
|
|
}
|
|
|
|
|
$EditionName .= $AddExtra . display_str($Torrent['Media']);
|
|
|
|
|
} else {
|
|
|
|
|
$AddExtra = " / ";
|
|
|
|
|
$AddExtra = ' / ';
|
|
|
|
|
if (!$Torrent['Remastered']) {
|
|
|
|
|
$EditionName = "Original Release";
|
|
|
|
|
$EditionName = 'Original Release';
|
|
|
|
|
if ($Group['RecordLabel']) {
|
|
|
|
|
$EditionName .= $AddExtra . $Group['RecordLabel'];
|
|
|
|
|
$AddExtra = ' / ';
|
|
|
|
|