Browse Source

Show seeding/leeching indicators on collection views

spaghetti 3 years ago
parent
commit
2a055fee14
1 changed files with 7 additions and 42 deletions
  1. 7
    42
      sections/collages/torrent_collage.php

+ 7
- 42
sections/collages/torrent_collage.php View File

@@ -121,47 +121,10 @@ foreach ($GroupIDs as $GroupID) {
121 121
         </td>
122 122
       </tr>
123 123
 <?
124
-/*
125
-    $LastRemasterYear = '-';
126
-    $LastRemasterTitle = '';
127
-    $LastRemasterRecordLabel = '';
128
-    $LastRemasterCatalogueNumber = '';
129
-    $LastMedia = '';
130
-*/
131
-    $EditionID = 0;
132
-/*
133
-    unset($FirstUnknown);
134
-*/
135 124
     foreach ($Torrents as $TorrentID => $Torrent) {
136
-/*
137
-      if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
138
-        $FirstUnknown = !isset($FirstUnknown);
139
-      }
140
-*/
141 125
       $SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : '';
142
-/*
143
-      if ($Torrent['RemasterTitle'] != $LastRemasterTitle
144
-        || $Torrent['RemasterYear'] != $LastRemasterYear
145
-        || $Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel
146
-        || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber
147
-        || $FirstUnknown
148
-        || $Torrent['Media'] != $LastMedia
149
-      ) {
150
-        $EditionID++;
151
-?>
152
-      <tr class="group_torrent groupid_<?=$GroupID?> edition<?=$SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '')?>">
153
-        <td colspan="7" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" class="tooltip" title="Collapse this edition. Hold &quot;Ctrl&quot; while clicking to collapse all editions in this torrent group.">&minus;</a> <?=Torrents::edition_string($Torrent, $Group)?></strong></td>
154
-      </tr>
155
-<?
156
-      }
157
-      $LastRemasterTitle = $Torrent['RemasterTitle'];
158
-      $LastRemasterYear = $Torrent['RemasterYear'];
159
-      $LastRemasterRecordLabel = $Torrent['RemasterRecordLabel'];
160
-      $LastRemasterCatalogueNumber = $Torrent['RemasterCatalogueNumber'];
161
-      $LastMedia = $Torrent['Media'];
162
-      */
163 126
 ?>
164
-      <tr class="group_torrent torrent_row groupid_<?=$GroupID?> edition_<?=$EditionID?><?=$SnatchedTorrentClass . $SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '')?>">
127
+      <tr class="group_torrent torrent_row groupid_<?=$GroupID?> <?=$SnatchedTorrentClass . $SnatchedGroupClass . (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1 ? ' hidden' : '')?>">
165 128
         <td colspan="3">
166 129
           <span class="brackets">
167 130
             <a href="torrents.php?action=download&amp;id=<?=$TorrentID?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" class="tooltip" title="Download">DL</a>
@@ -185,10 +148,12 @@ foreach ($GroupIDs as $GroupID) {
185 148
     $TorrentID = key($Torrents);
186 149
     $Torrent = current($Torrents);
187 150
 
188
-    //$DisplayName = "<a href=\"torrents.php?id=$GroupID\" class=\"tooltip\" title=\"View torrent group\" dir=\"ltr\">$GroupName</a>";
189
-
190
-    if ($Torrent['IsSnatched']) {
191
-      $DisplayName .= ' ' . Format::torrent_label('Snatched!');
151
+    if ($Torrent['IsLeeching']) {
152
+      $DisplayName .= ' ' . Format::torrent_label('Leeching');
153
+    } else if ($Torrent['IsSeeding']) {
154
+      $DisplayName .= ' ' . Format::torrent_label('Seeding');
155
+    } else if ($Torrent['IsSnatched']) {
156
+      $DisplayName .= ' ' . Format::torrent_label('Snatched');
192 157
     }
193 158
     if ($Torrent['FreeTorrent'] == '1') {
194 159
       $DisplayName .= ' ' . Format::torrent_label('Freeleech!');

Loading…
Cancel
Save