修复:不分站点未获取做种积分的问题

This commit is contained in:
ngfchl
2023-01-18 17:41:17 +08:00
parent 3f38e7e6d1
commit adef42ad85
6 changed files with 60 additions and 37 deletions

View File

@@ -37,6 +37,7 @@ def app_ready_handler(sender, **kwargs):
if upgrade.get('id'):
del upgrade['id']
upgrade['level'] = upgrade.get('level').replace(' ', '')
upgrade['rights'] = upgrade.get('rights').replace(' ', '')
upgrade_obj = UserLevelRule.objects.update_or_create(
site_id=upgrade.get('site_id'), level_id=upgrade.get('level_id'),
defaults=upgrade

View File

@@ -0,0 +1,20 @@
# Generated by Django 4.1.2 on 2023-01-18 17:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("pt_site", "0036_alter_userlevelrule_site"),
]
operations = [
migrations.AlterField(
model_name="site",
name="nickname",
field=models.CharField(
default="", help_text="英文,用于刷流", max_length=16, verbose_name="简称"
),
),
]

View File

@@ -12,7 +12,7 @@ class Site(BaseEntity):
# 站点设置
url = models.URLField(verbose_name='站点网址', default='', help_text='请保留网址结尾的"/"', unique=True)
name = models.CharField(max_length=32, verbose_name='站点名称')
nickname = models.CharField(max_length=8, verbose_name='简称', default='', help_text='英文,用于刷流')
nickname = models.CharField(max_length=16, verbose_name='简称', default='', help_text='英文,用于刷流')
logo = models.URLField(verbose_name='站点logo', default='', help_text='站点logo图标')
tracker = models.CharField(verbose_name='tracker', default='', help_text='tracker网址关键字', max_length=32)
# 功能支持

View File

