+
[=$Torrent['HasFile'] ? 'DL' : 'Missing'?>]
@@ -328,7 +344,7 @@ function compare($X, $Y){
//----------------- End building list and getting stats
-show_header($Name, 'requests,bbcode');
+show_header($Name, 'browse,requests,bbcode');
?>
=display_str($Name)?> if ($RevisionID) { ?> (Revision #=$RevisionID?>) } if ($VanityHouseArtist) { ?> [Vanity House] } ?>
diff --git a/sections/bookmarks/torrents.php b/sections/bookmarks/torrents.php
index 0c5e19fd..f72cee98 100644
--- a/sections/bookmarks/torrents.php
+++ b/sections/bookmarks/torrents.php
@@ -109,7 +109,7 @@ function compare($X, $Y){
|
@@ -132,11 +132,16 @@ function compare($X, $Y){
$LastRemasterTitle = '';
$LastRemasterRecordLabel = '';
$LastRemasterCatalogueNumber = '';
+ $LastMedia = '';
+
+ $EditionID = 0;
foreach ($Torrents as $TorrentID => $Torrent) {
if($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
- $Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber) {
+ $Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $Torrent['Media'] != $LastMedia) {
+
+ $EditionID++;
if($Torrent['RemasterTitle'] || $Torrent['RemasterYear'] || $Torrent['RemasterRecordLabel'] || $Torrent['RemasterCatalogueNumber']) {
$RemasterName = $Torrent['RemasterYear'];
@@ -144,10 +149,11 @@ function compare($X, $Y){
if($Torrent['RemasterRecordLabel']) { $RemasterName .= $AddExtra.display_str($Torrent['RemasterRecordLabel']); $AddExtra=' / '; }
if($Torrent['RemasterCatalogueNumber']) { $RemasterName .= $AddExtra.display_str($Torrent['RemasterCatalogueNumber']); $AddExtra=' / '; }
if($Torrent['RemasterTitle']) { $RemasterName .= $AddExtra.display_str($Torrent['RemasterTitle']); $AddExtra=' / '; }
+ $RemasterName .= $AddExtra.display_str($Torrent['Media']);
?>
- |
- =$RemasterName?> |
+
+ − =$RemasterName?> |
} else {
@@ -155,9 +161,10 @@ function compare($X, $Y){
$AddExtra = " / ";
if($GroupRecordLabel) { $MasterName .= $AddExtra.$GroupRecordLabel; $AddExtra=' / '; }
if($GroupCatalogueNumber) { $MasterName .= $AddExtra.$GroupCatalogueNumber; $AddExtra=' / '; }
+ $MasterName .= $AddExtra.display_str($Torrent['Media']);
?>
-
- =$MasterName?> |
+
+ − =$MasterName?> |
}
@@ -166,8 +173,9 @@ function compare($X, $Y){
$LastRemasterYear = $Torrent['RemasterYear'];
$LastRemasterRecordLabel = $Torrent['RemasterRecordLabel'];
$LastRemasterCatalogueNumber = $Torrent['RemasterCatalogueNumber'];
+ $LastMedia = $Torrent['Media'];
?>
-
+
[DL]
diff --git a/sections/collages/collage.php b/sections/collages/collage.php
index 880d29f1..289d04b4 100644
--- a/sections/collages/collage.php
+++ b/sections/collages/collage.php
@@ -136,7 +136,7 @@ function compare($X, $Y){
|
@@ -152,22 +152,28 @@ function compare($X, $Y){
$LastRemasterTitle = '';
$LastRemasterRecordLabel = '';
$LastRemasterCatalogueNumber = '';
+ $LastMedia = '';
+
+ $EditionID = 0;
foreach ($Torrents as $TorrentID => $Torrent) {
if($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
- $Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber) {
+ $Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $Torrent['Media'] != $LastMedia) {
if($Torrent['RemasterTitle'] || $Torrent['RemasterYear'] || $Torrent['RemasterRecordLabel'] || $Torrent['RemasterCatalogueNumber']) {
+
+ $EditionID++;
$RemasterName = $Torrent['RemasterYear'];
$AddExtra = " - ";
if($Torrent['RemasterRecordLabel']) { $RemasterName .= $AddExtra.display_str($Torrent['RemasterRecordLabel']); $AddExtra=' / '; }
if($Torrent['RemasterCatalogueNumber']) { $RemasterName .= $AddExtra.display_str($Torrent['RemasterCatalogueNumber']); $AddExtra=' / '; }
if($Torrent['RemasterTitle']) { $RemasterName .= $AddExtra.display_str($Torrent['RemasterTitle']); $AddExtra=' / '; }
+ $RemasterName .= $AddExtra.display_str($Torrent['Media']);
?>
- |
- =$RemasterName?> |
+
+ − =$RemasterName?> |
} else {
@@ -175,9 +181,10 @@ function compare($X, $Y){
$AddExtra = " / ";
if($GroupRecordLabel) { $MasterName .= $AddExtra.$GroupRecordLabel; $AddExtra=' / '; }
if($GroupCatalogueNumber) { $MasterName .= $AddExtra.$GroupCatalogueNumber; $AddExtra=' / '; }
+ $MasterName .= $AddExtra.display_str($Torrent['Media']);
?>
-
- =$MasterName?> |
+
+ − =$MasterName?> |
}
@@ -186,8 +193,9 @@ function compare($X, $Y){
$LastRemasterYear = $Torrent['RemasterYear'];
$LastRemasterRecordLabel = $Torrent['RemasterRecordLabel'];
$LastRemasterCatalogueNumber = $Torrent['RemasterCatalogueNumber'];
+ $LastMedia = $Torrent['Media'];
?>
-
+
[DL]
diff --git a/sections/peerupdate/index.php b/sections/peerupdate/index.php
index 586ac324..7c829d0a 100644
--- a/sections/peerupdate/index.php
+++ b/sections/peerupdate/index.php
@@ -30,7 +30,8 @@
while(list($GroupID,$Seeders,$Leechers,$Snatched) = $DB->next_record(MYSQLI_NUM)) {
$Data = $Cache->get_value('torrent_group_'.$GroupID);
- if(!is_array($Data)) { continue; }
+ if (!(is_array($Data) && (@$Data['ver'] >= 2))) { continue; }
+ $Data = $Data['d'];
$Changed = false;
@@ -89,4 +90,4 @@
echo '';
show_footer();
}
-?>
\ No newline at end of file
+?>
diff --git a/sections/torrents/browse2.php b/sections/torrents/browse2.php
index 13a7c086..4bb243ad 100644
--- a/sections/torrents/browse2.php
+++ b/sections/torrents/browse2.php
@@ -696,12 +696,12 @@ function header_link($SortKey,$DefaultWay="desc") {
if($GroupVanityHouse) { $DisplayName .= ' [VH]'; }
?>
-
$ShowGroups = !(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1);
?>
+ |
|
@@ -731,6 +731,9 @@ function header_link($SortKey,$DefaultWay="desc") {
$LastRemasterTitle = '';
$LastRemasterRecordLabel = '';
$LastRemasterCatalogueNumber = '';
+ $LastMedia = '';
+
+ $EditionID = 0;
foreach($Torrents as $TorrentID => $Data) {
// All of the individual torrents in the group
@@ -826,18 +829,20 @@ function header_link($SortKey,$DefaultWay="desc") {
}
if($CategoryID == 1 && ($Data['RemasterTitle'] != $LastRemasterTitle || $Data['RemasterYear'] != $LastRemasterYear ||
- $Data['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Data['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber)) {
+ $Data['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Data['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber) || $Data['Media'] != $LastMedia) {
if($Data['RemasterTitle'] || $Data['RemasterYear'] || $Data['RemasterRecordLabel'] || $Data['RemasterCatalogueNumber']) {
+ $EditionID++;
$RemasterName = $Data['RemasterYear'];
$AddExtra = " - ";
if($Data['RemasterRecordLabel']) { $RemasterName .= $AddExtra.display_str($Data['RemasterRecordLabel']); $AddExtra=' / '; }
if($Data['RemasterCatalogueNumber']) { $RemasterName .= $AddExtra.display_str($Data['RemasterCatalogueNumber']); $AddExtra=' / '; }
if($Data['RemasterTitle']) { $RemasterName .= $AddExtra.display_str($Data['RemasterTitle']); $AddExtra=' / '; }
+ $RemasterName .= $AddExtra.display_str($Data['Media']);
?>
- |
- =$RemasterName?> |
+
+ − =$RemasterName?> |
} else {
@@ -845,9 +850,10 @@ function header_link($SortKey,$DefaultWay="desc") {
$AddExtra = " / ";
if($GroupRecordLabel) { $MasterName .= $AddExtra.$GroupRecordLabel; $AddExtra=' / '; }
if($GroupCatalogueNumber) { $MasterName .= $AddExtra.$GroupCatalogueNumber; $AddExtra=' / '; }
+ $MasterName .= $AddExtra.display_str($Data['Media']);
?>
-
- =$MasterName?> |
+
+ − =$MasterName?> |
}
@@ -856,8 +862,9 @@ function header_link($SortKey,$DefaultWay="desc") {
$LastRemasterYear = $Data['RemasterYear'];
$LastRemasterRecordLabel = $Data['RemasterRecordLabel'];
$LastRemasterCatalogueNumber = $Data['RemasterCatalogueNumber'];
+ $LastMedia = $Data['Media'];
?>
-
+
[=$Data['HasFile'] ? 'DL' : 'Missing'?>
diff --git a/sections/torrents/details.php b/sections/torrents/details.php
index 913a72a5..7882c576 100644
--- a/sections/torrents/details.php
+++ b/sections/torrents/details.php
@@ -279,6 +279,8 @@ function filelist($Str) {
$LastRemasterRecordLabel = '';
$LastRemasterCatalogueNumber = '';
+$EditionID = 0;
+
foreach ($TorrentList as $Torrent) {
//t.ID, t.Media, t.Format, t.Encoding, t.Remastered, t.RemasterYear, t.RemasterTitle, t.RemasterRecordLabel,t.RemasterCatalogueNumber,
@@ -352,12 +354,12 @@ function filelist($Str) {
$TorrentUploader = $Username; // Save this for "Uploaded by:" below
+ // similar to torrent_info()
if($Format) { $ExtraInfo.=display_str($Format); $AddExtra=' / '; }
if($Encoding) { $ExtraInfo.=$AddExtra.display_str($Encoding); $AddExtra=' / '; }
if($HasLog) { $ExtraInfo.=$AddExtra.'Log'; $AddExtra=' / '; }
if($HasLog && $LogInDB) { $ExtraInfo.=' ('.(int) $LogScore.'%)'; }
if($HasCue) { $ExtraInfo.=$AddExtra.'Cue'; $AddExtra=' / '; }
- if($Media) { $ExtraInfo.=$AddExtra.display_str($Media); $AddExtra=' / '; }
if($Scene) { $ExtraInfo.=$AddExtra.'Scene'; $AddExtra=' / '; }
if(!$ExtraInfo) {
$ExtraInfo = $GroupName ; $AddExtra=' / ';
@@ -376,7 +378,10 @@ function filelist($Str) {
|| $RemasterYear != $LastRemasterYear
|| $RemasterRecordLabel != $LastRemasterRecordLabel
|| $RemasterCatalogueNumber != $LastRemasterCatalogueNumber
- || $FirstUnknown)) {
+ || $FirstUnknown
+ || $Media != $LastMedia)) {
+
+ $EditionID++;
if($Remastered && $RemasterYear != 0){
@@ -385,9 +390,10 @@ function filelist($Str) {
if($RemasterRecordLabel) { $RemasterName .= $AddExtra.display_str($RemasterRecordLabel); $AddExtra=' / '; }
if($RemasterCatalogueNumber) { $RemasterName .= $AddExtra.display_str($RemasterCatalogueNumber); $AddExtra=' / '; }
if($RemasterTitle) { $RemasterName .= $AddExtra.display_str($RemasterTitle); $AddExtra=' / '; }
+ $RemasterName .= $AddExtra.display_str($Media);
?>
-
- =$RemasterName?> |
+
+ − =$RemasterName?> |
} else {
@@ -396,9 +402,10 @@ function filelist($Str) {
$AddExtra = " / ";
if($GroupRecordLabel) { $MasterName .= $AddExtra.$GroupRecordLabel; $AddExtra=' / '; }
if($GroupCatalogueNumber) { $MasterName .= $AddExtra.$GroupCatalogueNumber; $AddExtra=' / '; }
+ $MasterName .= $AddExtra.display_str($Media);
?>
-
- =$MasterName?> |
+
+ − =$MasterName?> |
} else {
@@ -414,9 +421,10 @@ function filelist($Str) {
$LastRemasterYear = $RemasterYear;
$LastRemasterRecordLabel = $RemasterRecordLabel;
$LastRemasterCatalogueNumber = $RemasterCatalogueNumber;
+ $LastMedia = $Media;
?>
-
+
[
=$HasFile ? 'DL' : 'Missing'?>
@@ -437,7 +445,7 @@ function filelist($Str) {
| =number_format($Seeders)?> |
=number_format($Leechers)?> |
-
+
Uploaded by =format_username($UserID, $TorrentUploader)?> =time_diff($TorrentTime);?>
diff --git a/sections/torrents/functions.php b/sections/torrents/functions.php
index 7c701f60..058d73d1 100644
--- a/sections/torrents/functions.php
+++ b/sections/torrents/functions.php
@@ -102,7 +102,7 @@ function get_group_info($GroupID, $Return = true, $RevisionID = 0) {
WHERE t.GroupID='".db_string($GroupID)."'
AND flags != 1
GROUP BY t.ID
- ORDER BY t.Remastered ASC, (t.RemasterYear <> 0) DESC, t.RemasterYear ASC, t.RemasterTitle ASC, t.RemasterRecordLabel ASC, t.RemasterCatalogueNumber ASC, t.Format, t.Encoding, t.ID");
+ ORDER BY t.Remastered ASC, (t.RemasterYear <> 0) DESC, t.RemasterYear ASC, t.RemasterTitle ASC, t.RemasterRecordLabel ASC, t.RemasterCatalogueNumber ASC, t.Media ASC, t.Format, t.Encoding, t.ID");
$TorrentList = $DB->to_array();
if(count($TorrentList) == 0) {
diff --git a/static/functions/browse.js b/static/functions/browse.js
index d1e885a5..0dee27a8 100644
--- a/static/functions/browse.js
+++ b/static/functions/browse.js
@@ -91,17 +91,18 @@ function toggle_group(groupid, link, event) {
clickedRow = clickedRow.parentNode;
}
var group_rows = clickedRow.parentNode.children;
- //var showing = has_class(nextElementSibling(clickedRow), 'hidden'); // nextElementSibling(clickedRow) is a .edition
var showing = $(clickedRow).nextElementSibling().has_class('hidden');
var allGroups = event.ctrlKey;
for (var i = 0; i < group_rows.length; i++) {
var row = $(group_rows[i]);
if (row.has_class('colhead_dark')) { continue; }
if (row.has_class('colhead')) { continue; }
- var relevantRow = row.has_class('group') ? row.nextElementSibling() : row;
+ var relevantRow = row.has_class('group') ? $(group_rows[i+1]) : row;
if (allGroups || relevantRow.has_class('groupid_' + groupid)) {
+ row = $(group_rows[i]); // idk why we need this :S
if (row.has_class('group')) {
- $('a.show_torrents_link', row).raw().title = (showing) ? 'Collapse this group' : 'Expand this group';
+ $('a.show_torrents_link', row.raw()).raw().title = (showing) ? 'Collapse this group' : 'Expand this group';
+ $('a.show_torrents_link', row.raw()).raw().parentNode.className = (showing) ? 'hide_torrents' : 'show_torrents';
} else {
if (showing) {
// show the row depending on whether the edition it's in is collapsed or not
@@ -135,7 +136,7 @@ function toggle_edition(groupid, editionid, lnk, event) {
var group_rows = $('tr.groupid_' + groupid);
for (var i = 0; i < group_rows.results(); i++) {
var row = $(group_rows.raw(i));
- if (row.has_class('edition') && (allEditions || row == clickedRow)) {
+ if (row.has_class('edition') && (allEditions || row.raw(0) == clickedRow)) {
$('a', row.raw()).raw().innerHTML = (showing) ? '−' : '+';
$('a', row.raw()).raw().title = (showing) ? 'Collapse this edition' : 'Expand this edition';
continue;
@@ -185,15 +186,3 @@ function ToggleEditionRows() {
$('#edition_label').toggle();
$('#edition_catalogue').toggle();
}
-
-
-function ToggleGroup(groupid) {
- var show = $('#showimg_' + groupid).has_class('show_torrents')
- if(show) {
- $('.groupid_' + groupid).show();
- $('#showimg_' + groupid).remove_class('show_torrents').add_class('hide_torrents');
- } else {
- $('.groupid_' + groupid).hide();
- $('#showimg_' + groupid).remove_class('hide_torrents').add_class('show_torrents');
- }
-}
diff --git a/static/functions/script_start.js b/static/functions/script_start.js
index fbc8133c..9481e328 100644
--- a/static/functions/script_start.js
+++ b/static/functions/script_start.js
@@ -259,7 +259,7 @@ util.fn = util.prototype = {
return this.objects[number];
},
nextElementSibling: function () {
- here = this.objects[0];
+ var here = this.objects[0];
if (here.nextElementSibling) {
return $(here.nextElementSibling);
}
@@ -269,7 +269,7 @@ util.fn = util.prototype = {
return $(here);
},
previousElementSibling: function () {
- here = this.objects[0];
+ var here = this.objects[0];
if (here.previousElementSibling) {
return $(here.previousElementSibling);
}
| | | | |