Publish nexusphp v1.0.4
This commit is contained in:
@@ -638,8 +638,22 @@ function search(input) {
|
||||
var source = parseMediaTag(title, /\b(WEB-DL|WEBRip|WEB|HDTV|Blu-?Ray|DVD|Remux|BDrip|BDRip|HDrip|DVDRip)\b/i);
|
||||
var encoding = parseMediaTag(title, /\b(x264|x265|H\.?265|H\.?264|AVC|HEVC|VC-?1|XviD|AV1)\b/i);
|
||||
|
||||
// 从 torrentnameHtml 正则抠外部 ID (doubanId/imdbId):
|
||||
// PTT 模板 (PTTime) 列表页直接带 douban.com/subject/xxx 链接;
|
||||
// 其他 NexusPHP 模板列表页通常只有图标没链接 → 正则 miss 就是 null, 安全兜底.
|
||||
var doubanIdFromTname = null;
|
||||
var imdbIdFromTname = null;
|
||||
if (torrentnameHtml) {
|
||||
var dbm = torrentnameHtml.match(/douban\.com\/subject\/(\d+)/i);
|
||||
if (dbm) doubanIdFromTname = dbm[1];
|
||||
var im = torrentnameHtml.match(/imdb\.com\/title\/(tt\d+)/i);
|
||||
if (im) imdbIdFromTname = im[1];
|
||||
}
|
||||
|
||||
results.push({
|
||||
torrentnameHtml: torrentnameHtml,
|
||||
doubanId: doubanIdFromTname,
|
||||
imdbId: imdbIdFromTname,
|
||||
detailUrl: detailUrl,
|
||||
downloadUrl: downloadUrl,
|
||||
size: size,
|
||||
|
||||
Reference in New Issue
Block a user