Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add lgs #2053

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions resource/sites/ptlgs.org/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"name": "劳改所",
"timezoneOffset": "+0800",
"description": "劳改所",
"schema": "NexusPHP",
"host": "ptlgs.org",
"url": "https://ptlgs.org",
"icon": "https://ptlgs.org/favicon.ico",
"tags": ["综合"],
"collaborator": "haowenwu",
"levelRequirements": [{
"level": "1",
"name": "Power User",
"ratio": "1.2",
"downloaded": "500GB",
"seedingPoints": "160000"
}, {
Comment on lines +11 to +17
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有等级对应的权益吗?

"level": "2",
"name": "Elite User",
"ratio": "1.5",
"downloaded": "4096GB",
"seedingPoints": "1000000"
}, {
"level": "3",
"name": "Crazy User",
"ratio": "1.5",
"downloaded": "5120GB",
"seedingPoints": "2500000"
}],
"selectors": {
"userExtendInfo": {
"merge": true,
"fields": {
"bonus": {
"selector": ["td.rowhead:contains('工分') + td"],
"filters": ["query.text().replace(/,/g,'')", "parseFloat(query)"]
}
}
},
"userSeedingTorrents": {
"merge": true,
"fields": {
"seedingSize": {
"selector": "div div",
"filters": ["query.text().match(/总大小:(.*)/i)", "query ? query[1].trim() : 0", "query != 0 ? query.sizeToNumber() : 0"]
}
}
}
},
"searchEntryConfig": {
"fieldSelector": {
"progress": {
"selector": ["div[title^='seeding'], div[title^='leeching'], div[title^='inactivity']"],
"filters": ["query ? parseFloat(query.attr('title').match(/[\\d.]+/)) : null"]
},
"status": {
"selector": ["div[title^='seeding'], div[title^='leeching'], div[title^='inactivity']"],
"filters": ["query ? query.attr('title') : ''", "query.indexOf('seeding') != -1 ? 2 : query.indexOf('leeching') != -1 ? 1 : query.indexOf('100%') != -1 ? 255 : 3"]
}
}
}
}