8 Commits

Author SHA1 Message Date
5cb12930a4 Publish mteam v1.0.1 2026-09-20 16:00:41 +00:00
dd7450042c Publish mteam v1.0.1 2026-09-20 16:00:36 +00:00
4caf179bca Publish mteam v1.0.1 2026-09-20 16:00:32 +00:00
86bca2b425 Sync all 2026-09-16 15:17 UTC 2026-09-16 15:17:24 +00:00
b8062fa85e Sync all 2026-09-16 15:17 UTC 2026-09-16 15:17:22 +00:00
bbf2262f5b Sync all 2026-09-16 15:17 UTC 2026-09-16 15:17:21 +00:00
c78c6785c2 Sync all 2026-09-16 15:17 UTC 2026-09-16 15:17:19 +00:00
6958e0da33 Sync all 2026-09-16 15:17 UTC 2026-09-16 15:17:17 +00:00
3 changed files with 329 additions and 38 deletions

View File

@@ -180,8 +180,10 @@ function parseSearch(items) {
publisher: it.author || '',
tags: tags,
doubanUrl: it.douban || '',
doubanId: (function(){ var m = String(it.douban || '').match(/douban\.com\/subject\/(\d+)/i); return m ? m[1] : ''; })(),
doubanRating: rating,
imdbUrl: it.imdb || '',
imdbId: (function(){ var m = String(it.imdb || '').match(/imdb\.com\/title\/(tt\d+)/i); return m ? m[1] : ''; })(),
cnSub: cnSub,
standard: it.standard || '',
detailUrl: it.id !== undefined && it.id !== null ? 'detail/' + String(it.id) : '',
@@ -307,19 +309,42 @@ function sync(input) {
}
// ===================== 能力: download(下载种子) =====================
// ctx: { baseUrl, apiKey, downloadUrl?(可选) | id/detailId, downloadPath?(可选, 默认 /api/torrent/download) }
// ctx: { baseUrl, apiKey, downloadUrl?(可选) | id/detailId }
// M-Team API 不暴露直接下载接口(swagger 里没有 /torrent/download), 必须两步:
// 1) POST /api/torrent/genDlToken?id={detailId} → 拿到 Result.data (下载 URL 或 token)
// 2) GET 下载 URL (通常是 CDN)
// 返回 { downloadUrl, url, bytes, size } 或 { error, url? }。
function download(input) {
var ctx = __asCtx(input);
var base = __resolveBase(ctx);
var apiKey = ctx && (ctx.apiKey || ctx.xApiKey);
var detailId = ctx && (ctx.id || ctx.detailId) ? String(ctx.id || ctx.detailId) : '';
var url = null;
if (ctx && ctx.downloadUrl) {
url = String(ctx.downloadUrl);
if (url.indexOf('http') !== 0) url = base + (url.charAt(0) === '/' ? url : '/' + url);
} else if (detailId) {
var path = (ctx && ctx.downloadPath) || '/api/torrent/download';
url = base + path + '?id=' + encodeURIComponent(detailId);
// 先 genDlToken 拿下载 URL / token
var tokenPath = '/api/torrent/genDlToken?id=' + encodeURIComponent(detailId);
var tokenRoot = __apiPost(base, tokenPath, {}, apiKey);
if (tokenRoot === null) return { error: 'gen_dl_token_failed_no_response', url: base + tokenPath };
// genDlToken 返回 Result<T>, T 可能是 string (完整下载 URL) 或对象
var tokenData = (tokenRoot.data !== undefined ? tokenRoot.data : tokenRoot);
var dlUrl = null;
if (typeof tokenData === 'string' && tokenData.length > 0) {
dlUrl = tokenData;
} else if (tokenData && typeof tokenData === 'object') {
dlUrl = tokenData.url || tokenData.downloadUrl || tokenData.link || tokenData.token;
}
if (!dlUrl) {
// 把原始响应带回来供 C# 端日志诊断真实格式
var raw = '';
try { raw = typeof JSON !== 'undefined' ? JSON.stringify(tokenRoot) : String(tokenRoot); } catch(e) { raw = String(tokenRoot); }
if (raw.length > 500) raw = raw.substring(0, 500) + '...';
return { error: 'gen_dl_token_failed_no_download_url', url: base + tokenPath, rawResponse: raw };
}
url = String(dlUrl);
} else {
return { error: 'no_detail_id' };
}

View File

@@ -1,7 +1,7 @@
{
"AdapterCode": "mteam",
"DisplayName": "mteam",
"Version": "1.0.0",
"Version": "1.0.1",
"Status": "published",
"Runtime": "javascript",
"Description": "",

View File

@@ -1,12 +1,13 @@
{
"version": "1.0",
"minClientVersion": "0.1.0",
"generatedAt": "2026-09-16T15:17:03.9741156Z",
"generatedAt": "2026-09-20T16:00:31.814Z",
"adapters": {
"nexusphp": {
"adapterCode": "nexusphp",
"displayName": "nexusphp",
"version": "1.0.0",
"version": "1.0.1",
"checksum": "sha256:8380d6b89dc46d48f3b150d0b4285138958f031b3fb08f624bbfc304b9ea4820",
"scriptPath": "adapters/nexusphp/adapter.js",
"manifestPath": "adapters/nexusphp/manifest.json",
"capabilities": [
@@ -25,6 +26,7 @@
"adapterCode": "mteam",
"displayName": "mteam",
"version": "1.0.0",
"checksum": "sha256:6bb1361631d010dda916e03ac2ca138e4adb9f97b75d43f9b38ba27ff1550413",
"scriptPath": "adapters/mteam/adapter.js",
"manifestPath": "adapters/mteam/manifest.json",
"capabilities": [],
@@ -37,129 +39,393 @@
"siteCode": "1ptba",
"displayName": "壹PT(1PTBar)",
"baseUrl": "https://1ptba.com",
"group": null,
"group": "",
"status": "ok",
"adapterCode": "nexusphp"
"adapterCode": "nexusphp",
"description": null,
"icon": null,
"authType": 0,
"apiDomains": [],
"baseUrls": [
"https://1ptba.com"
],
"trackerUrls": [],
"signInPath": null,
"signInSupported": true,
"tags": [
"综合",
"影视"
],
"updatedAt": "2026-09-05T07:05:14.000Z"
},
{
"siteCode": "52pt",
"displayName": "我爱PT(52PT)",
"baseUrl": "https://52pt.site",
"group": null,
"group": "",
"status": "ok",
"adapterCode": "nexusphp"
"adapterCode": "nexusphp",
"description": null,
"icon": null,
"authType": 0,
"apiDomains": [],
"baseUrls": [
"https://52pt.site"
],
"trackerUrls": [],
"signInPath": null,
"signInSupported": true,
"tags": [
"高清",
"电影",
"电视剧"
],
"updatedAt": "2026-09-05T07:05:22.000Z"
},
{
"siteCode": "audiences",
"displayName": "观众(Audiences)",
"baseUrl": "https://audiences.me",
"group": null,
"group": "",
"status": "ok",
"adapterCode": "nexusphp"
"adapterCode": "nexusphp",
"description": null,
"icon": null,
"authType": 0,
"apiDomains": [],
"baseUrls": [
"https://audiences.me"
],
"trackerUrls": [],
"signInPath": null,
"signInSupported": true,
"tags": [
"综合",
"影视",
"音乐"
],
"updatedAt": "2026-09-05T07:05:32.000Z"
},
{
"siteCode": "azusa",
"displayName": "梓喵(Azusa)",
"baseUrl": "https://azusa.wiki",
"group": null,
"group": "",
"status": "ok",
"adapterCode": "nexusphp"
"adapterCode": "nexusphp",
"description": null,
"icon": null,
"authType": 0,
"apiDomains": [],
"baseUrls": [
"https://azusa.wiki"
],
"trackerUrls": [],
"signInPath": null,
"signInSupported": true,
"tags": [
"漫画",
"轻小说",
"Galgame"
],
"updatedAt": "2026-09-05T07:05:26.000Z"
},
{
"siteCode": "btschool",
"displayName": "学校(BTSCHOOL)",
"baseUrl": "https://pt.btschool.club",
"group": null,
"group": "",
"status": "ok",
"adapterCode": "nexusphp"
"adapterCode": "nexusphp",
"description": null,
"icon": null,
"authType": 0,
"apiDomains": [],
"baseUrls": [
"https://pt.btschool.club",
"https://pt.btschool.net"
],
"trackerUrls": [],
"signInPath": null,
"signInSupported": true,
"tags": [
"影视",
"综合",
"学习"
],
"updatedAt": "2026-09-05T07:05:18.000Z"
},
{
"siteCode": "byrbt",
"displayName": "北邮人(BYRBT)",
"baseUrl": "https://byr.pt",
"group": null,
"group": "",
"status": "ok",
"adapterCode": "nexusphp"
"adapterCode": "nexusphp",
"description": null,
"icon": null,
"authType": 0,
"apiDomains": [],
"baseUrls": [
"https://byr.pt",
"https://bt.byr.cn"
],
"trackerUrls": [],
"signInPath": null,
"signInSupported": true,
"tags": [
"教育网",
"影视",
"综合"
],
"updatedAt": "2026-09-05T07:05:11.000Z"
},
{
"siteCode": "carpt",
"displayName": "车站(CarPT)",
"baseUrl": "https://carpt.net",
"group": null,
"group": "",
"status": "ok",
"adapterCode": "nexusphp"
"adapterCode": "nexusphp",
"description": null,
"icon": null,
"authType": 0,
"apiDomains": [],
"baseUrls": [
"https://carpt.net",
"https://www.carpt.net"
],
"trackerUrls": [],
"signInPath": null,
"signInSupported": true,
"tags": [
"综合",
"影视"
],
"updatedAt": "2026-09-05T07:05:34.000Z"
},
{
"siteCode": "cbg",
"displayName": "藏宝阁(CangBaoGe)",
"baseUrl": "https://cangbao.ge",
"group": null,
"group": "",
"status": "ok",
"adapterCode": "nexusphp"
"adapterCode": "nexusphp",
"description": null,
"icon": null,
"authType": 0,
"apiDomains": [],
"baseUrls": [
"https://cangbao.ge"
],
"trackerUrls": [],
"signInPath": null,
"signInSupported": true,
"tags": [
"综合",
"影视"
],
"updatedAt": "2026-09-05T07:05:30.000Z"
},
{
"siteCode": "chdbits",
"displayName": "彩虹岛(CHDBits)",
"baseUrl": "https://ptchdbits.co",
"group": null,
"group": "",
"status": "ok",
"adapterCode": "nexusphp"
"adapterCode": "nexusphp",
"description": null,
"icon": null,
"authType": 0,
"apiDomains": [],
"baseUrls": [
"https://ptchdbits.co",
"https://chdbits.co"
],
"trackerUrls": [],
"signInPath": null,
"signInSupported": true,
"tags": [
"综合",
"影视"
],
"updatedAt": "2026-09-05T07:05:20.000Z"
},
{
"siteCode": "cyanbug",
"displayName": "大青虫(CyanBug)",
"baseUrl": "https://cyanbug.net",
"group": null,
"group": "",
"status": "ok",
"adapterCode": "nexusphp"
"adapterCode": "nexusphp",
"description": null,
"icon": null,
"authType": 0,
"apiDomains": [],
"baseUrls": [
"https://cyanbug.net"
],
"trackerUrls": [],
"signInPath": null,
"signInSupported": true,
"tags": [
"综合",
"影视"
],
"updatedAt": "2026-09-05T07:05:16.000Z"
},
{
"siteCode": "hdfans",
"displayName": "红豆饭(HDFans)",
"baseUrl": "https://hdfans.org",
"group": null,
"group": "",
"status": "ok",
"adapterCode": "nexusphp"
"adapterCode": "nexusphp",
"description": null,
"icon": null,
"authType": 0,
"apiDomains": [],
"baseUrls": [
"https://hdfans.org"
],
"trackerUrls": [],
"signInPath": null,
"signInSupported": true,
"tags": [
"综合",
"影视"
],
"updatedAt": "2026-09-05T07:05:28.000Z"
},
{
"siteCode": "ptfans",
"displayName": "PT发烧友(PTFans)",
"baseUrl": "https://ptfans.cc",
"group": null,
"group": "",
"status": "ok",
"adapterCode": "nexusphp"
"adapterCode": "nexusphp",
"description": null,
"icon": null,
"authType": 0,
"apiDomains": [],
"baseUrls": [
"https://ptfans.cc",
"https://cusat.win"
],
"trackerUrls": [],
"signInPath": null,
"signInSupported": true,
"tags": [
"影视",
"综合",
"成人"
],
"updatedAt": "2026-09-05T07:05:06.000Z"
},
{
"siteCode": "ptskit",
"displayName": "拾刻(PTSKit)",
"baseUrl": "https://www.ptskit.org",
"group": null,
"group": "",
"status": "ok",
"adapterCode": "nexusphp"
"adapterCode": "nexusphp",
"description": null,
"icon": null,
"authType": 0,
"apiDomains": [],
"baseUrls": [
"https://www.ptskit.org",
"https://ptskit.org"
],
"trackerUrls": [],
"signInPath": null,
"signInSupported": true,
"tags": [
"短剧",
"成人"
],
"updatedAt": "2026-09-05T07:05:24.000Z"
},
{
"siteCode": "pttime",
"displayName": "PT时间(PTTime)",
"baseUrl": "https://www.pttime.org",
"group": null,
"group": "",
"status": "ok",
"adapterCode": "nexusphp"
"adapterCode": "nexusphp",
"description": null,
"icon": null,
"authType": 0,
"apiDomains": [],
"baseUrls": [
"https://www.pttime.org",
"https://www.pttime.online",
"https://www.pttime.fun"
],
"trackerUrls": [],
"signInPath": null,
"signInSupported": true,
"tags": [
"影视",
"综合",
"成人"
],
"updatedAt": "2026-09-05T07:05:09.000Z"
},
{
"siteCode": "qingwa",
"displayName": "青蛙(QingWa)",
"baseUrl": "https://qingwapt.com",
"group": null,
"group": "",
"status": "ok",
"adapterCode": "nexusphp"
"adapterCode": "nexusphp",
"description": null,
"icon": null,
"authType": 0,
"apiDomains": [],
"baseUrls": [
"https://qingwapt.com",
"https://www.qingwapt.com",
"https://www.qingwapt.org",
"https://www.qingwaw.pro"
],
"trackerUrls": [],
"signInPath": null,
"signInSupported": true,
"tags": [
"综合",
"影视",
"动漫"
],
"updatedAt": "2026-09-05T07:05:35.000Z"
},
{
"siteCode": "mteam",
"displayName": "馒头(M-Team)",
"baseUrl": "https://kp.m-team.cc",
"group": null,
"group": "",
"status": "ok",
"adapterCode": "mteam"
"adapterCode": "mteam",
"description": null,
"icon": null,
"authType": 0,
"apiDomains": [
"https://api.m-team.cc",
"https://api.m-team.io"
],
"baseUrls": [
"https://kp.m-team.cc",
"https://zp.m-team.io",
"https://ob.m-team.cc"
],
"trackerUrls": [],
"signInPath": null,
"signInSupported": true,
"tags": [
"综合",
"影视"
],
"updatedAt": "2026-09-08T07:16:19.000Z"
}
],
"deprecatedSites": []