Empty commit

This commit is contained in:
Git 2012-11-04 08:00:20 +00:00
parent 1537e69d8c
commit 032955aeb7
14 changed files with 197 additions and 131 deletions

View File

@ -587,17 +587,17 @@ function show() {
<? } ?>
<input type="text" id="tags" name="tags" size="40" value="<?=display_str($Torrent['TagList']) ?>" <?=$this->Disabled?>/>
<br />
Tags should be comma separated, and you should use a period ('.') to separate words inside a tag - eg. '<strong style="color:green;">hip.hop</strong>'.
Tags should be comma separated, and you should use a period ('.') to separate words inside a tag - eg. '<strong class="important_text_alt">hip.hop</strong>'.
<br /><br />
There is a list of official tags to the left of the text box. Please use these tags instead of 'unofficial' tags (e.g. use the official '<strong style="color:green;">drum.and.bass</strong>' tag, instead of an unofficial '<strong style="color:red;">dnb</strong>' tag). <strong>Please note that the '2000s' tag refers to music produced between 2000 and 2009.</strong>
There is a list of official tags to the left of the text box. Please use these tags instead of 'unofficial' tags (e.g. use the official '<strong class="important_text_alt">drum.and.bass</strong>' tag, instead of an unofficial '<strong class="important_text">dnb</strong>' tag). <strong>Please note that the '2000s' tag refers to music produced between 2000 and 2009.</strong>
<br /><br />
Avoid abbreviations if at all possible. So instead of tagging an album as '<strong style="color:red;">alt</strong>', tag it as '<strong style="color:green;">alternative</strong>'. Make sure that you use correct spelling.
Avoid abbreviations if at all possible. So instead of tagging an album as '<strong class="important_text">alt</strong>', tag it as '<strong class="important_text_alt">alternative</strong>'. Make sure that you use correct spelling.
<br /><br />
Avoid using multiple synonymous tags. Using both '<strong style="color:red;">prog.rock</strong>' and '<strong style="color:green;">progressive.rock</strong>' is redundant and annoying - just use the official '<strong style="color:green;">progressive.rock</strong>' tag.
Avoid using multiple synonymous tags. Using both '<strong class="important_text">prog.rock</strong>' and '<strong class="important_text_alt">progressive.rock</strong>' is redundant and annoying - just use the official '<strong class="important_text_alt">progressive.rock</strong>' tag.
<br /><br />
Don't use 'useless' tags, such as '<strong style="color:red;">seen.live</strong>', '<strong style="color:red;">awesome</strong>', '<strong style="color:red;">rap</strong>' (is encompassed by '<strong style="color:green;">hip.hop</strong>'), etc. If an album is live, you can tag it as '<strong style="color:green;">live</strong>'.
Don't use 'useless' tags, such as '<strong class="important_text">seen.live</strong>', '<strong class="important_text">awesome</strong>', '<strong class="important_text">rap</strong>' (is encompassed by '<strong class="important_text_alt">hip.hop</strong>'), etc. If an album is live, you can tag it as '<strong class="important_text_alt">live</strong>'.
<br /><br />
Only tag information on the album itself - NOT THE INDIVIDUAL RELEASE. Tags such as '<strong style="color:red;">v0</strong>', '<strong style="color:red;">eac</strong>', '<strong style="color:red;">vinyl</strong>', '<strong style="color:red;">from.oink</strong>' etc. are strictly forbidden. Remember that these tags will be used for other versions of the same album.
Only tag information on the album itself - NOT THE INDIVIDUAL RELEASE. Tags such as '<strong class="important_text">v0</strong>', '<strong class="important_text">eac</strong>', '<strong class="important_text">vinyl</strong>', '<strong class="important_text">from.oink</strong>' etc. are strictly forbidden. Remember that these tags will be used for other versions of the same album.
<br /><br />
<strong>You should be able to build up a list of tags using only the official tags to the left of the text box. If you are in any doubt about whether or not a tag is acceptable, do not add it.</strong>
</td>

View File

@ -452,7 +452,7 @@ public static function torrent_info($Data, $ShowMedia = false, $ShowEdition = fa
if (!empty($Data['RemasterTitle'])) { $EditionInfo[]=$Data['RemasterTitle']; }
if (count($EditionInfo)) { $Info[]=implode(' ',$EditionInfo); }
}
if ($Data['IsSnatched']) { $Info[]='<strong class="snatched_torrent">Snatched!</strong>'; }
if ($Data['IsSnatched']) { $Info[]='<strong class="snatched_torrent_label">Snatched!</strong>'; }
if ($Data['FreeTorrent'] == '1') { $Info[]='<strong>Freeleech!</strong>'; }
if ($Data['FreeTorrent'] == '2') { $Info[]='<strong>Neutral Leech!</strong>'; }
if ($Data['PersonalFL']) { $Info[]='<strong>Personal Freeleech!</strong>'; }

