Browse Source

AudioFormat → Version

biotorrents 4 years ago
parent
commit
b8779f3449

+ 5
- 7
classes/torrent_form.class.NEW.2020-12-10.php View File

@@ -48,7 +48,6 @@ class TorrentForm
48 48
 
49 49
     # Deprecated
50 50
     #public $Formats = [];
51
-    #public $AudioFormats = [];
52 51
     #public $Bitrates = [];
53 52
     #public $Platform = [];
54 53
 
@@ -64,7 +63,7 @@ class TorrentForm
64 63
     {
65 64
         # See classes/config.php
66 65
         global $UploadForm, $Categories, $TorrentID, $SeqPlatforms, $GraphPlatforms, $ImgPlatforms, $DocPlatforms, $RawPlatforms, $SeqFormats, $ProtFormats, $GraphXmlFormats, $GraphTxtFormats, $ImgFormats, $MapVectorFormats, $MapRasterFormats, $BinDocFormats, $CpuGenFormats, $PlainFormats, $Codecs, $Archives, $Resolutions;
67
-        #global $UploadForm, $Categories, $Formats, $Bitrates, $Media, $MediaManga, $TorrentID, $Containers, $ContainersGames, $Codecs, $Resolutions, $AudioFormats, $Platform, $Archives, $ArchivesManga;
66
+        #global $UploadForm, $Categories, $Formats, $Bitrates, $Media, $MediaManga, $TorrentID, $Containers, $ContainersGames, $Codecs, $Resolutions, $Platform, $Archives, $ArchivesManga;
68 67
 
69 68
         # Gazelle
70 69
         $this->NewTorrent = $NewTorrent;
@@ -110,7 +109,6 @@ class TorrentForm
110 109
         # Deprecated
111 110
         #$this->ArchivesManga = $ArchivesManga;
112 111
         #$this->Formats = $Formats;
113
-        #$this->AudioFormats = $AudioFormats;
114 112
         #$this->Bitrates = $Bitrates;
115 113
         #$this->Platform = $Platform;
116 114
 
@@ -620,21 +618,21 @@ HTML;
620 618
          * Semantic Version
621 619
          */
622 620
         
623
-        $AudioFormat = display_str($Torrent['AudioFormat']);
621
+        $Version = display_str($Torrent['Version']);
624 622
         echo <<<HTML
625 623
         <tr id="audio_tr">
626 624
           <td>
627
-            <label for="audioformat">
625
+            <label for="version">
628 626
               Version
629 627
             </label>
630 628
           </td>
631 629
 
632 630
           <td>
633 631
             <input type="text"
634
-              id="audioformat" name="audioformat"
632
+              id="version" name="version"
635 633
               size="12" pattern="\d+\.*\d*\.*\d*"
636 634
               placeholder="Start with 0.1.0"
637
-              value="$AudioFormat" />
635
+              value="$Version" />
638 636
             
639 637
             <p>
640 638
               Please see

+ 6
- 7
classes/torrent_form.class.php View File

@@ -48,7 +48,7 @@ class TorrentForm
48 48
 
49 49
     # Deprecated
50 50
     #public $Formats = [];
51
-    #public $AudioFormats = [];
51
+    #public $Versions = [];
52 52
     #public $Bitrates = [];
53 53
     #public $Platform = [];
54 54
 
@@ -64,7 +64,7 @@ class TorrentForm
64 64
     {
65 65
         # See classes/config.php
66 66
         global $UploadForm, $Categories, $TorrentID, $SeqPlatforms, $GraphPlatforms, $ImgPlatforms, $DocPlatforms, $RawPlatforms, $SeqFormats, $ProtFormats, $GraphXmlFormats, $GraphTxtFormats, $ImgFormats, $MapVectorFormats, $MapRasterFormats, $BinDocFormats, $CpuGenFormats, $PlainFormats, $Codecs, $Archives, $Resolutions;
67
-        #global $UploadForm, $Categories, $Formats, $Bitrates, $Media, $MediaManga, $TorrentID, $Containers, $ContainersGames, $Codecs, $Resolutions, $AudioFormats, $Platform, $Archives, $ArchivesManga;
67
+        #global $UploadForm, $Categories, $Formats, $Bitrates, $Media, $MediaManga, $TorrentID, $Containers, $ContainersGames, $Codecs, $Resolutions, $Platform, $Archives, $ArchivesManga;
68 68
 
69 69
         # Gazelle
70 70
         $this->NewTorrent = $NewTorrent;
@@ -110,7 +110,6 @@ class TorrentForm
110 110
         # Deprecated
111 111
         #$this->ArchivesManga = $ArchivesManga;
112 112
         #$this->Formats = $Formats;
113
-        #$this->AudioFormats = $AudioFormats;
114 113
         #$this->Bitrates = $Bitrates;
115 114
         #$this->Platform = $Platform;
116 115
 
@@ -604,21 +603,21 @@ HTML;
604 603
          * Semantic Version
605 604
          */
606 605
         
607
-        $AudioFormat = display_str($Torrent['AudioFormat']);
606
+        $Version = display_str($Torrent['Version']);
608 607
         echo <<<HTML
609 608
         <tr id="audio_tr">
610 609
           <td>
611
-            <label for="audioformat">
610
+            <label for="version">
612 611
               Version
613 612
             </label>
614 613
           </td>
615 614
 
616 615
           <td>
617 616
             <input type="text"
618
-              id="audioformat" name="audioformat"
617
+              id="version" name="version"
619 618
               size="12" pattern="\d+\.*\d*\.*\d*"
620 619
               placeholder="Start with 0.1.0"
621
-              value="$AudioFormat" />
620
+              value="$Version" />
622 621
             
623 622
             <p>
624 623
               Please see

+ 5
- 5
classes/torrents.class.php View File

@@ -100,7 +100,7 @@ class Torrents
100 100
                 $QueryID = G::$DB->get_query_id();
101 101
                 G::$DB->query("
102 102
                   SELECT
103
-                  ID, GroupID, Media, Container, Codec, Resolution, AudioFormat,
103
+                  ID, GroupID, Media, Container, Codec, Resolution, Version,
104 104
                     Censored, Archive, FileCount, FreeTorrent,
105 105
                     Size, Leechers, Seeders, Snatched, Time, f.ExpiryTime, ID AS HasFile,
106 106
                     FreeLeechType, hex(info_hash) as info_hash
@@ -515,12 +515,12 @@ class Torrents
515 515
         REPLACE INTO sphinx_delta
516 516
           (ID, GroupID, GroupName, GroupTitle2, GroupNameJP, TagList, Year, CatalogueNumber, CategoryID, Time,
517 517
           Size, Snatched, Seeders, Leechers, Censored, Studio, Series,
518
-          FreeTorrent, Media, Container, Codec, Resolution, AudioFormat, Description,
518
+          FreeTorrent, Media, Container, Codec, Resolution, Version, Description,
519 519
           FileList, ArtistName)
520 520
         SELECT
521 521
           t.ID, g.ID, Name, Title2, NameJP, TagList, Year, CatalogueNumber, CategoryID, UNIX_TIMESTAMP(t.Time),
522 522
           Size, Snatched, Seeders, Leechers, Censored, Studio, Series,
523
-          CAST(FreeTorrent AS CHAR), Media, Container, Codec, Resolution, AudioFormat, Description,
523
+          CAST(FreeTorrent AS CHAR), Media, Container, Codec, Resolution, Version, Description,
524 524
           REPLACE(REPLACE(FileList, '_', ' '), '/', ' ') AS FileList, ?
525 525
         FROM torrents AS t
526 526
           JOIN torrents_group AS g ON g.ID = t.GroupID
@@ -716,8 +716,8 @@ class Torrents
716 716
         }
717 717
 
718 718
         /*
719
-        if (!empty($Data['AudioFormat'])) {
720
-          $Info[] = $Data['AudioFormat'];
719
+        if (!empty($Data['Version'])) {
720
+          $Info[] = $Data['Version'];
721 721
         }
722 722
         */
723 723
 

+ 2
- 2
classes/torrentsearch.class.php View File

@@ -53,7 +53,7 @@ class TorrentSearch
53 53
     // List of fields that can be used for fulltext searches
54 54
     private static $Fields = [
55 55
         'artistname' => 1, # Author
56
-        'audioformat' => 1, # Version
56
+        'Version' => 1, # Version
57 57
         'cataloguenumber' => 1, # Accession Number
58 58
         'numbers' => 1, # Combined &uarr;
59 59
         'codec' => 1, # License
@@ -89,7 +89,7 @@ class TorrentSearch
89 89
         # todo: Keep testing the granularity of filter combos
90 90
         'searchstr' => '*',
91 91
         'advgroupname' => '*', # todo: Fix this ;)
92
-        'numbers' => '(cataloguenumber,audioformat)',
92
+        'numbers' => '(cataloguenumber,version)',
93 93
         'location' => '(studio,series)',
94 94
         #'searchstr' => '(groupname,GroupTitle2,groupnamejp,artistname,studio,series,cataloguenumber,yearfulltext)',
95 95
         #'advgroupname' => '(groupname,GroupTitle2,groupnamejp)',

+ 4
- 4
gazelle.sql View File

@@ -878,7 +878,7 @@ CREATE TABLE `sphinx_delta` (
878 878
   `Container` varchar(255) DEFAULT NULL,
879 879
   `Codec` varchar(255) DEFAULT NULL,
880 880
   `Resolution` varchar(255) DEFAULT NULL,
881
-  `AudioFormat` varchar(255) DEFAULT NULL,
881
+  `Version` varchar(255) DEFAULT NULL,
882 882
   `Studio` varchar(100) DEFAULT NULL, -- todo: 100 vs. 255?
883 883
   `Series` varchar(100) DEFAULT NULL, -- todo
884 884
   `Censored` tinyint NOT NULL DEFAULT '1',
@@ -972,7 +972,7 @@ CREATE TABLE `sphinx_t` (
972 972
   `container` varchar(25) NOT NULL,
973 973
   `resolution` varchar(25) NOT NULL,
974 974
   `codec` varchar(25) NOT NULL,
975
-  `audioformat` varchar(25) NOT NULL,
975
+  `Version` varchar(25) NOT NULL,
976 976
   `filelist` mediumtext,
977 977
   `description` text,
978 978
   `censored` tinyint NOT NULL,
@@ -1112,7 +1112,7 @@ CREATE TABLE `torrents` (
1112 1112
   `Container` varchar(25) DEFAULT NULL,
1113 1113
   `Codec` varchar(25) DEFAULT NULL,
1114 1114
   `Resolution` varchar(25) DEFAULT NULL,
1115
-  `AudioFormat` varchar(10) DEFAULT NULL,
1115
+  `Version` varchar(10) DEFAULT NULL,
1116 1116
   `Censored` tinyint NOT NULL DEFAULT '1',
1117 1117
   `Anonymous` tinyint NOT NULL DEFAULT '0',
1118 1118
   `info_hash` blob NOT NULL,
@@ -1139,7 +1139,7 @@ CREATE TABLE `torrents` (
1139 1139
   KEY `Container` (`Container`),
1140 1140
   KEY `Codec` (`Codec`),
1141 1141
   KEY `Resolution` (`Resolution`),
1142
-  KEY `AudioFormat` (`AudioFormat`),
1142
+  KEY `Version` (`Version`),
1143 1143
   KEY `FileCount` (`FileCount`),
1144 1144
   KEY `Size` (`Size`),
1145 1145
   KEY `Seeders` (`Seeders`),

+ 0
- 1
sections/torrents/browse.php View File

@@ -197,7 +197,6 @@ View::show_header('Browse Torrents', 'browse');
197 197
           <tr id="numbers" class="ftr_advanced<?=$HideAdvanced?>">
198 198
             <td class="label">
199 199
               <!--
200
-                Catalogue Number / AudioFormat
201 200
                 Accession Number / Version
202 201
               -->
203 202
             </td>

+ 4
- 4
sections/torrents/details.php View File

@@ -432,7 +432,7 @@ function filelist($Str)
432 432
 
433 433
 # FreeTorrent is a string
434 434
 foreach ($TorrentList as $Torrent) {
435
-    list($TorrentID, $Media, $Container, $Codec, $Resolution, $AudioFormat,
435
+    list($TorrentID, $Media, $Container, $Codec, $Resolution, $Version,
436 436
     $Censored, $Anonymous, $Archive, $FileCount, $Size, $Seeders, $Leechers,
437 437
     $Snatched, $FreeTorrent, $FreeLeechType, $TorrentTime, $Description, $FileList,
438 438
     $FilePath, $UserID, $LastActive, $InfoHash, $BadTags, $BadFolders, $BadFiles,
@@ -540,9 +540,9 @@ foreach ($TorrentList as $Torrent) {
540 540
     }
541 541
 
542 542
     /*
543
-    if ($AudioFormat) {
544
-        $ExtraInfo.=$AddExtra.display_str($AudioFormat);
545
-        $ExtraInfo .= $AddExtra.'<x style="tooltip" title="Accession Number">'.display_str($AudioFormat).'</x>';
543
+    if ($Version) {
544
+        $ExtraInfo.=$AddExtra.display_str($Version);
545
+        $ExtraInfo .= $AddExtra.'<x style="tooltip" title="Accession Number">'.display_str($Version).'</x>';
546 546
     }
547 547
     */
548 548
 

+ 1
- 1
sections/torrents/download.php View File

@@ -69,7 +69,7 @@ if (!is_array($Info) || !array_key_exists('PlainArtists', $Info) || empty($Info[
69 69
     $DB->query("
70 70
       SELECT
71 71
         t.Media,
72
-        t.AudioFormat,
72
+        t.Version,
73 73
         t.Codec,
74 74
         tg.Year,
75 75
         tg.ID AS GroupID,

+ 1
- 1
sections/torrents/edit.php View File

@@ -24,7 +24,7 @@ SELECT
24 24
   t.`Container`,
25 25
   t.`Codec`,
26 26
   t.`Resolution`,
27
-  t.`AudioFormat`,
27
+  t.`Version`,
28 28
   t.`Censored`,
29 29
   t.`Anonymous`,
30 30
   t.`Archive`,

+ 2
- 2
sections/torrents/functions.php View File

@@ -101,7 +101,7 @@ function get_group_info($GroupID, $Return = true, $RevisionID = 0, $PersonalProp
101 101
           t.Container,
102 102
           t.Codec,
103 103
           t.Resolution,
104
-          t.AudioFormat,
104
+          t.Version,
105 105
           t.Censored,
106 106
           t.Anonymous,
107 107
           t.Archive,
@@ -297,7 +297,7 @@ function build_torrents_table($Cache, $DB, $LoggedUser, $GroupID, $GroupName, $G
297 297
 
298 298
     $EditionID = 0;
299 299
     foreach ($TorrentList as $Torrent) {
300
-        list($TorrentID, $Media, $Container, $Codec, $Resolution, $AudioFormat,
300
+        list($TorrentID, $Media, $Container, $Codec, $Resolution, $Version,
301 301
   $Censored, $Anonymous, $Archive, $FileCount, $Size, $Seeders, $Leechers, $Snatched,
302 302
   $FreeTorrent, $FreeLeechType, $TorrentTime, $Description, $FileList, $FilePath, $UserID,
303 303
   $LastActive, $InfoHash, $BadTags, $BadFolders, $BadFiles, $LastReseedRequest,

+ 3
- 3
sections/torrents/grouplog.php View File

@@ -46,16 +46,16 @@ if (!empty($Groups[$GroupID])) {
46 46
 <?
47 47
       if ($TorrentID != 0) {
48 48
         $DB->query("
49
-          SELECT Container, AudioFormat, Media
49
+          SELECT Container, Version, Media
50 50
           FROM torrents
51 51
           WHERE ID = $TorrentID");
52
-        list($Container, $AudioFormat, $Media) = $DB->next_record();
52
+        list($Container, $Version, $Media) = $DB->next_record();
53 53
         if (!$DB->has_results()) { ?>
54 54
           <td><a href="torrents.php?torrentid=<?=$TorrentID?>"><?=$TorrentID?></a> (Deleted)</td><?
55 55
         } elseif ($Media == '') { ?>
56 56
           <td><a href="torrents.php?torrentid=<?=$TorrentID?>"><?=$TorrentID?></a></td><?
57 57
         } else { ?>
58
-          <td><a href="torrents.php?torrentid=<?=$TorrentID?>"><?=$TorrentID?></a> (<?=$Container?>/<?=$AudioFormat?>/<?=$Media?>)</td>
58
+          <td><a href="torrents.php?torrentid=<?=$TorrentID?>"><?=$TorrentID?></a> (<?=$Container?>/<?=$Version?>/<?=$Media?>)</td>
59 59
 <?php }
60 60
       } else { ?>
61 61
         <td></td>

+ 1
- 1
sections/torrents/redownload.php View File

@@ -60,7 +60,7 @@ $DownloadsQ = $DB->query("
60 60
     t.Container,
61 61
     t.Codec,
62 62
     t.Resolution,
63
-    t.AudioFormat,
63
+    t.Version,
64 64
     tg.Year,
65 65
     tg.Name,
66 66
     t.Size

+ 3
- 3
sections/torrents/takeedit.php View File

@@ -51,7 +51,7 @@ $Properties['Name'] = $_POST['title'];
51 51
 $Properties['Container'] = $_POST['container'];
52 52
 $Properties['Codec'] = $_POST['codec'];
53 53
 $Properties['Resolution'] = $_POST['resolution'];
54
-$Properties['AudioFormat'] = $_POST['audioformat'];
54
+$Properties['Version'] = $_POST['version'];
55 55
 $Properties['Censored'] = (isset($_POST['censored'])) ? '1' : '0';
56 56
 $Properties['Anonymous'] = (isset($_POST['anonymous'])) ? '1' : '0';
57 57
 $Properties['Archive'] = (isset($_POST['archive']) && $_POST['archive'] != '---') ? $_POST['archive'] : '';
@@ -260,7 +260,7 @@ $T['Anonymous'] = $Properties['Anonymous'];
260 260
 
261 261
 $DBTorVals = [];
262 262
 $DB->query("
263
-  SELECT Media, Container, Codec, Resolution, AudioFormat, Description, Censored, Anonymous, Archive
263
+  SELECT Media, Container, Codec, Resolution, Version, Description, Censored, Anonymous, Archive
264 264
   FROM torrents
265 265
   WHERE ID = $TorrentID");
266 266
 
@@ -313,7 +313,7 @@ $SQL = "
313 313
     Container = $T[Container],
314 314
     Codec = $T[Codec],
315 315
     Resolution = $T[Resolution],
316
-    AudioFormat = $T[AudioFormat],
316
+    Version = $T[Version],
317 317
     Archive = $T[Archive],
318 318
     Censored = $T[Censored],
319 319
     Anonymous = $T[Anonymous],";

+ 2
- 3
sections/torrents/user.php View File

@@ -77,9 +77,8 @@ if (isset($_GET['codec'])
77 77
     $SearchWhere[] = "t.Codec = '".db_string($_GET['codec'])."'";
78 78
 }
79 79
 
80
-if (isset($_GET['audioformat'])
81
- && in_array($_GET['audioformat'], $AudioFormats)) {
82
-    $SearchWhere[] = "t.AudioFormat = '".db_string($_GET['audioformat'])."'";
80
+if (isset($_GET['version']) {
81
+    $SearchWhere[] = "t.Version = '".db_string($_GET['version'])."'";
83 82
 }
84 83
 
85 84
 if (isset($_GET['resolution'])

+ 5
- 5
sections/upload/upload_handle.php View File

@@ -55,7 +55,7 @@ if (!($_POST['resolution'] ?? false)) {
55 55
 }
56 56
 
57 57
 $Properties['Resolution'] = $_POST['resolution'] ?? '';
58
-$Properties['AudioFormat'] = $_POST['audioformat'] ?? '';
58
+$Properties['Version'] = $_POST['version'] ?? '';
59 59
 $Properties['Censored'] = (isset($_POST['censored'])) ? '1' : '0';
60 60
 $Properties['Anonymous'] = (isset($_POST['anonymous'])) ? '1' : '0';
61 61
 $Properties['Archive'] = (isset($_POST['archive']) && $_POST['archive'] !== '---') ? $_POST['archive'] : '';
@@ -164,9 +164,9 @@ default:
164 164
             array('maxlength' => 50, 'minlength' => 0)
165 165
         );
166 166
 
167
-        # torrents.AudioFormat
167
+        # torrents.Version
168 168
         $Validate->SetFields(
169
-            'audioformat',
169
+            'version',
170 170
             '0',
171 171
             'string',
172 172
             'Version must be between 0 and 10 characters.',
@@ -714,7 +714,7 @@ $DB->query(
714 714
     "
715 715
   INSERT INTO torrents
716 716
     (GroupID, UserID, Media, Container, Codec, Resolution,
717
-    AudioFormat, Censored,
717
+    Version, Censored,
718 718
     Anonymous, Archive, info_hash, FileCount, FileList, FilePath, Size, Time,
719 719
     Description, FreeTorrent, FreeLeechType)
720 720
   VALUES
@@ -728,7 +728,7 @@ $DB->query(
728 728
     $T['Container'],
729 729
     $T['Codec'],
730 730
     $T['Resolution'],
731
-    $T['AudioFormat'],
731
+    $T['Version'],
732 732
     $T['Censored'],
733 733
     $T['Anonymous'],
734 734
     $T['Archive'],

Loading…
Cancel
Save