API: torrents upload/list

This commit is contained in:
xiaomlove
2025-04-17 01:39:40 +07:00
parent 0d3a46231d
commit 2b029eba10
72 changed files with 2332 additions and 507 deletions
+1
View File
@@ -26,6 +26,7 @@ return [
\App\Models\BonusLogs::BUSINESS_TYPE_TORRENT_BE_DOWNLOADED => 'Torrent be downloaded',
\App\Models\BonusLogs::BUSINESS_TYPE_RECEIVE_REWARD => 'Receive reward',
\App\Models\BonusLogs::BUSINESS_TYPE_RECEIVE_GIFT => 'Receive gift',
\App\Models\BonusLogs::BUSINESS_TYPE_UPLOAD_TORRENT => 'Upload torrent',
],
'fields' => [
'business_type' => 'Business type',
+6 -4
View File
@@ -1,6 +1,8 @@
<?php
return [
"label" => "Access token",
"permission" => "Permission",
];
return array (
'label' => 'Access Token',
'permission' => 'Permissions',
'maximum_allow_number_reached' => 'The number reaches the upper limit',
'create_success_tip' => 'The token was created successfully, this data is displayed only once, please save it properly<br/><br/>:token',
);
+68
View File
@@ -0,0 +1,68 @@
<?php
return array (
'invalid_price' => 'Invalid price: :price',
'invalid_category' => 'Invalid type',
'invalid_section' => 'Invalid section',
'invalid_hr' => 'Invalid H&R value',
'invalid_pos_state' => 'Invalid position: :pos_state',
'invalid_pos_state_until' => 'Invalid position deadline',
'not_supported_sub_category_field' => 'Unsupported subcategory fields: :field',
'invalid_sub_category_value' => 'Subcategory field: :label(:field) value: :value invalid',
'invalid_tag' => 'Invalid tag::tag',
'invalid_pick_type' => 'Invalid recommendation::pick_type',
'require_name' => 'The title cannot be empty',
'price_too_much' => 'Price exceeds the allowable range',
'approval_deny_reach_upper_limit' => 'The number of torrent rejected for the current review: %s reaches the upper limit and publishing is not allowed.',
'special_section_not_enabled' => 'Special zone is not enabled.',
'paid_torrent_not_enabled' => 'The paid torrent is not enabled.',
'no_permission_to_set_torrent_hr' => 'No permission to set torrent H&R.',
'no_permission_to_set_torrent_pos_state' => 'There is no permission to set torrent top.',
'no_permission_to_set_torrent_price' => 'No permission to set torrent charges.',
'no_permission_to_pick_torrent' => 'No permission to recommend videos.',
'no_permission_to_be_anonymous' => 'No permission to publish anonymously.',
'torrent_save_dir_not_exists' => 'The torrent save directory does not exist.',
'torrent_save_dir_not_writable' => 'The torrent save directory is not writable.',
'save_torrent_file_failed' => 'Saving the torrent file failed.',
'upload_failed' => 'Upload failed!',
'missing_form_data' => 'Please fill in the required items',
'missing_torrent_file' => 'Missing torrent file',
'empty_filename' => 'The file name cannot be empty!',
'zero_byte_nfo' => 'NFO file is empty',
'nfo_too_big' => 'The NFO file is too large! Maximum allowable by 65,535 bytes.',
'nfo_upload_failed' => 'NFO file upload failed',
'blank_description' => 'You must fill in the introduction!',
'category_unselected' => 'You have to choose the type!',
'invalid_filename' => 'Invalid file name!',
'filename_not_torrent' => 'Invalid file name (not .torrent file).',
'empty_file' => 'Empty file!',
'not_bencoded_file' => 'What the hell are you doing? What you uploaded is not a Bencode file!',
'not_a_dictionary' => 'Not a directory',
'dictionary_is_missing_key' => 'Directory missing value',
'invalid_entry_in_dictionary' => 'Invalid directory entry',
'invalid_dictionary_entry_type' => 'Invalid directory item type',
'invalid_pieces' => 'Invalid file block',
'missing_length_and_files' => 'Missing length and file',
'filename_errors' => 'Error file name',
'uploaded_not_offered' => 'You can only upload torrent that pass the candidate. Please return to select the appropriate project in <b>your candidate</b> before uploading!',
'unauthorized_upload_freely' => 'You do not have the permission to upload freely!',
'torrent_existed' => 'The torrent already exists!id: :id',
'torrent_file_too_big' => 'The torrent file is too large! Maximum allowable',
'remake_torrent_note' => 'bytes. Please re-create the torrent file with a larger block size, or split the content into multiple torrent to publish.',
'email_notification_body' => 'Hello,
A new torrent has been uploaded.
Name::name
Size::size
Type::category
Uploader::upload_by
Introduction:
:description
View more detailed information and download it (you may need to log in), please click here: <b><a href=javascript:void(null) onclick=window.open(\':torrent_url\')>here</a></b>
:torrent_url
:site_name Website',
'email_notification_subject' => ':site_name New torrent notification',
);
+1
View File
@@ -28,6 +28,7 @@ return [
\App\Models\BonusLogs::BUSINESS_TYPE_TORRENT_BE_DOWNLOADED => '种子被下载',
\App\Models\BonusLogs::BUSINESS_TYPE_RECEIVE_REWARD => '收到奖励',
\App\Models\BonusLogs::BUSINESS_TYPE_RECEIVE_GIFT => '收到礼物',
\App\Models\BonusLogs::BUSINESS_TYPE_UPLOAD_TORRENT => '发布种子',
],
'fields' => [
'business_type' => '业务类型',
+8
View File
@@ -223,4 +223,12 @@ return [
'text' => '获取种子列表',
'desc' => '获取种子列表',
],
'torrent:view' => [
'text' => '查看种子详情',
'desc' => '查看种子详情',
],
'user:view' => [
'text' => '查看用户基本信息',
'desc' => '查看用户基本信息',
],
];
+2
View File
@@ -3,4 +3,6 @@
return [
"label" => "访问令牌",
"permission" => "权限",
"maximum_allow_number_reached" => "数量达到上限",
"create_success_tip" => "token 创建成功,此数据只展示一次,请妥善保存<br/><br/>:token",
];
+56
View File
@@ -0,0 +1,56 @@
<?php
return [
'invalid_price' => '无效的价格::price',
'invalid_category' => '无效的分类',
'invalid_section' => '无效的分区',
'invalid_hr' => '无效的 H&R 值',
'invalid_pos_state' => '无效的位置::pos_state',
'invalid_pos_state_until' => '无效的位置截止时间',
'not_supported_sub_category_field' => '不支持的子分类字段::field',
'invalid_sub_category_value' => '子分类字段::label(:field) 的值::value 无效',
'invalid_tag' => '无效的标签::tag',
'invalid_pick_type' => '无效的推荐::pick_type',
'require_name' => '标题不能为空',
'price_too_much' => '价格超过允许范围',
'approval_deny_reach_upper_limit' => '当前审核被拒绝的种子数:%s 达到上限,不允许发布。',
'special_section_not_enabled' => '特别区未启用。',
'paid_torrent_not_enabled' => '收费种子未启用。',
'no_permission_to_set_torrent_hr' => '没有权限设置种子 H&R。',
'no_permission_to_set_torrent_pos_state' => '没有权限设置种子置顶。',
'no_permission_to_set_torrent_price' => '没有权限设置种子收费。',
'no_permission_to_pick_torrent' => '没有权限推荐影片。',
'no_permission_to_be_anonymous' => '没有权限匿名发布。',
'torrent_save_dir_not_exists' => '种子保存目录不存在。',
'torrent_save_dir_not_writable' => '种子保存目录不可写。',
'save_torrent_file_failed' => '保存种子文件失败。',
'upload_failed' => "上传失败!",
'missing_form_data' => "请填写必填项目",
'missing_torrent_file' => "缺少种子文件",
'empty_filename' => "文件名不能为空!",
'zero_byte_nfo' => "NFO文件为空",
'nfo_too_big' => "NFO文件过大!最大允许65,535 bytes。",
'nfo_upload_failed' => "NFO文件上传失败",
'blank_description' => "你必须填写简介!",
'category_unselected' => "你必须选择类型!",
'invalid_filename' => "无效的文件名!",
'filename_not_torrent' => "无效的文件名(不是.torrent文件).",
'empty_file' => "空文件!",
'not_bencoded_file' => "你在搞什么鬼?你上传的不是Bencode文件!",
'not_a_dictionary' => "不是目录",
'dictionary_is_missing_key' => "目录缺少值",
'invalid_entry_in_dictionary' => "无效的目录项",
'invalid_dictionary_entry_type' => "无效的目录项类型",
'invalid_pieces' => "无效的文件块",
'missing_length_and_files' => "缺少长度和文件",
'filename_errors' => "文件名错误",
'uploaded_not_offered' => "你只能上传通过候选的种子,请返回在<b>你的候选</b>中选择合适项目后再上传!",
'unauthorized_upload_freely' => "你没有自由上传的权限!",
'torrent_existed' => "该种子已存在!id: :id",
'torrent_file_too_big' => "种子文件过大!最大允许",
'remake_torrent_note' => " bytes。请使用更大的区块大小重新制作种子文件,或者将内容分为多个种子发布。",
'email_notification_body' => "你好,\n一个新的种子已经上传.\n\n名称::name\n大小::size\n类型::category\n上传者::upload_by\n\n简介:\n:description\n\n查看更为详细的信息并下载(你可能需要登录),请点击这里:<b><a href=javascript:void(null) onclick=window.open(':torrent_url')>这里</a></b>\n:torrent_url\n\n:site_name 网站",
'email_notification_subject' => ':site_name 新种子通知',
];
+1
View File
@@ -26,6 +26,7 @@ return [
\App\Models\BonusLogs::BUSINESS_TYPE_TORRENT_BE_DOWNLOADED => '種子被下載',
\App\Models\BonusLogs::BUSINESS_TYPE_RECEIVE_REWARD => '收到獎勵',
\App\Models\BonusLogs::BUSINESS_TYPE_RECEIVE_GIFT => '收到禮物',
\App\Models\BonusLogs::BUSINESS_TYPE_UPLOAD_TORRENT => '發布種子',
],
'fields' => [
'business_type' => '業務類型',
+6 -4
View File
@@ -1,6 +1,8 @@
<?php
return [
"label" => "訪問令牌",
"permission" => "權限",
];
return array (
'label' => '訪問令牌',
'permission' => '權限',
'maximum_allow_number_reached' => '數量達到上限',
'create_success_tip' => 'token 創建成功,此數據只展示一次,請妥善保存<br/><br/>:token',
);
+68
View File
@@ -0,0 +1,68 @@
<?php
return array (
'invalid_price' => '無效的價格::price',
'invalid_category' => '無效的分類',
'invalid_section' => '無效的分區',
'invalid_hr' => '無效的 H&R 值',
'invalid_pos_state' => '無效的位置::pos_state',
'invalid_pos_state_until' => '無效的位置截止時間',
'not_supported_sub_category_field' => '不支持的子分類字段::field',
'invalid_sub_category_value' => '子分類字段::label(:field) 的值::value 無效',
'invalid_tag' => '無效的標籤::tag',
'invalid_pick_type' => '無效的推薦::pick_type',
'require_name' => '標題不能為空',
'price_too_much' => '價格超過允許範圍',
'approval_deny_reach_upper_limit' => '當前審核被拒絕的種子數:%s 達到上限,不允許發布。',
'special_section_not_enabled' => '特別區未啟用。',
'paid_torrent_not_enabled' => '收費種子未啟用。',
'no_permission_to_set_torrent_hr' => '沒有權限設置種子 H&R。',
'no_permission_to_set_torrent_pos_state' => '沒有權限設置種子置頂。',
'no_permission_to_set_torrent_price' => '沒有權限設置種子收費。',
'no_permission_to_pick_torrent' => '沒有權限推薦影片。',
'no_permission_to_be_anonymous' => '沒有權限匿名發布。',
'torrent_save_dir_not_exists' => '種子保存目錄不存在。',
'torrent_save_dir_not_writable' => '種子保存目錄不可寫。',
'save_torrent_file_failed' => '保存種子文件失敗。',
'upload_failed' => '上傳失敗!',
'missing_form_data' => '請填寫必填項目',
'missing_torrent_file' => '缺少種子文件',
'empty_filename' => '文件名不能為空!',
'zero_byte_nfo' => 'NFO文件為空',
'nfo_too_big' => 'NFO文件過大!最大允許65,535 bytes。',
'nfo_upload_failed' => 'NFO文件上傳失敗',
'blank_description' => '你必須填寫簡介!',
'category_unselected' => '你必須選擇類型!',
'invalid_filename' => '無效的文件名!',
'filename_not_torrent' => '無效的文件名(不是.torrent文件).',
'empty_file' => '空文件!',
'not_bencoded_file' => '你在搞什麼鬼?你上傳的不是Bencode文件!',
'not_a_dictionary' => '不是目錄',
'dictionary_is_missing_key' => '目錄缺少值',
'invalid_entry_in_dictionary' => '無效的目錄項',
'invalid_dictionary_entry_type' => '無效的目錄項類型',
'invalid_pieces' => '無效的文件塊',
'missing_length_and_files' => '缺少長度和文件',
'filename_errors' => '文件名錯誤',
'uploaded_not_offered' => '你只能上傳通過候選的種子,請返回在<b>你的候選</b>中選擇合適項目後再上傳!',
'unauthorized_upload_freely' => '你沒有自由上傳的權限!',
'torrent_existed' => '該種子已存在!id: :id',
'torrent_file_too_big' => '種子文件過大!最大允許',
'remake_torrent_note' => 'bytes。請使用更大的區塊大小重新製作種子文件,或者將內容分為多個種子發布。',
'email_notification_body' => '你好,
一個新的種子已經上傳.
名稱::name
大小::size
類型::category
上傳者::upload_by
簡介:
:description
查看更為詳細的信息並下載(你可能需要登錄),請點擊這裡:<b><a href=javascript:void(null) onclick=window.open(\':torrent_url\')>這裡</a></b>
:torrent_url
:site_name 網站',
'email_notification_subject' => ':site_name 新種子通知',
);