Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
docs(Database): Add miss table subtitles
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhilip committed Aug 9, 2019
1 parent ddc474f commit 29d7fa0
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
8 changes: 4 additions & 4 deletions apps/models/form/Torrents/UploadForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

namespace apps\models\form\Torrents;

use apps\models\Torrent;

use Rid\Validators\Validator;

use Rid\Bencode\Bencode;
Expand Down Expand Up @@ -109,11 +107,11 @@ public static function inputRules()

// Add Quality Valid
foreach (app()->site::getQualityTableList() as $quality => $title) {
$quality_id_list = [0];
$quality_id_list = [];
// IF enabled this quality field , then load it value list from setting
// Else we just allow the default value 0 to prevent cheating
if (config('torrent_upload.enable_quality_' . $quality)) {
$quality_id_list += array_map(function ($cat) {
$quality_id_list = array_map(function ($cat) {
return $cat['id'];
}, app()->site::ruleQuality($quality));
}
Expand Down Expand Up @@ -151,6 +149,8 @@ public static function inputRules()
];
}

print_r($rules);

return $rules;
}

Expand Down
31 changes: 30 additions & 1 deletion migration/ridpt.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 07, 2019 at 09:26 AM
-- Generation Time: Aug 09, 2019 at 10:44 PM
-- Server version: 8.0.16
-- PHP Version: 7.3.7

Expand Down Expand Up @@ -746,6 +746,7 @@ INSERT INTO `site_config` (`name`, `value`) VALUES
('authority.invite_recycle_other_pending', '90'),
('authority.invite_recycle_self_pending', '70'),
('authority.manage_news', '80'),
('authority.manage_subtitles', '80'),
('authority.pass_invite_interval_check', '60'),
('authority.pass_tracker_upspeed_check', '60'),
('authority.see_anonymous_uploader', '40'),
Expand Down Expand Up @@ -847,6 +848,7 @@ INSERT INTO `site_config` (`name`, `value`) VALUES
('tracker.user_max_leech', '1'),
('tracker.user_max_seed', '3'),
('upload.max_nfo_file_size', '65535'),
('upload.max_subtitle_file_size', '10485760'),
('upload.max_torrent_file_size', '3145728'),
('user.avatar_provider', 'gravatar');

Expand Down Expand Up @@ -950,6 +952,33 @@ CREATE TABLE IF NOT EXISTS `snatched` (

-- --------------------------------------------------------

--
-- Table structure for table `subtitles`
--

DROP TABLE IF EXISTS `subtitles`;
CREATE TABLE IF NOT EXISTS `subtitles` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`torrent_id` int(11) UNSIGNED NOT NULL,
`hashs` varchar(32) NOT NULL DEFAULT '',
`title` varchar(255) NOT NULL DEFAULT '',
`filename` varchar(255) NOT NULL DEFAULT '',
`added_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`size` bigint(20) UNSIGNED NOT NULL DEFAULT '0',
`uppd_by` int(11) UNSIGNED NOT NULL,
`anonymous` tinyint(1) NOT NULL DEFAULT '0',
`hits` mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
`ext` varchar(10) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
UNIQUE KEY `hashs` (`hashs`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- RELATIONSHIPS FOR TABLE `subtitles`:
--

-- --------------------------------------------------------

--
-- Table structure for table `tags`
--
Expand Down

0 comments on commit 29d7fa0

Please sign in to comment.