Empty commit

This commit is contained in:
Git 2012-12-06 08:00:17 +00:00
parent f389c97a45
commit a129446869
19 changed files with 208 additions and 128 deletions

View File

@ -27,11 +27,19 @@ class Torrents {
* Seeders, Snatched, Time, HasFile, PersonalFL, IsSnatched
* }
* }
* Artists => {
* {
* id, name, aliasid // Only main artists
* }
* }
* ExtendedArtists => {
* [1-6] => { // See documentation on Artists::get_artists
* id, name, aliasid
* }
* }
* Flags => {
* IsSnatched
* }
*/
public static function get_groups($GroupIDs, $Return = true, $GetArtists = true, $Torrents = true) {
global $DB, $Cache, $Debug;
@ -128,8 +136,11 @@ public static function get_groups($GroupIDs, $Return = true, $GetArtists = true,
}
// Fetch all user specific torrent properties
foreach ($Found as &$Group) {
$Group['Flags'] = array('IsSnatched' => false);
if (!empty($Group['Torrents'])) {
array_walk($Group['Torrents'], 'self::torrent_properties');
foreach ($Group['Torrents'] as &$Torrent) {
self::torrent_properties($Torrent, $Group['Flags']);
}
}
}
@ -146,9 +157,11 @@ public static function get_groups($GroupIDs, $Return = true, $GetArtists = true,
* @param array $Torrent torrent array preferably in the form used by Torrents::get_groups() or get_group_info()
* @param int $TorrentID
*/
public static function torrent_properties(&$Torrent, $TorrentID) {
$Torrent['PersonalFL'] = empty($Torrent['FreeTorrent']) && self::has_token($TorrentID);
$Torrent['IsSnatched'] = self::has_snatched($TorrentID);
public static function torrent_properties(&$Torrent, &$Flags) {
$Torrent['PersonalFL'] = empty($Torrent['FreeTorrent']) && self::has_token($Torrent['ID']);
if ($Torrent['IsSnatched'] = self::has_snatched($Torrent['ID'])) {
$Flags['IsSnatched'] = true;
}
}

View File

@ -304,13 +304,18 @@
$Alerts[] = '<a href="userhistory.php?action=subscribed_collages">'.'You have '.$NewCollages.(($NewCollages > 1) ? ' new collage updates' : ' new collage update').'</a>';
}
}
if (check_perms('users_mod')) {
if(check_perms('users_mod')) {
$ModBar[] = '<a href="tools.php">'.'Toolbox'.'</a>';
}
if (check_perms('users_mod') || $LoggedUser['PermissionID'] == FORUM_MOD) {
$NumStaffPMs = $Cache->get_value('num_staff_pms_'.$LoggedUser['ID']);
if ($NumStaffPMs === false) {
$DB->query("SELECT COUNT(ID) FROM staff_pm_conversations WHERE Status='Unanswered' AND (AssignedToUser=".$LoggedUser['ID']." OR (Level >= ".max(700,$Classes[MOD]['Level'])." AND Level <=".$LoggedUser['Class']."))");
if(check_perms('users_mod')) {
$DB->query("SELECT COUNT(ID) FROM staff_pm_conversations WHERE Status='Unanswered' AND (AssignedToUser=".$LoggedUser['ID']." OR (Level >= ".max(700,$Classes[MOD]['Level'])." AND Level <=".$LoggedUser['Class']."))");
}
if($LoggedUser['PermissionID'] == FORUM_MOD) {
$DB->query("SELECT COUNT(ID) FROM staff_pm_conversations WHERE Status='Unanswered' AND (AssignedToUser=".$LoggedUser['ID']." OR Level = '". $Classes[FORUM_MOD]['Level'] . "')");
}
list($NumStaffPMs) = $DB->next_record();
$Cache->cache_value('num_staff_pms_'.$LoggedUser['ID'], $NumStaffPMs , 1000);
}

View File

@ -286,7 +286,7 @@ function compare($X, $Y){
$LastReleaseType = 0;
foreach ($Importances as $Group) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists, $ExtendedArtists) = array_values($TorrentList[$Group['GroupID']]);
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists, $ExtendedArtists, $GroupFlags) = array_values($TorrentList[$Group['GroupID']]);
$ReleaseType = $Group['ReleaseType'];
$GroupVanityHouse = $Group['VanityHouse'];
@ -392,8 +392,9 @@ function compare($X, $Y){
if($GroupVanityHouse) { $DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]'; }
$SnatchedGroupClass = $GroupFlags['IsSnatched'] ? ' snatched_group' : '';
?>
<tr class="releases_<?=$ReleaseType?> group discog<?=$HideDiscog?>">
<tr class="releases_<?=$ReleaseType?> group discog<?=$SnatchedGroupClass . $HideDiscog?>">
<td class="center">
<div title="View" id="showimg_<?=$GroupID?>" class="<?=($ShowGroups ? 'hide' : 'show')?>_torrents">
<a href="#" class="show_torrents_link" onclick="toggle_group(<?=$GroupID?>, this, event)" title="Collapse this group. Hold &quot;Ctrl&quot; while clicking to collapse all groups in this release type."></a>
@ -418,6 +419,7 @@ function compare($X, $Y){
if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
$FirstUnknown = !isset($FirstUnknown);
}
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : '';
if($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
$Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $FirstUnknown || $Torrent['Media'] != $LastMedia) {
@ -433,7 +435,7 @@ function compare($X, $Y){
$RemasterName .= $AddExtra.display_str($Torrent['Media']);
?>
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition group_torrent discog<?=$HideDiscog.$HideTorrents?>">
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition group_torrent discog<?=$SnatchedGroupClass . $HideDiscog . $HideTorrents?>">
<td colspan="6" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" title="Collapse this edition. Hold &quot;Ctrl&quot; while clicking to collapse all editions in this torrent group.">&minus;</a> <?=$RemasterName?></strong></td>
</tr>
<?
@ -448,7 +450,7 @@ function compare($X, $Y){
}
$MasterName .= $AddExtra.display_str($Torrent['Media']);
?>
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition group_torrent<?=$HideDiscog.$HideTorrents?>">
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition group_torrent<?=$SnatchedGroupClass . $HideDiscog . $HideTorrents?>">
<td colspan="6" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" title="Collapse this edition. Hold &quot;Ctrl&quot; while clicking to collapse all editions in this torrent group.">&minus;</a> <?=$MasterName?></strong></td>
</tr>
<?
@ -460,7 +462,7 @@ function compare($X, $Y){
$LastRemasterCatalogueNumber = $Torrent['RemasterCatalogueNumber'];
$LastMedia = $Torrent['Media'];
?>
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition_<?=$EditionID?> group_torrent discog<?=$HideDiscog . $HideTorrents . ($Torrent['IsSnatched'] ? ' snatched_torrent' : '')?>">
<tr class="releases_<?=$ReleaseType?> torrent_row groupid_<?=$GroupID?> edition_<?=$EditionID?> group_torrent discog<?=$SnatchedTorrentClass . $SnatchedGroupClass . $HideDiscog . $HideTorrents?>">
<td colspan="2">
<span>
[ <a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download"><?=$Torrent['HasFile'] ? 'DL' : 'Missing'?></a>

View File

@ -27,9 +27,9 @@
?>
<div class="header">
<? if($All) { ?>
<h2>All torrents trumpable for bad file names</h2>
<h2>All torrents trumpable for bad file names</h2>
<? } else { ?>
<h2>Torrents trumpable for bad file names, that you've snatched</h2>
<h2>Torrents trumpable for bad file names, that you've snatched</h2>
<? } ?>
<div class="linkbox">
@ -44,12 +44,14 @@
<h3>There are <?=count($TorrentsInfo)?> torrents remaining</h3>
<table class="torrent_table">
<?
foreach($TorrentsInfo as $TorrentID => $Info) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TorrentTags, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Results[$Info['GroupID']]);
$DisplayName = '';
if(count($Artists)>0) {
$DisplayName = Artists::display_artists(array('1'=>$Artists));
foreach ($TorrentsInfo as $TorrentID => $Info) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TorrentTags, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists, $ExtendedArtists, $GroupFlags) = array_values($Results[$Info['GroupID']]);
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) {
unset($ExtendedArtists[2]);
unset($ExtendedArtists[3]);
$DisplayName = Artists::display_artists($ExtendedArtists);
} else {
$DisplayName = '';
}
$DisplayName.='<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
@ -72,16 +74,19 @@
$TorrentTags='<br /><div class="tags">'.$TagList.'</div>';
}
?>
<tr><td><?=$DisplayName?>
[ <a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a> ]
<? if(check_perms('admin_reports')) { ?>
<a href="better.php?method=files&amp;remove=<?=$TorrentID?>">[X]</a>
<? } ?>
<?=$TorrentTags?>
</td></tr>
<?
}
?>
<tr class="torrent torrent_row<?=$GroupFlags['IsSnatched'] ? ' snatched_torrent"' : ''?>">
<td>
<span class="torrent_links_block">
[ <a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a> ]
</span>
<?=$DisplayName?>
<? if (check_perms('admin_reports')) { ?>
<a href="better.php?method=files&amp;remove=<?=$TorrentID?>">[X]</a>
<? } ?>
<?=$TorrentTags?>
</td>
</tr>
<? } ?>
</table>
</div>
<?

View File

@ -40,23 +40,23 @@
<? } ?>
</div>
</div>
<div class="thin box pad">
<h3>There are <?=count($TorrentsInfo)?> torrents remaining</h3>
<table class="torrent_table">
<?
foreach($TorrentsInfo as $TorrentID => $Info) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TorrentTags, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Results[$Info['GroupID']]);
$DisplayName = '';
if(count($Artists)>0) {
$DisplayName = Artists::display_artists(array('1'=>$Artists));
foreach ($TorrentsInfo as $TorrentID => $Info) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TorrentTags, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists, $ExtendedArtists, $GroupFlags) = array_values($Results[$Info['GroupID']]);
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) {
unset($ExtendedArtists[2]);
unset($ExtendedArtists[3]);
$DisplayName = Artists::display_artists($ExtendedArtists);
} else {
$DisplayName = '';
}
$DisplayName.='<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
if($GroupYear>0) {
$DisplayName.=" [".$GroupYear."]";
}
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
if($ReleaseType>0) { $DisplayName.=" [".$ReleaseTypes[$ReleaseType]."]"; }
$ExtraInfo = Torrents::torrent_info($Torrents[$TorrentID]);
if($ExtraInfo) {
$DisplayName.=' - '.$ExtraInfo;
@ -74,16 +74,19 @@
$TorrentTags='<br /><div class="tags">'.$TagList.'</div>';
}
?>
<tr><td><?=$DisplayName?>
[ <a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a> ]
<? if(check_perms('admin_reports')) { ?>
<a href="better.php?method=folders&amp;remove=<?=$TorrentID?>">[X]</a>
<tr class="torrent torrent_row<?=$Torrents[$TorrentID]['IsSnatched'] ? ' snatched_torrent"' : ''?>">
<td>
<span class="torrent_links_block">
[ <a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a> ]
</span>
<?=$DisplayName?>
<? if (check_perms('admin_reports')) { ?>
<a href="better.php?method=folders&amp;remove=<?=$TorrentID?>">[X]</a>
<? } ?>
<?=$TorrentTags?>
</td></tr>
<?
}
?>
<?=$TorrentTags?>
</td>
</tr>
<? } ?>
</table>
</div>
<?