View File

@ -448,7 +448,7 @@ function compare($X, $Y){
$LastRemasterCatalogueNumber = $Torrent['RemasterCatalogueNumber'];
$LastMedia = $Torrent['Media'];
?>
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition_<?=$EditionID?> group_torrent discog<?=$HideDiscog.$HideTorrents?>">
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition_<?=$EditionID?> group_torrent discog<?=$HideDiscog . $HideTorrents . ($Torrent['IsSnatched'] ? ' snatched_torrent' : '')?>">
<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>
@ -578,7 +578,7 @@ function compare($X, $Y){
<li id="list<?=$ListItem?>">
<input type="hidden" name="list[]" value="<?=$ListItem?>" />
<span style="float:left;"><?=$ZIPOptions[$ListItem]['2']?></span>
<a href="#" onclick="remove_selection('<?=$ListItem?>');return false;" style="float:right;" title="Remove format from the Collector">[X]</a>
<span class="remove remove_collector"><a href="#" onclick="remove_selection('<?=$ListItem?>');return false;" style="float:right;" title="Remove format from the Collector">[X]</a></span>
<br style="clear:all;" />
</li>
<? } ?>
@ -686,11 +686,12 @@ function compare($X, $Y){
?>
<li>
<span title=<?=$Score?>><a href="artist.php?id=<?=$Artist2ID?>" style="float:left; display:block;"><?=$Artist2Name?></a></span> <div style="float:right; display:block; letter-spacing: -1px;">
<a href="artist.php?action=vote_similar&amp;artistid=<?=$ArtistID?>&amp;similarid=<?=$SimilarID?>&amp;way=down" style="font-family: monospace;" title="Vote down this similar artist. Use this when you feel that the two artists are not all that similar.">[-]</a>
<a href="artist.php?action=vote_similar&amp;artistid=<?=$ArtistID?>&amp;similarid=<?=$SimilarID?>&amp;way=up" style="font-family: monospace;" title="Vote up this similar artist. Use this when you feel that the two artists are quite similar.">[+]</a>
<span title=<?=$Score?>><a href="artist.php?id=<?=$Artist2ID?>" style="float:left; display:block;"><?=$Artist2Name?></a></span>
<div style="float:right; display:block; letter-spacing: -1px;">
<a href="artist.php?action=vote_similar&amp;artistid=<?=$ArtistID?>&amp;similarid=<?=$SimilarID?>&amp;way=down" style="font-family: monospace;" title="Vote down this similar artist. Use this when you feel that the two artists are not all that similar.">[-]</a>
<a href="artist.php?action=vote_similar&amp;artistid=<?=$ArtistID?>&amp;similarid=<?=$SimilarID?>&amp;way=up" style="font-family: monospace;" title="Vote up this similar artist. Use this when you feel that the two artists are quite similar.">[+]</a>
<? if(check_perms('site_delete_tag')) { ?>
<a href="artist.php?action=delete_similar&amp;similarid=<?=$SimilarID?>&amp;auth=<?=$LoggedUser['AuthKey']?>" title="Remove this similar artist">[X]</a>
<span class="remove remove_artist"><a href="artist.php?action=delete_similar&amp;similarid=<?=$SimilarID?>&amp;auth=<?=$LoggedUser['AuthKey']?>" title="Remove this similar artist">[X]</a></span>
<? } ?>
</div>
<br style="clear:both" />

View File

@ -1,7 +1,11 @@
<?
if(!isset($_GET['type']) || !is_number($_GET['type']) || $_GET['type'] > 3) { error(0); }
if(!isset($_GET['type']) || !is_number($_GET['type']) || $_GET['type'] > 3) {
error(0);
}
$Options = array('v0','v2','320');
$Encodings = array('V0 (VBR)', 'V2 (VBR)', '320');
$EncodingKeys = array_fill_keys($Encodings, true);
if ($_GET['type'] == 3) {
$List = "!(v0 | v2 | 320)";
@ -13,56 +17,70 @@
$_GET['type'] = display_str($_GET['type']);
}
}
$Query = '@format FLAC @encoding '.$List;
$SphQL = new SphinxQL_Query();
$SphQL->select('id, groupid')
->from('better_transcode')
->where('logscore', 100)
->where_match('FLAC', 'format')
->where_match($List, 'encoding', false)
->order_by('RAND()')
->limit(0, TORRENTS_PER_PAGE, TORRENTS_PER_PAGE);
if(!empty($_GET['search'])) {
$Query.=' @(groupname,artistname,yearfulltext,taglist) '.$SS->escape_string($_GET['search']);
$SphQL->where_match($_GET['search'], '(groupname,artistname,year,taglist)');
}
$SS->SetFilter('logscore', array(100));
$SS->SetSortMode(SPH_SORT_EXTENDED, "@random");
$SS->limit(0, TORRENTS_PER_PAGE);
$SphQLResult = $SphQL->query();
$TorrentCount = $SphQLResult->get_meta('total');
$SS->set_index(SPHINX_INDEX.' delta');
if ($TorrentCount == 0) {
error('No results found!');
}
$Results = $SS->search($Query, '', 0, array(), '', '');
$Results = $SphQLResult->to_array('groupid');
$Groups = Torrents::get_groups(array_keys($Results));
$Groups = $Groups['matches'];
if(count($Results) == 0) { error('No results found!'); }
/*
// If some were fetched from memcached, get their artists
if(!empty($Results['matches'])) { // Fetch the artists for groups
$GroupIDs = array_keys($Results['matches']);
$Artists = Artists::get_artists($GroupIDs);
foreach($Artists as $GroupID=>$Data) {
if(!empty($Data[1])) {
$Results['matches'][$GroupID]['Artists']=$Data[1]; // Only use main artists
}
ksort($Results['matches'][$GroupID]);
$Debug->log_var(true, 'Excluding '.$Encodings[$_GET['type']]);
$TorrentGroups = array();
foreach ($Groups as $GroupID => $Group) {
if (empty($Group['Torrents'])) {
unset($Groups[$GroupID]);
continue;
}
}
*/
// These ones were not found in the cache, run SQL
if(!empty($Results['notfound'])) {
$SQLResults = Torrents::get_groups($Results['notfound']);
if(is_array($SQLResults['notfound'])) { // Something wasn't found in the db, remove it from results
reset($SQLResults['notfound']);
foreach($SQLResults['notfound'] as $ID) {
unset($SQLResults['matches'][$ID]);
unset($Results['matches'][$ID]);
foreach ($Group['Torrents'] as $Torrent) {
$TorRemIdent = "$Torrent[Media] $Torrent[RemasterYear] $Torrent[RemasterTitle] $Torrent[RemasterRecordLabel] $Torrent[RemasterCatalogueNumber]";
if (!isset($TorrentGroups[$Group['ID']])) {
$TorrentGroups[$Group['ID']] = array(
$TorRemIdent => array(
'FlacID' => 0,
'Formats' => array(),
'RemasterTitle' => $Torrent['RemasterTitle'],
'RemasterYear' => $Torrent['RemasterYear'],
'RemasterRecordLabel' => $Torrent['RemasterRecordLabel'],
'RemasterCatalogueNumber' => $Torrent['RemasterCatalogueNumber'],
'IsSnatched' => false
)
);
} elseif (!isset($TorrentGroups[$Group['ID']][$TorRemIdent])) {
$TorrentGroups[$Group['ID']][$TorRemIdent] = array(
'FlacID' => 0,
'Formats' => array(),
'RemasterTitle' => $Torrent['RemasterTitle'],
'RemasterYear' => $Torrent['RemasterYear'],
'RemasterRecordLabel' => $Torrent['RemasterRecordLabel'],
'RemasterCatalogueNumber' => $Torrent['RemasterCatalogueNumber'],
'IsSnatched' => false
);
}
if (isset($EncodingKeys[$Torrent['Encoding']])) {
$TorrentGroups[$Group['ID']][$TorRemIdent]['Formats'][$Torrent['Encoding']] = true;
} elseif ($TorrentGroups[$Group['ID']][$TorRemIdent]['FlacID'] == 0 && $Torrent['Format'] == 'FLAC' && $Torrent['LogScore'] == 100) {
$TorrentGroups[$Group['ID']][$TorRemIdent]['FlacID'] = $Torrent['ID'];
$TorrentGroups[$Group['ID']][$TorRemIdent]['IsSnatched'] = $Torrent['IsSnatched'];
}
}
// Merge SQL results with memcached results
foreach($SQLResults['matches'] as $ID=>$SQLResult) {
$Results['matches'][$ID] = array_merge($Results['matches'][$ID], $SQLResult);
ksort($Results['matches'][$ID]);
}
}
$Results = $Results['matches'];
$Debug->log_var($TorrentGroups, 'Torrent groups');
View::show_header('Transcode Search');
?>
@ -90,55 +108,85 @@
<td>320</td>
</tr>
<?
foreach($Results as $GroupID=>$Data) {
$Debug->log_var($Data);
list($Artists, $GroupCatalogueNumber, $ExtendedArtists, $GroupID2, $GroupName, $GroupRecordLabel, $ReleaseType, $TorrentTags, $Torrents, $GroupVanityHouse, $GroupYear, $CategoryID, $FreeTorrent, $HasCue, $HasLog, $TotalLeechers, $LogScore, $ReleaseType, $ReleaseType, $TotalSeeders, $MaxSize, $TotalSnatched, $GroupTime) = array_values($Data);
$DisplayName = '';
if(count($Artists)>0) {
$DisplayName = Artists::display_artists(array('1'=>$Artists));
foreach ($TorrentGroups as $GroupID => $Editions) {
$GroupInfo = $Groups[$GroupID];
$GroupYear = $GroupInfo['Year'];
$ExtendedArtists = $GroupInfo['ExtendedArtists'];
$GroupCatalogueNumber = $GroupInfo['CatalogueNumber'];
$GroupName = $GroupInfo['Name'];
$GroupRecordLabel = $GroupInfo['RecordLabel'];
$ReleaseType = $GroupInfo['ReleaseType'];
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) {
unset($ExtendedArtists[2]);
unset($ExtendedArtists[3]);
$ArtistNames = Artists::display_artists($ExtendedArtists);
} else {
$ArtistNames = '';
}
$DisplayName.='<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
if($ReleaseType>0) { $DisplayName.=" [".$ReleaseTypes[$ReleaseType]."]"; }
$MissingEncodings = array('V0 (VBR)'=>1, 'V2 (VBR)'=>1, '320'=>1);
$FlacID = 0;
foreach($Torrents as $Torrent) {
if(!empty($MissingEncodings[$Torrent['Encoding']])) {
$MissingEncodings[$Torrent['Encoding']] = 0;
} elseif($Torrent['Format'] == 'FLAC' && $FlacID == 0) {
$FlacID = $Torrent['ID'];
$TagList = array();
$TagList = explode(' ',str_replace('_','.',$GroupInfo['TagList']));
$TorrentTags = array();
foreach ($TagList as $Tag) {
$TorrentTags[] = '<a href="torrents.php?'.$Action.'&amp;taglist='.$Tag.'">'.$Tag.'</a>';
}
$TorrentTags = implode(', ', $TorrentTags);
foreach ($Editions as $RemIdent => $Edition) {
if (!$Edition['FlacID']
|| !empty($Edition['Formats']) && $_GET['type'] == 3
|| $Edition['Formats'][$Encodings[$_GET['type']]] == true) {
$Debug->log_var($Edition, 'Skipping '.$RemIdent);
continue;
}
}
if($_GET['type'] == '3' && in_array(0, $MissingEncodings)) {
continue;
}
$TagList=array();
if($TorrentTags!='') {
$TorrentTags=explode(' ',$TorrentTags);
foreach ($TorrentTags as $TagKey => $TagName) {
$TagName = str_replace('_','.',$TagName);
$TagList[]='<a href="torrents.php?searchtags='.$TagName.'">'.$TagName.'</a>';
$DisplayName = $ArtistNames . '<a href="torrents.php?id='.$GroupID.'&amp;torrentid='.$Edition['FlacID'].'#torrent'.$Edition['FlacID'].'" title="View Torrent">'.$GroupName.'</a>';
if($GroupYear > 0) {
$DisplayName .= " [".$GroupYear."]";
}
if ($ReleaseType > 0) {
$DisplayName .= " [".$ReleaseTypes[$ReleaseType]."]";
}
if ($Edition['IsSnatched']) {
$DisplayName .= ' <strong class="snatched_torrent_label">Snatched!</strong>';
}
$EditionInfo = array();
if (!empty($Edition['RemasterYear'])) {
$ExtraInfo = $Edition['RemasterYear'];
} else {
$ExtraInfo = '';
}
if (!empty($Edition['RemasterRecordLabel'])) {
$EditionInfo[] = $Edition['RemasterRecordLabel'];
}
if (!empty($Edition['RemasterTitle'])) {
$EditionInfo[] = $Edition['RemasterTitle'];
}
if (!empty($Edition['RemasterCatalogueNumber'])) {
$EditionInfo[] = $Edition['RemasterCatalogueNumber'];
}
if (!empty($Edition['RemasterYear'])) {
$ExtraInfo .= ' - ';
}
$ExtraInfo .= implode(' / ', $EditionInfo);
?>
<tr<?=$Edition['IsSnatched'] ? ' class="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> ]
</span>
<?=$DisplayName?>
<div class="torrent_info"><?=$ExtraInfo?></div>
<div class="tags"><?=$TorrentTags?></div>
</td>
<td><strong><?=isset($Edition['Formats']['V2 (VBR)'])?'<span style="color: green;">YES</span>':'<span style="color: red;">NO</span>'?></strong></td>
<td><strong><?=isset($Edition['Formats']['V0 (VBR)'])?'<span style="color: green;">YES</span>':'<span style="color: red;">NO</span>'?></strong></td>
<td><strong><?=isset($Edition['Formats']['320'])?'<span style="color: green;">YES</span>':'<span style="color: red;">NO</span>'?></strong></td>
</tr>
<?
}
$PrimaryTag = $TorrentTags[0];
$TagList = implode(', ', $TagList);
$TorrentTags='<br /><div class="tags">'.$TagList.'</div>';
}
?>
<tr>
<td>
<?=$DisplayName?>
[ <a href="torrents.php?action=download&amp;id=<?=$FlacID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;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>
<td><strong><?=($MissingEncodings['V0 (VBR)'] == 0)?'<span style="color: green;">YES</span>':'<span style="color: red;">NO</span>'?></strong></td>
<td><strong><?=($MissingEncodings['320'] == 0)?'<span style="color: green;">YES</span>':'<span style="color: red;">NO</span>'?></strong></td>
</tr>
<? } ?>
</table>
</div>
<?

View File

@ -165,7 +165,7 @@ function compare($X, $Y){
$LastRemasterCatalogueNumber = $Torrent['RemasterCatalogueNumber'];
$LastMedia = $Torrent['Media'];
?>
<tr class="group_torrent groupid_<?=$GroupID?> edition_<?=$EditionID?><? if(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping']==1) { echo ' hidden'; } ?>">
<tr class="group_torrent groupid_<?=$GroupID?> edition_<?=$EditionID?><?=(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '') . ($Torrent['IsSnatched'] ? ' snatched_torrent' : '')?>">
<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)) { ?>
@ -190,7 +190,7 @@ function compare($X, $Y){
$DisplayName = '<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
if ($Torrent['IsSnatched']) {
$DisplayName .= ' <strong class="snatched_torrent">Snatched!</strong>';
$DisplayName .= ' <strong class="snatched_torrent_label">Snatched!</strong>';
}
if ($Torrent['FreeTorrent'] == '1') {
$DisplayName .= ' <strong>Freeleech!</strong>';

View File

@ -239,7 +239,7 @@ function compare($X, $Y){
$LastRemasterCatalogueNumber = $Torrent['RemasterCatalogueNumber'];
$LastMedia = $Torrent['Media'];
?>
<tr class="group_torrent groupid_<?=$GroupID?> edition_<?=$EditionID?><? if(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping']==1) { echo ' hidden'; } ?>">
<tr class="group_torrent groupid_<?=$GroupID?> edition_<?=$EditionID?><?=(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '') . ($Torrent['IsSnatched'] ? ' snatched_torrent' : '')?>">
<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>
@ -265,7 +265,7 @@ function compare($X, $Y){
$DisplayName = '<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
if ($Torrent['IsSnatched']) {
$DisplayName .= ' <strong class="snatched_torrent">Snatched!</strong>';
$DisplayName .= ' <strong class="snatched_torrent_label">Snatched!</strong>';
}
if ($Torrent['FreeTorrent'] == '1') {
$DisplayName .= ' <strong>Freeleech!</strong>';
@ -275,7 +275,7 @@ function compare($X, $Y){
$DisplayName .= $AddExtra.'<strong>Personal Freeleech!</strong>';
}
?>
<tr class="torrent" id="group_<?=$GroupID?>">
<tr class="torrent<?=$IsSnatched ? ' snatched_torrent' : ''?>" 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)?>">
@ -424,7 +424,7 @@ function compare($X, $Y){
<li id="list<?=$ListItem?>">
<input type="hidden" name="list[]" value="<?=$ListItem?>" />
<span style="float:left;"><?=$ZIPOptions[$ListItem]['2']?></span>
<a href="#" onclick="remove_selection('<?=$ListItem?>');return false;" style="float:right;">[X]</a>
<span class="remove remove_collector"><a href="#" onclick="remove_selection('<?=$ListItem?>');return false;" style="float:right;">[X]</a></span>
<br style="clear:all;" />
</li>
<? } ?>

View File

@ -415,6 +415,9 @@ function generate_torrent_table($Caption, $Tag, $Details, $Limit) {
$Format,$Encoding,$Media,$Scene,$HasLog,$HasCue,$LogScore,$Year,$GroupYear,
$RemasterTitle,$Snatched,$Seeders,$Leechers,$Data,$ReleaseType) = $Detail;
$IsBookmarked = has_bookmarked('torrent', $GroupID);
$IsSnatched = Torrents::has_snatched($TorrentID);
// highlight every other row
$Rank++;
$Highlight = ($Rank % 2 ? 'a' : 'b');
@ -448,7 +451,7 @@ function generate_torrent_table($Caption, $Tag, $Details, $Limit) {
if($Scene) { $ExtraInfo.=$AddExtra.'Scene'; $AddExtra=' / '; }
if($Year>0) { $ExtraInfo.=$AddExtra.$Year; $AddExtra=' '; }
if($RemasterTitle) { $ExtraInfo.=$AddExtra.$RemasterTitle; }
if(Torrents::has_snatched($TorrentID)) { $ExtraInfo.=' / <strong class="snatched_torrent">Snatched!</strong>'; }
if($IsSnatched) { $ExtraInfo.=' / <strong class="snatched_torrent_label">Snatched!</strong>'; }
if($ExtraInfo!='') {
$ExtraInfo = "- [$ExtraInfo]";
}
@ -469,7 +472,7 @@ function generate_torrent_table($Caption, $Tag, $Details, $Limit) {
// print row
?>
<tr class="torrent row<?=$Highlight?> <? has_bookmarked('torrent', $GroupID) ? "bookmarked" : ""?>">
<tr class="torrent row<?=$Highlight . ($IsBookmarked ? ' bookmarked' : '') . ($IsSnatched ? ' snatched_torrent' : '')?>">
<td style="padding:8px;text-align:center;"><strong><?=$Rank?></strong></td>
<?
//fix array offset php error
@ -484,7 +487,7 @@ function generate_torrent_table($Caption, $Tag, $Details, $Limit) {
<strong><?=$DisplayName?></strong> <?=$ExtraInfo?>
<span class="bookmark" style="float:right;">
<?
if(has_bookmarked('torrent', $GroupID)) {
if($IsBookmarked) {
?>
<a href="#" class="bookmarklink_torrent_<?=$GroupID?>" onclick="Unbookmark('torrent', <?=$GroupID?>,'Bookmark');return false;">Remove Bookmark</a>
<?

View File

@ -173,6 +173,8 @@
$GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse,
$Torrents, $GroupArtists, $ExtendedArtists, $GroupCategoryID,$Ups,$Total,$Score) = array_values($Group);
$IsBookmarked = in_array($GroupID, $Bookmarks);
// Handle stats and stuff
$Number++;
$NumGroups++;
@ -216,7 +218,7 @@
</td>
<td>
<strong><?=$DisplayName?></strong> <!--<?Votes::vote_link($GroupID,$UserVotes[$GroupID]['Type']);?>-->
<? if(in_array($GroupID, $Bookmarks)) { ?>
<? if($IsBookmarked) { ?>
<span class="bookmark" style="float:right;">[ <a href="#" class="bookmarklink_torrent_<?=$GroupID?>" title="Remove bookmark" onclick="Unbookmark('torrent',<?=$GroupID?>,'Bookmark');return false;">Unbookmark</a> ]</span>
<? } else { ?>
<span class="bookmark" style="float:right;">[ <a href="#" class="bookmarklink_torrent_<?=$GroupID?>" title="Add bookmark" onclick="Bookmark('torrent',<?=$GroupID?>,'Unbookmark');return false;">Bookmark</a> ]</span>
@ -237,6 +239,7 @@
foreach ($Torrents as $TorrentID => $Torrent) {
$Torrent['IsSnatched'] = Torrents::has_snatched($TorrentID);
if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
$FirstUnknown = !isset($FirstUnknown);
}
@ -280,7 +283,7 @@
$LastRemasterCatalogueNumber = $Torrent['RemasterCatalogueNumber'];
$LastMedia = $Torrent['Media'];
?>
<tr class="group_torrent groupid_<?=$GroupID?> edition_<?=$EditionID?> hidden">
<tr class="group_torrent groupid_<?=$GroupID?> edition_<?=$EditionID?> hidden<?=$Torrent['IsSnatched'] ? ' snatched_torrent' : ''?>">
<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>
@ -302,10 +305,11 @@
// Viewing a type that does not require grouping
list($TorrentID, $Torrent) = each($Torrents);
$Torrent['IsSnatched'] = Torrents::has_snatched($TorrentID);
$DisplayName = $Number .' - <a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
if($Torrent['IsSnatched']) {
$DisplayName .= ' <strong class="snatched_torrent">Snatched!</strong>';
$DisplayName .= ' <strong class="snatched_torrent_label">Snatched!</strong>';
}
if ($Torrent['FreeTorrent'] == '1') {
$DisplayName .= ' <strong>Freeleech!</strong>';
@ -316,7 +320,7 @@
}
?>
<tr class="torrent" id="group_<?=$GroupID?>">
<tr class="torrent<?=$Torrent['IsSnatched'] ? ' snatched_torrent' : ''?>" 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)?>">
@ -329,7 +333,7 @@
| <a href="torrents.php?action=download&amp;id=<?=$TorrentID ?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>&amp;usetoken=1" title="Use a FL Token" onclick="return confirm('Are you sure you want to use a freeleech token here?');">FL</a>
<? } ?>
| <a href="reportsv2.php?action=report&amp;id=<?=$TorrentID?>" title="Report">RP</a>
<? if(in_array($GroupID, $Bookmarks)) { ?>
<? if($IsBookmarked) { ?>
| <a href="#" id="bookmarklink_torrent_<?=$GroupID?>" title="Remove bookmark" onclick="Unbookmark('torrent',<?=$GroupID?>,'Bookmark');return false;">Unbookmark</a>
<? } else { ?>
| <a href="#" id="bookmarklink_torrent_<?=$GroupID?>" title="Add bookmark" onclick="Bookmark('torrent',<?=$GroupID?>,'Unbookmark');return false;">Bookmark</a>

View File

@ -1031,7 +1031,7 @@ function header_link($SortKey,$DefaultWay="desc") {
$LastRemasterCatalogueNumber = $Data['RemasterCatalogueNumber'];
$LastMedia = $Data['Media'];
?>
<tr class="group_torrent groupid_<?=$GroupID?> edition_<?=$EditionID?><? if (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping']==1) { echo ' hidden'; }?>">
<tr class="group_torrent groupid_<?=$GroupID?> edition_<?=$EditionID?><?=(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping']==1 ? ' hidden' : '') . ($Data['IsSnatched'] ? ' snatched_torrent' : '')?>">
<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>
@ -1064,11 +1064,13 @@ function header_link($SortKey,$DefaultWay="desc") {
$DisplayName .= ' ['.$ReleaseTypes[$ReleaseType].']';
}
$ExtraInfo = Torrents::torrent_info($Data, true, true);
} elseif ($Data['IsSnatched']) {
$ExtraInfo = '<strong class="snatched_torrent_label">Snatched!</strong>';
} else {
$ExtraInfo = '';
}
?>
<tr class="torrent">
<tr class="torrent<?=$Data['IsSnatched'] ? ' snatched_torrent' : ''?>">
<? if ($GroupResults) { ?>
<td></td>
<? } ?>

View File

@ -150,7 +150,7 @@ function compare($X, $Y){
}
?>
(<?=$AliasID?>)&nbsp;
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=4');this.parentNode.parentNode.style.display = 'none';" title="Remove artist">[X]</a></span>
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=4');this.parentNode.parentNode.style.display = 'none';" title="Remove artist">[X]</a></span>
<? } ?>
</li>
<? }
@ -169,7 +169,7 @@ function compare($X, $Y){
}
?>
(<?=$AliasID?>)&nbsp;
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=6');this.parentNode.parentNode.style.display = 'none';" title="Remove artist">[X]</a></span>
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=6');this.parentNode.parentNode.style.display = 'none';" title="Remove artist">[X]</a></span>
<? } ?>
</li>
<?
@ -191,7 +191,7 @@ function compare($X, $Y){
}
?>
(<?=$AliasID?>)&nbsp;
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=1');this.parentNode.parentNode.style.display = 'none';" title="Remove artist">[X]</a></span>
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=1');this.parentNode.parentNode.style.display = 'none';" title="Remove artist">[X]</a></span>
<? } ?>
</li>
<?
@ -210,7 +210,7 @@ function compare($X, $Y){
}
?>
(<?=$AliasID?>)&nbsp;
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=2');this.parentNode.parentNode.style.display = 'none';" title="Remove artist">[X]</a></span>
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=2');this.parentNode.parentNode.style.display = 'none';" title="Remove artist">[X]</a></span>
<? } ?>
</li>
<?
@ -230,7 +230,7 @@ function compare($X, $Y){
}
?>
(<?=$AliasID?>)&nbsp;
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=5');this.parentNode.parentNode.style.display = 'none';" title="Remove conductor">[X]</a></span>
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=5');this.parentNode.parentNode.style.display = 'none';" title="Remove conductor">[X]</a></span>
<? } ?>
</li>
<?
@ -250,7 +250,7 @@ function compare($X, $Y){
}
?>
(<?=$AliasID?>)&nbsp;
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=3');this.parentNode.parentNode.style.display = 'none';" title="Remove artist">[X]</a></span>
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=3');this.parentNode.parentNode.style.display = 'none';" title="Remove artist">[X]</a></span>
<? } ?>
</li>
<?
@ -270,7 +270,7 @@ function compare($X, $Y){
}
?>
(<?=$AliasID?>)&nbsp;
<span class="remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=7');this.parentNode.parentNode.style.display = 'none';" title="Remove producer">[X]</a></span>
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&amp;auth=' + authkey + '&amp;groupid=<?=$GroupID?>&amp;artistid=<?=$Artist['id']?>&amp;importance=7');this.parentNode.parentNode.style.display = 'none';" title="Remove producer">[X]</a></span>
<? } ?>
</li>
<?
@ -328,7 +328,7 @@ function compare($X, $Y){
<a href="user.php?id=<?=$Tag['userid']?>" title="View the profile of the user that added this tag">[U]</a>
<? } ?>
<? if(check_perms('site_delete_tag')){ ?>
<a href="torrents.php?action=delete_tag&amp;groupid=<?=$GroupID?>&amp;tagid=<?=$Tag['id']?>&amp;auth=<?=$LoggedUser['AuthKey']?>" title="Remove tag">[X]</a>
<span class="remove remove_tag"><a href="torrents.php?action=delete_tag&amp;groupid=<?=$GroupID?>&amp;tagid=<?=$Tag['id']?>&amp;auth=<?=$LoggedUser['AuthKey']?>" title="Remove tag">[X]</a></span>
<? } ?>
</div>
<br style="clear:both" />
@ -466,7 +466,7 @@ function filelist($Str) {
if(!$ExtraInfo) {
$ExtraInfo = $GroupName ; $AddExtra=' / ';
}
if($IsSnatched) { $ExtraInfo.=$AddExtra.'<strong class="snatched_torrent">Snatched!</strong>'; $AddExtra=' / '; }
if($IsSnatched) { $ExtraInfo.=$AddExtra.'<strong class="snatched_torrent_label">Snatched!</strong>'; $AddExtra=' / '; }
if($FreeTorrent == '1') { $ExtraInfo.=$AddExtra.'<strong>Freeleech!</strong>'; $AddExtra=' / '; }
if($FreeTorrent == '2') { $ExtraInfo.=$AddExtra.'<strong>Neutral Leech!</strong>'; $AddExtra=' / '; }
if($PersonalFL) { $ExtraInfo.=$AddExtra.'<strong>Personal Freeleech!</strong>'; $AddExtra=' / '; }
@ -525,7 +525,7 @@ function filelist($Str) {
$LastMedia = $Media;
?>
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition_<?=$EditionID?> group_torrent" style="font-weight: normal;" id="torrent<?=$TorrentID?>">
<tr class="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

@ -261,7 +261,7 @@ function header_link($SortKey, $DefaultWay = "desc") {
// print row
?>
<tr class="torrent" id="torrent<?=$TorrentID?>"<?=$MatchingArtistsText ? 'title="'.display_str($MatchingArtistsText).'"' : ''?>>
<tr class="torrent<?=$TorrentInfo['IsSnatched'] ? ' snatched_torrent' : ''?>" 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

@ -457,7 +457,7 @@ function header_link($SortKey,$DefaultWay="DESC") {
?>
<tr class="torrent">
<tr class="torrent<?=$Torrent['IsSnatched'] ? ' snatched_torrent' : ''?>">
<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

@ -194,7 +194,7 @@
$RemasterName .= $AddExtra.display_str($Torrent['Media']);
?>
<tr class="group_torrent groupid_<?=$CollageID?><?=$GroupID?> edition hidden">
<tr class="group_torrent groupid_<?=$CollageID . $GroupID?> edition 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 +209,7 @@
}
$MasterName .= $AddExtra.display_str($Torrent['Media']);
?>
<tr class="group_torrent groupid_<?=$CollageID?><?=$GroupID?> edition hidden">
<tr class="group_torrent groupid_<?=$CollageID . $GroupID?> edition 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 +221,7 @@
$LastRemasterCatalogueNumber = $Torrent['RemasterCatalogueNumber'];
$LastMedia = $Torrent['Media'];
?>
<tr class="group_torrent groupid_<?=$CollageID?><?=$GroupID?> edition_<?=$EditionID?> hidden">
<tr class="group_torrent groupid_<?=$CollageID . $GroupID?> edition_<?=$EditionID?> hidden<?=$Torrent['IsSnatched'] ? ' snatched_torrent' : ''?>">
<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,11 +242,14 @@
$DisplayName = '<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
if(!$Torrent['IsSnatched']) {
$DisplayName .=' <strong class="snatched_torrent_label">Snatched!</strong>';
}
if(!empty($Torrent['FreeTorrent'])) {
$DisplayName .=' <strong>Freeleech!</strong>';
$DisplayName .=' <strong>Freeleech!</strong>';
}
?>
<tr class="torrent" id="group_<?=$CollageID?><?=$GroupID?>">
<tr class="torrent<?=$Torrent['IsSnatched'] ? ' snatched_torrent' : ''?>" 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)?>">

View File

@ -147,6 +147,11 @@ strong.important_text {
font-weight: bold;
}
strong.important_text_alt {
color: green;
font-weight: bold;
}
.invalid,.warning,.error,.new {
color: #ff0000;
}