Browse Source

Fix RSS categories

spaghetti 8 years ago
parent
commit
e089b33126
2 changed files with 16 additions and 79 deletions
  1. 15
    43
      sections/feeds/index.php
  2. 1
    36
      sections/upload/upload_handle.php

+ 15
- 43
sections/feeds/index.php View File

@@ -126,53 +126,25 @@ switch ($_GET['feed']) {
126 126
     $Feed->channel('All Torrents', 'RSS feed for all new torrent uploads.');
127 127
     $Feed->retrieve('torrents_all', $_GET['authkey'], $_GET['passkey']);
128 128
     break;
129
-  case 'torrents_music':
130
-    $Feed->channel('Music Torrents', 'RSS feed for all new music torrents.');
131
-    $Feed->retrieve('torrents_music', $_GET['authkey'], $_GET['passkey']);
129
+  case 'torrents_movies':
130
+    $Feed->channel('Movie Torrents', 'RSS feed for all new music torrents.');
131
+    $Feed->retrieve('torrents_movies', $_GET['authkey'], $_GET['passkey']);
132 132
     break;
133
-  case 'torrents_apps':
134
-    $Feed->channel('Application Torrents', 'RSS feed for all new application torrents.');
135
-    $Feed->retrieve('torrents_apps', $_GET['authkey'], $_GET['passkey']);
133
+  case 'torrents_anime':
134
+    $Feed->channel('Anime Torrents', 'RSS feed for all new application torrents.');
135
+    $Feed->retrieve('torrents_anime', $_GET['authkey'], $_GET['passkey']);
136 136
     break;
137
-  case 'torrents_ebooks':
138
-    $Feed->channel('E-Book Torrents', 'RSS feed for all new e-book torrents.');
139
-    $Feed->retrieve('torrents_ebooks', $_GET['authkey'], $_GET['passkey']);
137
+  case 'torrents_manga':
138
+    $Feed->channel('Manga Torrents', 'RSS feed for all new e-book torrents.');
139
+    $Feed->retrieve('torrents_manga', $_GET['authkey'], $_GET['passkey']);
140 140
     break;
141
-  case 'torrents_abooks':
142
-    $Feed->channel('Audiobook Torrents', 'RSS feed for all new audiobook torrents.');
143
-    $Feed->retrieve('torrents_abooks', $_GET['authkey'], $_GET['passkey']);
141
+  case 'torrents_games':
142
+    $Feed->channel('Game Torrents', 'RSS feed for all new audiobook torrents.');
143
+    $Feed->retrieve('torrents_games', $_GET['authkey'], $_GET['passkey']);
144 144
     break;
145
-  case 'torrents_evids':
146
-    $Feed->channel('E-Learning Video Torrents', 'RSS feed for all new e-learning video torrents.');
147
-    $Feed->retrieve('torrents_evids', $_GET['authkey'], $_GET['passkey']);
148
-    break;
149
-  case 'torrents_comedy':
150
-    $Feed->channel('Comedy Torrents', 'RSS feed for all new comedy torrents.');
151
-    $Feed->retrieve('torrents_comedy', $_GET['authkey'], $_GET['passkey']);
152
-    break;
153
-  case 'torrents_comics':
154
-    $Feed->channel('Comic Torrents', 'RSS feed for all new comic torrents.');
155
-    $Feed->retrieve('torrents_comics', $_GET['authkey'], $_GET['passkey']);
156
-    break;
157
-  case 'torrents_mp3':
158
-    $Feed->channel('MP3 Torrents', 'RSS feed for all new mp3 torrents.');
159
-    $Feed->retrieve('torrents_mp3', $_GET['authkey'], $_GET['passkey']);
160
-    break;
161
-  case 'torrents_flac':
162
-    $Feed->channel('FLAC Torrents', 'RSS feed for all new FLAC torrents.');
163
-    $Feed->retrieve('torrents_flac', $_GET['authkey'], $_GET['passkey']);
164
-    break;
165
-  case 'torrents_vinyl':
166
-    $Feed->channel('Vinyl Sourced Torrents', 'RSS feed for all new vinyl sourced torrents.');
167
-    $Feed->retrieve('torrents_vinyl', $_GET['authkey'], $_GET['passkey']);
168
-    break;
169
-  case 'torrents_lossless':
170
-    $Feed->channel('Lossless Torrents', 'RSS feed for all new lossless uploads.');
171
-    $Feed->retrieve('torrents_lossless', $_GET['authkey'], $_GET['passkey']);
172
-    break;
173
-  case 'torrents_lossless24':
174
-    $Feed->channel('24bit Lossless Torrents', 'RSS feed for all new 24bit uploads.');
175
-    $Feed->retrieve('torrents_lossless24', $_GET['authkey'], $_GET['passkey']);
145
+  case 'torrents_other':
146
+    $Feed->channel('Other Torrents', 'RSS feed for all new e-learning video torrents.');
147
+    $Feed->retrieve('torrents_other', $_GET['authkey'], $_GET['passkey']);
176 148
     break;
177 149
   default:
178 150
     // Personalized torrents

+ 1
- 36
sections/upload/upload_handle.php View File

@@ -918,43 +918,8 @@ while (list($UserID, $Passkey) = $DB->next_record()) {
918 918
 }
919 919
 
920 920
 $Feed->populate('torrents_all', $Item);
921
+$Feed->populate('torrents_'.strtolower($Type), $Item);
921 922
 $Debug->set_flag('upload: notifications handled');
922
-if ($Type == 'Music') {
923
-  $Feed->populate('torrents_music', $Item);
924
-  if ($Properties['Media'] == 'Vinyl') {
925
-    $Feed->populate('torrents_vinyl', $Item);
926
-  }
927
-  if ($Properties['Bitrate'] == 'Lossless') {
928
-    $Feed->populate('torrents_lossless', $Item);
929
-  }
930
-  if ($Properties['Bitrate'] == '24bit Lossless') {
931
-    $Feed->populate('torrents_lossless24', $Item);
932
-  }
933
-  if ($Properties['Format'] == 'MP3') {
934
-    $Feed->populate('torrents_mp3', $Item);
935
-  }
936
-  if ($Properties['Format'] == 'FLAC') {
937
-    $Feed->populate('torrents_flac', $Item);
938
-  }
939
-}
940
-if ($Type == 'Applications') {
941
-  $Feed->populate('torrents_apps', $Item);
942
-}
943
-if ($Type == 'E-Books') {
944
-  $Feed->populate('torrents_ebooks', $Item);
945
-}
946
-if ($Type == 'Audiobooks') {
947
-  $Feed->populate('torrents_abooks', $Item);
948
-}
949
-if ($Type == 'E-Learning Videos') {
950
-  $Feed->populate('torrents_evids', $Item);
951
-}
952
-if ($Type == 'Comedy') {
953
-  $Feed->populate('torrents_comedy', $Item);
954
-}
955
-if ($Type == 'Comics') {
956
-  $Feed->populate('torrents_comics', $Item);
957
-}
958 923
 
959 924
 // Clear cache
960 925
 $Cache->delete_value("torrents_details_$GroupID");

Loading…
Cancel
Save