@@ -2,7 +2,7 @@
{
"id": 1,
"created_at": "2022-07-17 10:22:03.474000",
"updated_at": "2023-01-18 11:41:35.410858",
"updated_at": "2023-01-18 16:04:56.187676",
"name": "阿童木",
"url": "https://hdatmos.club/",
"logo": "https://hdatmos.club/favicon.ico",
@@ -60,7 +60,7 @@
"ratio_rule": "//font[@class=\"color_ratio\"][1]/following-sibling::text()[1]",
"my_sp_rule": "//a[@href=\"mybonus.php\"]/following-sibling::text()[1]",
"hour_sp_rule": "//div[contains(text(),\"每小时\")]/text()[1]",
"my_bonus_rule": "//font[@class=\"color_bonus\" and contains(text(),\"积分\")]/following-sibling::text()[1]",
"my_bonus_rule": "//td[contains(text(),\"做种积分\")]/following-sibling::td[1]/text()",
"my_level_rule": "//table[@id=\"info_block\"]//span/a[contains(@class,\"_Name\") and contains(@href,\"userdetails.php?id=\")]/@class",
"my_hr_rule": "//a[@href=\"myhr.php\"]//text()",
"leech_rule": "//img[@class=\"arrowdown\"][1]/following-sibling::text()[1]",
@@ -172,7 +172,7 @@
{
"id": 5,
"created_at": "2022-07-17 10:27:30.380000",
"updated_at": "2023-01-18 11:41:35.416744",
"updated_at": "2023-01-18 16:50:41.936415",
"name": "1PT",
"url": "https://1ptba.com/",
"logo": "https://1ptba.com/favicon.ico",
@@ -230,7 +230,7 @@
"ratio_rule": "//font[@class=\"color_ratio\"][1]/following-sibling::text()[1]",
"my_sp_rule": "//a[@href=\"mybonus.php\"]/following-sibling::text()[1]",
"hour_sp_rule": "//div[contains(text(),\"每小时\")]/text()[1]",
"my_bonus_rule": "//font[@class=\"color_bonus\" and contains(text(),\"积分\")]/following-sibling::text()[1]",
"my_bonus_rule": "//td[contains(text(),\"做种积分\")]/following-sibling::td[1]/text()",
"my_level_rule": "//table[@id=\"info_block\"]//span/a[contains(@class,\"_Name\") and contains(@href,\"userdetails.php?id=\")]/@class",
"my_hr_rule": "//a[@href=\"myhr.php\"]//text()",
"leech_rule": "//img[@class=\"arrowdown\"][1]/following-sibling::text()[1]",
@@ -257,7 +257,7 @@
{
"id": 8,
"created_at": "2022-07-20 10:05:03.493000",
"updated_at": "2023-01-18 11:41:35.419566",
"updated_at": "2023-01-18 16:53:06.721275",
"name": "CarPT",
"url": "https://carpt.net/",
"logo": "https://carpt.net/favicon.ico",
@@ -315,7 +315,7 @@
"ratio_rule": "//font[@class=\"color_ratio\"][1]/following-sibling::text()[1]",
"my_sp_rule": "//a[@href=\"mybonus.php\"]/following-sibling::text()[1]",
"hour_sp_rule": "//div[contains(text(),\"每小时能获取\")]/text()[1]",
"my_bonus_rule": "//font[@class=\"color_bonus\" and contains(text(),\"积分\")]/following-sibling::text()[1]",
"my_bonus_rule": "//td[contains(text(),\"做种积分\")]/following-sibling::td[1]/text()",
"my_level_rule": "//span[@class=\"medium\"]/span[@class=\"nowrap\"][1]/a[contains(@class,\"_Name\")]/@class",
"my_hr_rule": "//a[@href=\"myhr.php\"]//text()",
"leech_rule": "//img[@class=\"arrowdown\"][1]/following-sibling::text()[1]",
@@ -427,7 +427,7 @@
{
"id": 10,
"created_at": "2022-07-20 10:07:13.505000",
"updated_at": "2023-01-18 11:41:35.425208",
"updated_at": "2023-01-18 16:49:30.670107",
"name": "红豆饭",
"url": "https://hdfans.org/",
"logo": "https://hdfans.org/favicon.ico",
@@ -485,7 +485,7 @@
"ratio_rule": "//font[@class=\"color_ratio\"][1]/following-sibling::text()[1]",
"my_sp_rule": "//a[@href=\"mybonus.php\"]/following-sibling::text()[1]",
"hour_sp_rule": "//div[contains(text(),\"每小时能获取\")]/text()[1]",
"my_bonus_rule": "//font[@class=\"color_bonus\" and contains(text(),\"积分\")]/following-sibling::text()[1]",
"my_bonus_rule": "//td[contains(text(),\"做种积分\")]/following-sibling::td[1]/text()",
"my_level_rule": "//span[@class=\"medium\"]/span[@class=\"nowrap\"][1]/a[contains(@class,\"_Name\")]/@class",
"my_hr_rule": "//a[@href=\"myhr.php\"]//text()",
"leech_rule": "//img[@class=\"arrowdown\"][1]/following-sibling::text()[1]",
@@ -767,7 +767,7 @@
{
"id": 14,
"created_at": "2022-07-20 10:11:12.180000",
"updated_at": "2023-01-18 11:41:35.436279",
"updated_at": "2023-01-18 17:16:11.443463",
"name": "冬樱",
"url": "https://wintersakura.net/",
"logo": "https://wintersakura.net/favicon.ico",
@@ -825,7 +825,7 @@
"ratio_rule": "//font[@class=\"color_ratio\"][1]/following-sibling::text()[1]",
"my_sp_rule": "//a[@href=\"mybonus.php\"]/following-sibling::text()[1]",
"hour_sp_rule": "//div[contains(text(),\"每小时\")]/text()[1]",
"my_bonus_rule": "//font[@class=\"color_bonus\" and contains(text(),\"积分\")]/following-sibling::text()[1]",
"my_bonus_rule": "//td[contains(text(),\"做种积分\")]/following-sibling::td[1]/text()",
"my_level_rule": "//table[@id=\"info_block\"]//span/a[contains(@class,\"_Name\") and contains(@href,\"userdetails.php?id=\")]/@class",
"my_hr_rule": "//a[@href=\"myhr.php\"]//text()",
"leech_rule": "//img[@class=\"arrowdown\"][1]/following-sibling::text()[1]",
@@ -839,7 +839,7 @@
"my_uid_rule": "//a[contains(@class,\"_Name\") and contains(@href,\"userdetails.php?id=\")]/@href",
"page_control_panel": "usercp.php",
"tracker": "wintersakura.net",
"nickname": "wintersakura",
"nickname": "sakura",
"page_hr": "myhr.php?hrtype=1&userid={}",
"search_params": "{\"免费\":\"spstate=2\",\"2X\":\"spstate=3\",\"2X免费\":\"spstate=4\",\"50%\":\"spstate=5\",\"2X 50%\":\"spstate=6\",}",
"full_site_free": "//td/b/a/font[contains(text(),\"全站\") and contains(text(),\"Free\")]/text()",
@@ -937,7 +937,7 @@
{
"id": 16,
"created_at": "2022-07-20 10:13:15.407000",
"updated_at": "2023-01-18 11:41:35.441627",
"updated_at": "2023-01-18 17:14:52.991995",
"name": "农场",
"url": "https://pt.0ff.cc/",
"logo": "https://pt.0ff.cc/favicon.ico",
@@ -995,7 +995,7 @@
"ratio_rule": "//font[@class=\"color_ratio\"][1]/following-sibling::text()[1]",
"my_sp_rule": "//a[@href=\"mybonus.php\"]/following-sibling::text()[1]",
"hour_sp_rule": "//div[contains(text(),\"每小时\")]/text()[1]",
"my_bonus_rule": "//font[@class=\"color_bonus\" and contains(text(),\"积分\")]/following-sibling::text()[1]",
"my_bonus_rule": "//td[contains(text(),\"做种积分\")]/following-sibling::td[1]/text()",
"my_level_rule": "//span[@class=\"medium\"]/span[@class=\"nowrap\"][1]/a[contains(@class,\"_Name\")]/@class",
"my_hr_rule": "//a[@href=\"myhr.php\"]//text()",
"leech_rule": "//img[@class=\"arrowdown\"][1]/following-sibling::text()[1]",
@@ -1277,7 +1277,7 @@
{
"id": 20,
"created_at": "2022-07-20 11:06:11.901000",
"updated_at": "2023-01-18 11:41:35.452852",
"updated_at": "2023-01-18 16:03:33.141602",
"name": "欧申",
"url": "http://www.oshen.win/",
"logo": "http://www.oshen.win/favicon.ico",
@@ -2637,7 +2637,7 @@
{
"id": 38,
"created_at": "2022-08-02 10:14:26.854000",
"updated_at": "2023-01-18 11:41:35.496738",
"updated_at": "2023-01-18 15:52:47.145422",
"name": "明教",
"url": "https://hdpt.xyz/",
"logo": "https://hdpt.xyz/favicon.ico",
@@ -2695,7 +2695,7 @@
"ratio_rule": "//font[@class=\"color_ratio\"][1]/following-sibling::text()[1]",
"my_sp_rule": "//a[@href=\"mybonus.php\"]/following-sibling::text()[1]",
"hour_sp_rule": "//div[contains(text(),\"每小时\")]/text()[1]",
"my_bonus_rule": "//font[@class=\"color_bonus\" and contains(text(),\"积分\")]/following-sibling::text()[1]",
"my_bonus_rule": "//td[contains(text(),\"做种积分\")]/following-sibling::td[1]/text()",
"my_level_rule": "//table[@id=\"info_block\"]//span/a[contains(@class,\"_Name\") and contains(@href,\"userdetails.php?id=\")]/@class",
"my_hr_rule": "//a[@href=\"myhr.php\"]//text()",
"leech_rule": "//img[@class=\"arrowdown\"][1]/following-sibling::text()[1]",
@@ -5187,7 +5187,7 @@
{
"id": 70,
"created_at": "2022-07-17 10:24:59.754000",
"updated_at": "2023-01-18 11:41:35.580403",
"updated_at": "2023-01-18 15:54:02.056939",
"name": "BT学校",
"url": "https://pt.btschool.club/",
"logo": "https://gitee.com/ngfchl/ptools/raw/master/static/logo/btschool.ico",
@@ -5245,7 +5245,7 @@
"ratio_rule": "//font[@class=\"color_ratio\"][1]/following-sibling::text()[1]",
"my_sp_rule": "//a[@href=\"mybonus.php\"]/following-sibling::text()[1]",
"hour_sp_rule": "//div[contains(text(),\"每小时\")]/text()[1]",
"my_bonus_rule": "//font[@class=\"color_bonus\" and contains(text(),\"积分\")]/following-sibling::text()[1]",
"my_bonus_rule": "//strong[contains(text(),\"做种积分\")]/following-sibling::text()",
"my_level_rule": "//table[@id=\"info_block\"]//span/a[contains(@class,\"_Name\") and contains(@href,\"userdetails.php?id=\")]/@class",
"my_hr_rule": "//a[@href=\"myhr.php\"]//text()",
"leech_rule": "//img[@class=\"arrowdown\"][1]/following-sibling::text()[1]",

View File

@@ -6424,8 +6424,8 @@
"days": 5,
"uploaded": "0",
"downloaded": "200GB",
"bonus": 0,
"score": 80000,
"bonus": 80000,
"score": 0,
"ratio": 2,
"torrents": 0,
"rights": "可以查看 NFO 文档;可以请求续种; 可以查看排行榜;可以查看其它用户的种子历史 (如果用户隐私等级未设置为 \"强\") 可以删除自己上传的字幕。",
@@ -6440,8 +6440,8 @@
"days": 10,
"uploaded": "0",
"downloaded": "500GB",
"bonus": 0,
"score": 150000,
"bonus": 150000,
"score": 0,
"ratio": 3,
"torrents": 0,
"rights": "无",
@@ -6456,8 +6456,8 @@
"days": 15,
"uploaded": "0",
"downloaded": "800GB",
"bonus": 0,
"score": 300000,
"bonus": 300000,
"score": 0,
"ratio": 4,
"torrents": 0,
"rights": "可以查看 NFO 文档;可以查看用户列表;可以请求续种;可以查看排行榜;可以查看其它用户的种子历史 (如果用户隐私等级未设置为 \"强\") 可以删除自己上传的字幕。可以在做种 / 下载 / 发布的时候选择匿名模式。",
@@ -6472,8 +6472,8 @@
"days": 20,
"uploaded": "0",
"downloaded": "999GB",
"bonus": 0,
"score": 650000,
"bonus": 650000,
"score": 0,
"ratio": 5,
"torrents": 0,
"rights": "可以查看普通日志。",
@@ -6488,8 +6488,8 @@
"days": 25,
"uploaded": "0",
"downloaded": "1500GB",
"bonus": 0,
"score": 1000000,
"bonus": 1000000,
"score": 0,
"ratio": 6,
"torrents": 0,
"rights": "可以查看其它用户的评论、帖子历史。",
@@ -6504,8 +6504,8 @@
"days": 30,
"uploaded": "0",
"downloaded": "2TB",
"bonus": 0,
"score": 2200000,
"bonus": 2200000,
"score": 0,
"ratio": 7,
"torrents": 0,
"rights": "首次升级赠送邀请 1 枚,可以更新过期的外部信息;可以查看 Extreme User 论坛。",
@@ -6520,8 +6520,8 @@
"days": 40,
"uploaded": "0",
"downloaded": "3TB",
"bonus": 0,
"score": 3500000,
"bonus": 3500000,
"score": 0,
"ratio": 8,
"torrents": 0,
"rights": "首次升级赠送邀请 2 枚,保留帐号,在官方活动期间可发放邀请;",
@@ -6536,8 +6536,8 @@
"days": 52,
"uploaded": "0",
"downloaded": "4TB",
"bonus": 0,
"score": 5000000,
"bonus": 5000000,
"score": 0,
"ratio": 10,
"torrents": 0,
"rights": "首次升级赠送邀请 3 枚,保留帐号,在官方活动期间可发放邀请;",

View File

@@ -263,7 +263,7 @@
<el-popover
v-if="site.level_info"
placement="top"
width="440"
width="360"
trigger="hover">
<table style="font-size: 10px;font-family: 'Heiti SC';margin-right: 5px;">
<tr v-if="site.level_info">
@@ -312,7 +312,9 @@
v-text="site.next_level.ratio"></span></td>
</tr>
<tr v-if="site.next_level && site.next_level.torrents != 0">
<th>发种数:<th>
<th>
发种数:
<th>
<td><span v-text="site.level_info.torrents"
class="incomplete"></span> / <span
v-text="site.next_level.torrents"></span></td>