View File

@ -25,17 +25,25 @@
<?
$Results = $Results['matches'];
foreach ($Results as $GroupID=>$Group) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TorrentTags, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Group);
$FlacID = $GroupIDs[$GroupID]['TorrentID'];
$DisplayName = '';
if(count($Artists)>0) {
$DisplayName = Artists::display_artists(array('1'=>$Artists));
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TorrentTags, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists, $ExtendedArtists, $GroupFlags) = array_values($Group);
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) {
unset($ExtendedArtists[2]);
unset($ExtendedArtists[3]);
$DisplayName = Artists::display_artists($ExtendedArtists);
} else {
$DisplayName = '';
}
$FlacID = $GroupIDs[$GroupID]['TorrentID'];
$DisplayName.='<a href="torrents.php?id='.$GroupID.'&amp;torrentid='.$FlacID.'" title="View Torrent">'.$GroupName.'</a>';
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
if($ReleaseType>0) { $DisplayName.=" [".$ReleaseTypes[$ReleaseType]."]"; }
$ExtraInfo = Torrents::torrent_info($Torrents[$FlacID]);
if($ExtraInfo) {
$DisplayName.=' - '.$ExtraInfo;
}
$TagList=array();
if($TorrentTags!='') {
$TorrentTags=explode(' ',$TorrentTags);
@ -48,10 +56,12 @@
$TorrentTags='<br /><div class="tags">'.$TagList.'</div>';
}
?>
<tr>
<tr class="torrent torrent_row<?=$Torrents[$FlacID]['IsSnatched'] ? ' snatched_torrent"' : ''?>">
<td>
<?=$DisplayName?>
[ <a href="torrents.php?action=download&amp;id=<?=$FlacID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a> ]
<span class="torrent_links_block">
[ <a href="torrents.php?action=download&amp;id=<?=$FlacID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a> ]
</span>
<?=$DisplayName?>
<?=$TorrentTags?>
</td>
</tr>

View File

@ -77,6 +77,7 @@
$TorRemIdent => array(
'FlacID' => 0,
'Formats' => array(),
'IsSnatched' => $Torrent['IsSnatched'],
'Medium' => $Torrent['Media'],
'RemasterTitle' => $Torrent['RemasterTitle'],
'RemasterYear' => $Torrent['RemasterYear'],
@ -88,6 +89,7 @@
$TorrentGroups[$Group['ID']][$TorRemIdent] = array(
'FlacID' => 0,
'Formats' => array(),
'IsSnatched' => $Torrent['IsSnatched'],
'Medium' => $Torrent['Media'],
'RemasterTitle' => $Torrent['RemasterTitle'],
'RemasterYear' => $Torrent['RemasterYear'],
@ -178,7 +180,7 @@
}
$ExtraInfo .= implode(' / ', $EditionInfo);
?>
<tr<?=$Edition['IsSnatched'] ? ' class="snatched_torrent"' : ''?>>
<tr class="torrent torrent_row<?=$Edition['IsSnatched'] ? ' snatched_torrent' : ''?>">
<td>
<span class="torrent_links_block">
[ <a href="torrents.php?action=download&amp;id=<?=$Edition['FlacID']?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">DL</a> ]

View File

@ -46,16 +46,18 @@
<table class="torrent_table">
<?
foreach($TorrentsInfo as $TorrentID => $Info) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TorrentTags, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Results[$Info['GroupID']]);
$DisplayName = '';
if(count($Artists)>0) {
$DisplayName = Artists::display_artists(array('1'=>$Artists));
}
$DisplayName.='<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
if($GroupYear>0) {
$DisplayName.=" [".$GroupYear."]";
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TorrentTags, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists, $ExtendedArtists, $GroupFlags) = array_values($Results[$Info['GroupID']]);
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) {
unset($ExtendedArtists[2]);
unset($ExtendedArtists[3]);
$DisplayName = Artists::display_artists($ExtendedArtists);
} else {
$DisplayName = '';
}
$DisplayName.='<a href="torrents.php?id='.$GroupID.'&amp;torrentid='.$TorrentID.'#torrent'.$TorrentID.'" title="View Torrent">'.$GroupName.'</a>';
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
if($ReleaseType>0) { $DisplayName.=" [".$ReleaseTypes[$ReleaseType]."]"; }
$ExtraInfo = Torrents::torrent_info($Torrents[$TorrentID]);
if($ExtraInfo) {
$DisplayName.=' - '.$ExtraInfo;
@ -73,13 +75,18 @@
$TorrentTags='<br /><div class="tags">'.$TagList.'</div>';
}
?>
<tr><td><?=$DisplayName?>
[ <a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a> ]
<tr class="torrent torrent_row<?=$Torrents[$TorrentID]['IsSnatched'] ? ' snatched_torrent' : ''?>">
<td>
<span class="torrent_links_block">
[ <a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a> ]
</span>
<?=$DisplayName?>
<? if(check_perms('admin_reports')) { ?>
<a href="better.php?method=tags&amp;remove=<?=$TorrentID?>">[X]</a>
<a href="better.php?method=tags&amp;remove=<?=$TorrentID?>">[X]</a>
<? } ?>
<?=$TorrentTags?>
</td></tr>
<?=$TorrentTags?>
</td>
</tr>
<?
}
?>

View File

@ -58,16 +58,28 @@
<?
$Results = $Results['matches'];
foreach ($Results as $GroupID=>$Group) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TorrentTags, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Group);
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TorrentTags, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists, $ExtendedArtists, $GroupFlags) = array_values($Group);
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) {
unset($ExtendedArtists[2]);
unset($ExtendedArtists[3]);
$DisplayName = Artists::display_artists($ExtendedArtists);
} else {
$DisplayName = '';
}
$FlacID = $Uploads[$GroupID]['ID'];
$DisplayName = '';
if(count($Artists)>0) {
$DisplayName = Artists::display_artists(array('1'=>$Artists));
}
$DisplayName.='<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
$DisplayName.='<a href="torrents.php?id='.$GroupID.'&amp;torrentid='.$FlacID.'#torrent'.$FlacID.'" title="View Torrent">'.$GroupName.'</a>';
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
if($ReleaseType>0) { $DisplayName.=" [".$ReleaseTypes[$ReleaseType]."]"; }
$ExtraInfo = Torrents::torrent_info($Torrents[$FlacID]);
if($ExtraInfo) {
$DisplayName.=' - '.$ExtraInfo;
}
$MissingEncodings = array('V0 (VBR)'=>1, 'V2 (VBR)'=>1, '320'=>1);
@ -89,10 +101,12 @@
$TorrentTags='<br /><div class="tags">'.$TagList.'</div>';
}
?>
<tr>
<tr<?=$Torrents[$FlacID]['IsSnatched'] ? ' class="snatched_torrent"' : ''?>>
<td>
<span class="torrent_links_block">
[ <a href="torrents.php?action=download&amp;id=<?=$FlacID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a> ]
</span>
<?=$DisplayName?>
[ <a href="torrents.php?action=download&amp;id=<?=$FlacID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>">DL</a> ]
<?=$TorrentTags?>
</td>
<td><strong><?=($MissingEncodings['V2 (VBR)'] == 0)?'<span style="color: green;">YES</span>':'<span style="color: red;">NO</span>'?></strong></td>

View File

@ -37,7 +37,7 @@ function compare($X, $Y){
$Tags = array();
foreach ($TorrentList as $GroupID=>$Group) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $GroupArtists, $ExtendedArtists) = array_values($Group);
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $GroupArtists, $ExtendedArtists, $GroupFlags) = array_values($Group);
list($GroupID2, $Sort, $Image, $GroupCategoryID, $AddedTime) = array_values($CollageDataList[$GroupID]);
// Handle stats and stuff
@ -80,6 +80,7 @@ function compare($X, $Y){
$DisplayName .= '<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
if($GroupYear>0) { $DisplayName = $DisplayName. ' ['. $GroupYear .']';}
if($GroupVanityHouse) { $DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]'; }
$SnatchedGroupClass = $GroupFlags['IsSnatched'] ? ' snatched_group' : '';
// Start an output buffer, so we can store this output in $TorrentTable
ob_start();
@ -87,7 +88,7 @@ function compare($X, $Y){
// Grouped torrents
$ShowGroups = !(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1);
?>
<tr class="group discog" id="group_<?=$GroupID?>">
<tr class="group discog<?=$SnatchedGroupClass?>" id="group_<?=$GroupID?>">
<td class="center">
<div title="View" id="showimg_<?=$GroupID?>" class="<?=($ShowGroups ? 'hide' : 'show')?>_torrents">
<a href="#" class="show_torrents_link" onclick="toggle_group(<?=$GroupID?>, this, event)" title="Collapse this group. Hold &quot;Ctrl&quot; while clicking to collape all groups on this page."></a>
@ -123,6 +124,7 @@ function compare($X, $Y){
if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
$FirstUnknown = !isset($FirstUnknown);
}
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : '';
if($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
$Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $FirstUnknown || $Torrent['Media'] != $LastMedia) {
@ -138,7 +140,7 @@ function compare($X, $Y){
$RemasterName .= $AddExtra.display_str($Torrent['Media']);
?>
<tr class="group_torrent groupid_<?=$GroupID?> edition<? if(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping']==1) { echo ' hidden'; } ?>">
<tr class="group_torrent groupid_<?=$GroupID?> edition<?=$SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '')?>">
<td colspan="7" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" title="Collapse this edition. Hold &quot;Ctrl&quot; while clicking to collapse all editions in this torrent group.">&minus;</a> <?=$RemasterName?></strong></td>
</tr>
<?
@ -153,7 +155,7 @@ function compare($X, $Y){
}
$MasterName .= $AddExtra.display_str($Torrent['Media']);
?>
<tr class="group_torrent groupid_<?=$GroupID?> edition<? if (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping']==1) { echo ' hidden'; }?>">
<tr class="group_torrent groupid_<?=$GroupID?> edition<?=$SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '')?>">
<td colspan="7" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" title="Collapse this edition. Hold &quot;Ctrl&quot; while clicking to collapse all editions in this torrent group.">&minus;</a> <?=$MasterName?></strong></td>
</tr>
<?
@ -165,7 +167,7 @@ function compare($X, $Y){
$LastRemasterCatalogueNumber = $Torrent['RemasterCatalogueNumber'];
$LastMedia = $Torrent['Media'];
?>
<tr class="group_torrent groupid_<?=$GroupID?> edition_<?=$EditionID?><?=(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '') . ($Torrent['IsSnatched'] ? ' snatched_torrent' : '')?>">
<tr class="group_torrent torrent_row groupid_<?=$GroupID?> edition_<?=$EditionID?><?=$SnatchedTorrentClass . $SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '')?>">
<td colspan="3">
<span>[ <a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">DL</a>
<? if (Torrents::can_use_token($Torrent)) { ?>
@ -197,10 +199,11 @@ function compare($X, $Y){
} elseif ($Torrent['FreeTorrent'] == '2') {
$DisplayName .= ' <strong class="neutral_leech_torrent_label">Neutral Leech!</strong>';
} elseif ($Torrent['PersonalFL']) {
$DisplayName .= '<strong class="personal_freeleech_torrent_label">Personal Freeleech!</strong>';
$DisplayName .= ' <strong class="personal_freeleech_torrent_label">Personal Freeleech!</strong>';
}
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : '';
?>
<tr class="torrent" id="group_<?=$GroupID?>">
<tr class="torrent torrent_row<?=$SnatchedTorrentClass . $SnatchedGroupClass?>" id="group_<?=$GroupID?>">
<td></td>
<td class="center">
<div title="<?=ucfirst(str_replace('_',' ',$PrimaryTag))?>" class="cats_<?=strtolower(str_replace(array('-',' '),array('',''),$Categories[$GroupCategoryID-1]))?> tags_<?=str_replace('.','_',$PrimaryTag)?>">

View File

@ -101,7 +101,7 @@ function compare($X, $Y){
$Number = 0;
foreach ($TorrentList as $GroupID=>$Group) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $GroupArtists, $ExtendedArtists) = array_values($Group);
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $GroupArtists, $ExtendedArtists, $GroupFlags) = array_values($Group);
list($GroupID2, $Image, $GroupCategoryID, $UserID, $Username) = array_values($CollageDataList[$GroupID]);
// Handle stats and stuff
@ -163,6 +163,7 @@ function compare($X, $Y){
$DisplayName .= '<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
if($GroupYear>0) { $DisplayName = $DisplayName. ' ['. $GroupYear .']';}
if($GroupVanityHouse) { $DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]'; }
$SnatchedGroupClass = $GroupFlags['IsSnatched'] ? ' snatched_group' : '';
// Start an output buffer, so we can store this output in $TorrentTable
ob_start();
@ -170,7 +171,7 @@ function compare($X, $Y){
// Grouped torrents
$ShowGroups = !(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1);
?>
<tr class="group discog" id="group_<?=$GroupID?>">
<tr class="group discog<?=$SnatchedGroupClass?>" id="group_<?=$GroupID?>">
<td class="center">
<div title="View" id="showimg_<?=$GroupID?>" class="<?=($ShowGroups ? 'hide' : 'show')?>_torrents">
<a href="#" class="show_torrents_link" onclick="toggle_group(<?=$GroupID?>, this, event)" title="Collapse this group"></a>
@ -199,6 +200,7 @@ function compare($X, $Y){
if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
$FirstUnknown = !isset($FirstUnknown);
}
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : '';
if($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
$Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $FirstUnknown || $Torrent['Media'] != $LastMedia) {
@ -212,7 +214,7 @@ function compare($X, $Y){
$RemasterName .= $AddExtra.display_str($Torrent['Media']);
?>
<tr class="group_torrent groupid_<?=$GroupID?> edition<? if(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping']==1) { echo ' hidden'; } ?>">
<tr class="group_torrent groupid_<?=$GroupID?> edition<?=$SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '')?>">
<td colspan="7" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" title="Collapse this edition. Hold &quot;Ctrl&quot; while clicking to collapse all editions in this torrent group.">&minus;</a> <?=$RemasterName?></strong></td>
</tr>
<?
@ -227,7 +229,7 @@ function compare($X, $Y){
}
$MasterName .= $AddExtra.display_str($Torrent['Media']);
?>
<tr class="group_torrent groupid_<?=$GroupID?> edition<? if (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping']==1) { echo ' hidden'; }?>">
<tr class="group_torrent groupid_<?=$GroupID?> edition<?=$SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '')?>">
<td colspan="7" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" title="Collapse this edition. Hold &quot;Ctrl&quot; while clicking to collapse all editions in this torrent group.">&minus;</a> <?=$MasterName?></strong></td>
</tr>
<?
@ -239,7 +241,7 @@ function compare($X, $Y){
$LastRemasterCatalogueNumber = $Torrent['RemasterCatalogueNumber'];
$LastMedia = $Torrent['Media'];
?>
<tr class="group_torrent groupid_<?=$GroupID?> edition_<?=$EditionID?><?=(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '') . ($Torrent['IsSnatched'] ? ' snatched_torrent' : '')?>">
<tr class="group_torrent torrent_row groupid_<?=$GroupID?> edition_<?=$EditionID?><?=$SnatchedTorrentClass . $SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '')?>">
<td colspan="3">
<span>
[ <a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">DL</a>
@ -272,10 +274,11 @@ function compare($X, $Y){
} elseif ($Torrent['FreeTorrent'] == '2') {
$DisplayName .= ' <strong class="neutral_leech_torrent_label">Neutral Leech!</strong>';
} elseif ($Torrent['PersonalFL']) {
$DisplayName .= '<strong class="personal_freeleech_torrent_label">Personal Freeleech!</strong>';
$DisplayName .= ' <strong class="personal_freeleech_torrent_label">Personal Freeleech!</strong>';
}
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : '';
?>
<tr class="torrent<?=$IsSnatched ? ' snatched_torrent' : ''?>" id="group_<?=$GroupID?>">
<tr class="torrent torrent_row<?=$SnatchedTorrentClass . $SnatchedGroupClass?>" id="group_<?=$GroupID?>">
<td></td>
<td class="center">
<div title="<?=ucfirst(str_replace('_',' ',$PrimaryTag))?>" class="cats_<?=strtolower(str_replace(array('-',' '),array('',''),$Categories[$GroupCategoryID-1]))?> tags_<?=str_replace('.','_',$PrimaryTag)?>">

View File

@ -316,7 +316,6 @@
include('data/special_users.php');
break;
case 'browser_support':
include('data/browser_support.php');
break;

View File

@ -166,7 +166,7 @@
foreach ($TopVotes as $GroupID=>$Group) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel,
$GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse,
$Torrents, $GroupArtists, $ExtendedArtists, $GroupCategoryID,$Ups,$Total,$Score) = array_values($Group);
$Torrents, $GroupArtists, $ExtendedArtists, $GroupFlags, $GroupCategoryID,$Ups,$Total,$Score) = array_values($Group);
$IsBookmarked = in_array($GroupID, $Bookmarks);
@ -200,9 +200,16 @@
ob_start();
if(count($Torrents)>1 || $GroupCategoryID==1) {
// Grouped torrents
// Grouped torrents
$GroupSnatched = false;
foreach ($Torrents as &$Torrent) {
if (($Torrent['IsSnatched'] = Torrents::has_snatched($Torrent['ID'])) && !$GroupSnatched) {
$GroupSnatched = true;
}
}
$SnatchedGroupClass = $GroupSnatched ? ' snatched_group' : '';
?>
<tr class="group discog" id="group_<?=$GroupID?>">
<tr class="group discog<?=$SnatchedGroupClass?>" id="group_<?=$GroupID?>">
<td class="center">
<div title="View" id="showimg_<?=$GroupID?>" class="show_torrents">
<a href="#" class="show_torrents_link" onclick="toggle_group(<?=$GroupID?>, this, event)" title="Collapse this group"></a>
@ -233,11 +240,10 @@
unset($FirstUnknown);
foreach ($Torrents as $TorrentID => $Torrent) {
$Torrent['IsSnatched'] = Torrents::has_snatched($TorrentID);
if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
$FirstUnknown = !isset($FirstUnknown);
}
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : '';
if($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
$Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $FirstUnknown || $Torrent['Media'] != $LastMedia) {
@ -251,7 +257,7 @@
$RemasterName .= $AddExtra.display_str($Torrent['Media']);
?>
<tr class="group_torrent groupid_<?=$GroupID?> edition hidden">
<tr class="group_torrent groupid_<?=$GroupID?> edition<?=$SnatchedGroupClass?> hidden">
<td colspan="7" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" title="Collapse this edition. Hold &quot;Ctrl&quot; while clicking to collapse all editions in this torrent group.">&minus;</a> <?=$RemasterName?></strong></td>
</tr>
<?
@ -266,7 +272,7 @@
}
$MasterName .= $AddExtra.display_str($Torrent['Media']);
?>
<tr class="group_torrent groupid_<?=$GroupID?> edition hidden">
<tr class="group_torrent groupid_<?=$GroupID?> edition<?=$SnatchedGroupClass?> hidden">
<td colspan="7" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" title="Collapse this edition. Hold &quot;Ctrl&quot; while clicking to collapse all editions in this torrent group.">&minus;</a> <?=$MasterName?></strong></td>
</tr>
<?
@ -278,7 +284,7 @@
$LastRemasterCatalogueNumber = $Torrent['RemasterCatalogueNumber'];
$LastMedia = $Torrent['Media'];
?>
<tr class="group_torrent groupid_<?=$GroupID?> edition_<?=$EditionID?> hidden<?=$Torrent['IsSnatched'] ? ' snatched_torrent' : ''?>">
<tr class="group_torrent torrent_row groupid_<?=$GroupID?> edition_<?=$EditionID?><?=$SnatchedTorrentClass . $SnatchedGroupClass?> hidden">
<td colspan="3">
<span>
[ <a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">DL</a>
@ -311,11 +317,11 @@
} elseif ($Torrent['FreeTorrent'] == '2') {
$DisplayName .= ' <strong class="neutral_leech_torrent_label">Neutral Leech!</strong>';
} elseif (Torrents::has_token($TorrentID)) {
$DisplayName .= '<strong class="personal_freeleech_torrent_label">Personal Freeleech!</strong>';
$DisplayName .= ' <strong class="personal_freeleech_torrent_label">Personal Freeleech!</strong>';
}
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : '';
?>
<tr class="torrent<?=$Torrent['IsSnatched'] ? ' snatched_torrent' : ''?>" id="group_<?=$GroupID?>">
<tr class="torrent torrent_row<?=$SnatchedTorrentClass . $SnatchedGroupClass?>" id="group_<?=$GroupID?>">
<td></td>
<td class="center">
<div title="<?=ucfirst(str_replace('_',' ',$PrimaryTag))?>" class="cats_<?=strtolower(str_replace(array('-',' '),array('',''),$Categories[$GroupCategoryID-1]))?> tags_<?=str_replace('.','_',$PrimaryTag)?>">

View File

@ -923,6 +923,8 @@ function header_link($SortKey,$DefaultWay="desc") {
} else {
$DisplayName = '';
}
$SnatchedGroupClass = $GroupInfo['Flags']['IsSnatched'] ? ' snatched_group' : '';
if ($GroupResults && (count($Torrents)>1 || isset($GroupedCategories[$CategoryID-1]))) {
// These torrents are in a group
$DisplayName .= '<a href="torrents.php?id='.$GroupID.'" title="View Torrent" dir="ltr">'.$GroupName.'</a>';
@ -934,7 +936,7 @@ function header_link($SortKey,$DefaultWay="desc") {
}
$DisplayName .= ' ['.$ReleaseTypes[$ReleaseType].']';
?>
<tr class="group">
<tr class="group<?=$SnatchedGroupClass?>">
<?
$ShowGroups = !(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1);
?>
@ -986,6 +988,7 @@ function header_link($SortKey,$DefaultWay="desc") {
if ($Data['Remastered'] && !$Data['RemasterYear']) {
$FirstUnknown = !isset($FirstUnknown);
}
$SnatchedTorrentClass = $Data['IsSnatched'] ? ' snatched_torrent' : '';
if (isset($GroupedCategories[$CategoryID-1])
&& ($Data['RemasterTitle'] != $LastRemasterTitle
@ -1006,7 +1009,7 @@ function header_link($SortKey,$DefaultWay="desc") {
$RemasterName .= $AddExtra.display_str($Data['Media']);
?>
<tr class="group_torrent groupid_<?=$GroupID?> edition<? if (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping']==1) { echo ' hidden'; }?>">
<tr class="group_torrent groupid_<?=$GroupID?> edition<?=$SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '')?>">
<td colspan="9" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" title="Collapse this edition. Hold &quot;Ctrl&quot; while clicking to collapse all editions in this torrent group.">&minus;</a> <?=$RemasterName?></strong></td>
</tr>
<?
@ -1021,7 +1024,7 @@ function header_link($SortKey,$DefaultWay="desc") {
}
$MasterName .= $AddExtra.display_str($Data['Media']);
?>
<tr class="group_torrent groupid_<?=$GroupID?> edition<? if (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping']==1) { echo ' hidden'; }?>">
<tr class="group_torrent groupid_<?=$GroupID?> edition<?=$SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '')?>">
<td colspan="9" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" title="Collapse this edition. Hold &quot;Ctrl&quot; while clicking to collapse all editions in this torrent group.">&minus;</a> <?=$MasterName?></strong></td>
</tr>
<?
@ -1033,7 +1036,7 @@ function header_link($SortKey,$DefaultWay="desc") {
$LastRemasterCatalogueNumber = $Data['RemasterCatalogueNumber'];
$LastMedia = $Data['Media'];
?>
<tr class="group_torrent groupid_<?=$GroupID?> edition_<?=$EditionID?><?=(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping']==1 ? ' hidden' : '') . ($Data['IsSnatched'] ? ' snatched_torrent' : '')?>">
<tr class="group_torrent groupid_<?=$GroupID?> edition_<?=$EditionID?><?=$SnatchedTorrentClass . $SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping']==1 ? ' hidden' : '')?>">
<td colspan="3">
<span>
[ <a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download"><?=$Data['HasFile'] ? 'DL' : 'Missing'?></a>
@ -1071,11 +1074,12 @@ function header_link($SortKey,$DefaultWay="desc") {
} else {
$ExtraInfo = '';
}
$SnatchedTorrentClass = $Data['IsSnatched'] ? ' snatched_torrent' : '';
?>
<tr class="torrent<?=$Data['IsSnatched'] ? ' snatched_torrent' : ''?>">
<? if ($GroupResults) { ?>
<tr class="torrent<?=$SnatchedTorrentClass . $SnatchedGroupClass?>">
<? if ($GroupResults) { ?>
<td></td>
<? } ?>
<? } ?>
<td class="center cats_col">
<div title="<?=ucfirst(str_replace('.',' ',$TagList[0]))?>" class="cats_<?=strtolower(str_replace(array('-',' '),array('',''),$Categories[$CategoryID-1]))?> tags_<?=str_replace('.','_',$TagList[0])?>"></div>
</td>

View File

@ -27,7 +27,7 @@ function compare($X, $Y){
list($WikiBody, $WikiImage, $GroupID, $GroupName, $GroupYear,
$GroupRecordLabel, $GroupCatalogueNumber, $ReleaseType, $GroupCategoryID,
$GroupTime, $GroupVanityHouse, $TorrentTags, $TorrentTagIDs, $TorrentTagUserIDs,
$TagPositiveVotes, $TagNegativeVotes) = array_values($TorrentDetails);
$TagPositiveVotes, $TagNegativeVotes, $GroupFlags) = array_values($TorrentDetails);
$DisplayName=$GroupName;
$AltName=$GroupName; // Goes in the alt text of the image
@ -368,7 +368,7 @@ function compare($X, $Y){
?>
</div>
<div class="main_column">
<table class="torrent_table details" id="torrent_details">
<table class="torrent_table details<?=$GroupFlags['IsSnatched'] ? ' snatched' : ''?>" id="torrent_details">
<tr class="colhead_dark">
<td width="80%"><strong>Torrents</strong></td>
<td><strong>Size</strong></td>
@ -531,7 +531,7 @@ function filelist($Str) {
$LastMedia = $Media;
?>
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition_<?=$EditionID?> group_torrent<?=$IsSnatched ? ' snatched_torrent' : ''?>" style="font-weight: normal;" id="torrent<?=$TorrentID?>">
<tr class="torrent_row releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition_<?=$EditionID?> group_torrent<?=$IsSnatched ? ' snatched_torrent' : ''?>" style="font-weight: normal;" id="torrent<?=$TorrentID?>">
<td>
<span>[ <a href="torrents.php?action=download&amp;id=<?=$TorrentID ?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download"><?=$HasFile ? 'DL' : 'Missing'?></a>
<? if (Torrents::can_use_token($Torrent)) { ?>

View File

@ -122,8 +122,11 @@ function get_group_info($GroupID, $Return = true, $RevisionID = 0) {
$TorrentList = $TorrentCache[1];
}
// Fetch all user specific torrent properties
array_walk($TorrentList, 'Torrents::torrent_properties');
// Fetch all user specific torrent and group properties
$TorrentDetails['Flags'] = array('IsSnatched' => false);
foreach ($TorrentList as &$Torrent) {
Torrents::torrent_properties($Torrent, $TorrentDetails['Flags']);
}
if ($Return) {
return array($TorrentDetails, $TorrentList);

View File

@ -262,7 +262,7 @@ function header_link($SortKey, $DefaultWay = "desc") {
// print row
?>
<tr class="torrent<?=$TorrentInfo['IsSnatched'] ? ' snatched_torrent' : ''?>" id="torrent<?=$TorrentID?>"<?=$MatchingArtistsText ? 'title="'.display_str($MatchingArtistsText).'"' : ''?>>
<tr class="torrent torrent_row<?=($TorrentInfo['IsSnatched'] ? ' snatched_torrent' : '') . ($GroupInfo['Flags']['IsSnatched'] ? ' snatched_group' : '')?>" id="torrent<?=$TorrentID?>"<?=$MatchingArtistsText ? 'title="'.display_str($MatchingArtistsText).'"' : ''?>>
<td style="text-align: center"><input type="checkbox" value="<?=$TorrentID?>" id="clear_<?=$TorrentID?>" /></td>
<td class="center cats_col"><div title="<?=ucfirst(str_replace('_',' ',$MainTag))?>" class="cats_<?=strtolower(str_replace(array('-',' '),array('',''),$Categories[$GroupCategoryID-1])).' tags_'.str_replace('.','_',$MainTag)?>"></div></td>
<td>

View File

@ -425,10 +425,9 @@ function header_link($SortKey,$DefaultWay="DESC") {
foreach($TorrentsInfo as $TorrentID=>$Info) {
list($GroupID,, $Time, $CategoryID) = array_values($Info);
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists, $ExtendedArtists) = array_values($Results[$GroupID]);
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists, $ExtendedArtists, $GroupFlags) = array_values($Results[$GroupID]);
$Torrent = $Torrents[$TorrentID];
$TagList = explode(' ',str_replace('_','.',$TagList));
$TorrentTags = array();
@ -454,10 +453,8 @@ function header_link($SortKey,$DefaultWay="DESC") {
if($ExtraInfo) {
$DisplayName.=' - '.$ExtraInfo;
}
?>
<tr class="torrent<?=$Torrent['IsSnatched'] ? ' snatched_torrent' : ''?>">
<tr class="torrent torrent_row<?=($Torrent['IsSnatched'] ? ' snatched_torrent' : '') . ($GroupFlags['IsSnatched'] ? ' snatched_group' : '')?>">
<td class="center cats_col">
<div title="<?=ucfirst(str_replace('.',' ',$TagList[0]))?>" class="cats_<?=strtolower(str_replace(array('-',' '),array('',''),$Categories[$CategoryID-1]))?> tags_<?=str_replace('.','_',$TagList[0])?>"></div>
</td>

View File

@ -105,7 +105,7 @@
// $DisplayName = Artists::display_artists($Artists[$GroupID]);
// $AltName=$GroupName;
foreach ($TorrentList as $GroupID => $Group) {
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $GroupArtists, $ExtendedArtists) = array_values($Group);
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $GroupArtists, $ExtendedArtists, $GroupFlags) = array_values($Group);
list($GroupID2, $Image, $GroupCategoryID) = array_values($CollageDataList[$GroupID]);
unset($DisplayName);
@ -135,12 +135,14 @@
$DisplayName .= '<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
if($GroupYear>0) { $DisplayName = $DisplayName. ' ['. $GroupYear .']';}
if($GroupVanityHouse) { $DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]'; }
$SnatchedGroupClass = $GroupFlags['IsSnatched'] ? ' snatched_group' : '';
// Start an output buffer, so we can store this output in $TorrentTable
ob_start();
if(count($Torrents)>1 || $GroupCategoryID==1) {
?>
<tr class="group discog" id="group_<?=$CollageID?><?=$GroupID?>">
<tr class="group discog<?=$SnatchedGroupClass?>" id="group_<?=$CollageID?><?=$GroupID?>">
<td class="center">
<div title="View" id="showimg_<?=$CollageID?><?=$GroupID?>" class="<?=($ShowGroups ? 'hide' : 'show')?>_torrents">
<a href="#" class="show_torrents_link" onclick="toggle_group(<?=$CollageID?><?=$GroupID?>, this, event)" title="Collapse this group"></a>
@ -179,6 +181,7 @@
if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
$FirstUnknown = !isset($FirstUnknown);
}
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : '';
if($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
$Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $FirstUnknown || $Torrent['Media'] != $LastMedia) {
@ -194,7 +197,7 @@
$RemasterName .= $AddExtra.display_str($Torrent['Media']);
?>
<tr class="group_torrent groupid_<?=$CollageID . $GroupID?> edition hidden">
<tr class="group_torrent groupid_<?=$CollageID . $GroupID?> edition<?=$SnatchedGroupClass?> hidden">
<td colspan="<?=($LoggedUser['HideCollage']?'6':'7')?>" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$CollageID?><?=$GroupID?>, <?=$EditionID?>, this, event)" title="Collapse this edition. Hold &quot;Ctrl&quot; while clicking to collapse all editions in this torrent group.">&minus;</a> <?=$RemasterName?></strong></td>
</tr>
<?
@ -209,7 +212,7 @@
}
$MasterName .= $AddExtra.display_str($Torrent['Media']);
?>
<tr class="group_torrent groupid_<?=$CollageID . $GroupID?> edition hidden">
<tr class="group_torrent groupid_<?=$CollageID . $GroupID?> edition<?=$SnatchedGroupClass?> hidden">
<td colspan="<?=($LoggedUser['HideCollage']?'6':'7')?>" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$CollageID?><?=$GroupID?>, <?=$EditionID?>, this, event)" title="Collapse this edition. Hold &quot;Ctrl&quot; while clicking to collapse all editions in this torrent group.">&minus;</a> <?=$MasterName?></strong></td>
</tr>
<?
@ -221,7 +224,7 @@
$LastRemasterCatalogueNumber = $Torrent['RemasterCatalogueNumber'];
$LastMedia = $Torrent['Media'];
?>
<tr class="group_torrent groupid_<?=$CollageID . $GroupID?> edition_<?=$EditionID?> hidden<?=$Torrent['IsSnatched'] ? ' snatched_torrent' : ''?>">
<tr class="group_torrent groupid_<?=$CollageID . $GroupID?> edition_<?=$EditionID?> hidden<?=$SnatchedTorrentClass . $SnatchedGroupClass?>">
<td colspan="<?=($LoggedUser['HideCollage']?'2':'3')?>">
<span>
[ <a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download">DL</a> ]
@ -242,14 +245,15 @@
$DisplayName = '<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
if(!$Torrent['IsSnatched']) {
if($Torrent['IsSnatched']) {
$DisplayName .=' <strong class="snatched_torrent_label">Snatched!</strong>';
}
if(!empty($Torrent['FreeTorrent'])) {
$DisplayName .=' <strong class="freeleech_torrent_label">Freeleech!</strong>';
}
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : '';
?>
<tr class="torrent<?=$Torrent['IsSnatched'] ? ' snatched_torrent' : ''?>" id="group_<?=$CollageID . $GroupID?>">
<tr class="torrent<?=$SnatchedTorrentClass?>" id="group_<?=$CollageID . $GroupID?>">
<td></td>
<td class="center">
<div title="<?=ucfirst(str_replace('_',' ',$PrimaryTag))?>" class="cats_<?=strtolower(str_replace(array('-',' '),array('',''),$Categories[$GroupCategoryID-1]))?> tags_<?=str_replace('.','_',$PrimaryTag)?>">