// ==UserScript==
// @name EasyUpload PT一键转种
// @namespace https://github.com/techmovie/easy-upload
// @version 2.3.4
// @description easy uploading torrents to other trackers
// @author birdplane
// @require https://cdn.staticfile.org/jquery/1.7.1/jquery.min.js
// @match https://passthepopcorn.me/torrents.php?id=*
// @match https://broadcasthe.net/torrents.php?id=*
// @match https://broadcasthe.net/torrents.php?torrentid=*
// @match https://uhdbits.org/torrents.php?id=*
// @match http://*/details.php?id=*
// @match https://*/details.php?id=*
// @match https://totheglory.im/t/*
// @match https://beyond-hd.me/torrents/*
// @match https://lemonhd.org/upload_*
// @match https://lemonhd.org/details*
// @match https://blutopia.xyz/torrents/*
// @match https://blutopia.xyz/torrents?*
// @match https://blutopia.xyz/upload/*
// @match https://pt.hdpost.top/torrents?*
// @match https://pt.hdpost.top/torrents/*
// @match https://asiancinema.me/torrents/*
// @match https://asiancinema.me/torrents?*
// @match https://aither.cc/torrents/*
// @match https://aither.cc/torrents?*
// @match https://ptpimg.me/*
// @match https://*/upload*
// @match http://*/upload*
// @match http://www.hd.ai/Torrents.upload
// @match http://www.hd.ai/Torrents.index?*
// @match https://broadcity.in/browse.php?imdb=*
// @match https://privatehd.to/torrent/*
// @match https://avistaz.to/torrent/*
// @match https://piratethenet.org/browse.php?*
// @match https://teamhd.org/details/id*
// @match https://hd-space.org/index.php?page=upload
// @match https://hd-space.org/index.php?page=torrent-details&id=*
// @match https://greatposterwall.com/torrents.php?id=*
// @match https://www.empornium.is/torrents.php?id=*
// @run-at document-end
// @grant GM_addStyle
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_openInTab
// @grant GM_xmlhttpRequest
// @grant GM_setClipboard
// @license MIT
// @downloadURL none
// ==/UserScript==
(() => {
var __assign = Object.assign;
// src/config.json
var PT_SITE = {
"1PTBA": {
url: "https://1ptba.com",
host: "1ptba.com",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/upload.php",
seedDomSelector: "#top~table:first>tbody>tr:nth-child(5)",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: "#torrenttable>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
anonymous: {
selector: 'input[name="uplver"]'
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "402",
tvPack: "402",
documentary: "404",
concert: "406",
sport: "407",
cartoon: "405",
variety: "403"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
x264: "1",
hevc: "10",
x265: "10",
h265: "10",
mpeg2: "4",
mpeg4: "1",
vc1: "2",
xvid: "3",
dvd: "4"
}
},
audioCodec: {
selector: 'select[name="audiocodec_sel"]',
map: {
aac: "6",
ac3: "18",
dd: "18",
"dd+": "18",
flac: "1",
dts: "3",
truehd: "20",
lpcm: "21",
dtshdma: "19",
atmos: "19",
dtsx: "3",
ape: "2",
wav: "22",
mp3: "4",
m4a: "5",
other: "7"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: "10",
bluray: "13",
remux: "3",
encode: "7",
web: "11",
hdtv: "5",
dvd: "2",
dvdrip: "7",
other: "12",
cd: "8"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"4320p": "11",
"2160p": "10",
"1080p": "2",
"1080i": "2",
"720p": "4",
"576p": "5",
"480p": "5"
}
},
team: {
selector: 'select[name="team_sel"]',
map: {
"1ptba": "1",
chd: "2",
mysilu: "3",
wiki: "4",
other: "5"
}
}
},
"3Wmg": {
url: "https://www.3wmg.com",
host: "3wmg.com",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/upload.php",
seedDomSelector: "#top~table:first>tbody>tr:nth-child(5)",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
douban: {
selector: 'input[name="pt_gen[douban][link]"]'
},
anonymous: {
selector: 'input[name="uplver"]'
},
tags: {
chinese_audio: 'input[name="tags[]"][value="16"]',
diy: 'input[name="tags[]"][value="8"]',
hdr: 'input[name="tags[]"][value="64"]',
chinese_subtitle: 'input[name="tags[]"][value="32"]'
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "403",
tvPack: "402",
documentary: "404",
concert: "406",
sport: "410",
cartoon: "405",
variety: "403"
}
},
source: {
selector: 'select[name="source_sel"]',
map: {
uhdbluray: "1",
bluray: "1",
hdtv: "4",
dvd: "3",
web: "6",
vhs: "6",
hddvd: "2"
}
}
},
"52pt": {
url: "https://52pt.site",
host: "52pt.site",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/upload.php",
seedDomSelector: "#top~table:first>tbody>tr:nth-child(3)",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
anonymous: {
selector: 'input[name="uplver"]'
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "402",
tvPack: "402",
documentary: "404",
concert: "406",
sport: "407",
cartoon: "405",
variety: "403"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "13",
x264: "11",
hevc: "1",
x265: "12",
h265: "1",
mpeg2: "4",
mpeg4: "13",
vc1: "2",
xvid: "3",
dvd: "4"
}
},
audioCodec: {
selector: 'select[name="audiocodec_sel"]',
map: {
aac: "13",
ac3: "6",
dd: "6",
"dd+": "6",
flac: "1",
dts: "15",
truehd: "12",
lpcm: "14",
dtshdma: "4",
atmos: "10",
dtsx: "3",
ape: "2",
wav: "11",
other: "7"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: "1",
bluray: "11",
remux: "4",
encode: "7",
web: "10",
hdtv: "3",
dvd: "6",
dvdrip: "7",
other: "9",
cd: "8"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"4320p": "7",
"2160p": "5",
"1080p": "1",
"1080i": "2",
"720p": "3",
"576p": "6",
"480p": "6"
}
},
team: {
selector: 'select[name="team_sel"]',
map: {
beyondhd: "1",
hdsky: "2",
ttg: "3",
mteam: "8",
coaster: "4",
chdbits: "9",
ourbits: "10",
hdhome: "11",
cmct: "12",
hdchina: "14",
pthome: "15",
other: "5"
}
}
},
ACM: {
url: "https://asiancinema.me",
host: "asiancinema.me",
siteType: "UNIT3D",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/upload/1",
needDoubanInfo: true,
seedDomSelector: "#vue+.panel table>tbody>tr:last",
search: {
path: "/torrents",
params: {
name: "{name}",
imdb: "{imdb}"
}
},
name: {
selector: "#title"
},
description: {
selector: "#upload-form-description"
},
imdb: {
selector: "#autoimdb"
},
tmdb: {
selector: "#autotmdb"
},
mediaInfo: {
selector: 'textarea[name="mediainfo"]'
},
anonymous: {
selector: '.radio-inline:first input[name="anonymous"]'
},
videoType: {
selector: "#autocat",
map: {
movie: "1",
tv: "2",
tvPack: "2"
}
},
category: {
selector: "#autotype",
map: {
BD100: "1",
BD66: "2",
UHD50: "3",
BD50: "4",
BD25: "5",
remux: [
"12",
"7"
],
encode: [
"8",
"10",
"11",
"13"
],
web: "9",
hdtv: "17",
dvd: [
"14",
"16"
],
dvdrip: "13",
other: ""
}
},
resolution: {
selector: "#autores",
map: {
"2160p": [
"1",
"1",
"2",
"3",
"12",
"8"
],
"1080p": [
"2",
"4",
"5",
"7",
"10"
],
"1080i": [
"2",
"4",
"5",
"7",
"10"
],
"720p": [
"3",
"11"
],
"576p": [
"4",
"13"
],
"480p": [
"5",
"14",
"16",
"13"
],
other: ""
}
}
},
Aither: {
url: "https://aither.cc",
host: "aither.cc",
siteType: "UNIT3D",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/upload/1",
needDoubanInfo: true,
seedDomSelector: '#meta-info+.meta-general>.panel:has(".table-responsive"):first table tr:last',
search: {
path: "/torrents",
replaceKey: [
"tt",
""
],
params: {
name: "{name}",
imdbId: "{imdb}",
sortField: "size"
}
},
name: {
selector: "#title"
},
description: {
selector: "#upload-form-description"
},
imdb: {
selector: "#autoimdb"
},
tmdb: {
selector: "#autotmdb"
},
mediaInfo: {
selector: 'textarea[name="mediainfo"]'
},
anonymous: {
selector: '.radio-inline:first input[name="anonymous"]'
},
category: {
selector: "#browsecat",
map: {
movie: "1",
tv: "2",
tvPack: "2",
documentary: "1",
concert: "3",
sport: "9",
cartoon: "405",
app: "10",
ebook: "11",
magazine: "11",
audioBook: "14"
}
},
videoType: {
selector: "#autotype",
map: {
uhdbluray: "1",
bluray: "1",
remux: "2",
encode: "3",
web: "4",
hdtv: "6",
dvd: "1",
dvdrip: "3",
other: "7"
}
},
resolution: {
selector: "#autores",
map: {
"4320p": "1",
"2160p": "3",
"1080p": "3",
"1080i": "4",
"720p": "5",
"576p": "6",
"480p": "8"
}
}
},
AvistaZ: {
url: "https://avistaz.to",
host: "avistaz.to",
siteType: "AvistaZ",
icon: '',
asSource: true,
asTarget: false,
uploadPath: "/upload.php",
seedDomSelector: "#content-area .block:last table:first>tbody>tr:nth-child(3)",
needDoubanInfo: true,
search: {
path: "/torrents",
params: {
search: "{imdb}",
in: "1",
order: "size",
sort: "desc"
}
}
},
BTN: {
url: "https://broadcasthe.net",
host: "broadcasthe.net",
siteType: "gazelle",
icon: '',
asSource: true,
asTarget: false,
needDoubanInfo: true,
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
params: {
action: "advanced",
imdb: "{imdb}",
artistname: "{name}"
}
}
},
BTSCHOOL: {
url: "https://pt.btschool.club",
host: "btschool.club",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: "#top~table:first>tbody>tr:nth-child(5)",
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
poster: 'input[name="picture"]',
imdb: {
selector: 'input[name="imdbid"]'
},
douban: {
selector: 'input[name="doubanid"]'
},
tags: {
chinese_audio: 'input[type="checkbox"][name="span[]"][value="5"]',
chinese_subtitle: 'input[type="checkbox"][name="span[]"][value="6"]'
},
category: {
selector: "#browsecat",
map: {
movie: "405",
tv: "406",
tvPack: "406",
documentary: "408",
concert: "409",
sport: "410",
cartoon: "407",
variety: "412"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
x264: "1",
hevc: "10",
x265: "10",
h265: "10",
mpeg2: "4",
mpeg4: "1",
vc1: "2",
xvid: "3",
dvd: "4"
}
},
audioCodec: {
selector: 'select[name="audiocodec_sel"]',
map: {
aac: "6",
ac3: "10",
dd: "10",
"dd+": "10",
flac: "1",
dts: "3",
truehd: "11",
lpcm: "5",
dtshdma: "3",
atmos: "3",
dtsx: "3"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: "12",
bluray: "1",
remux: "3",
encode: "7",
web: "10",
hdtv: "5",
dvd: "6",
dvdrip: "6",
other: "11"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"2160p": "5",
"1080p": "1",
"1080i": "1",
"720p": "3",
"576p": "4",
"480p": "4"
}
},
team: {
selector: 'select[name="team_sel"]',
map: {
btschool: "1",
zone: "13",
btshd: "2",
btstv: "3",
btspad: "4",
wiki: "5",
hdchina: "6",
hdbint: "7",
mteam: "9",
cmct: "10",
ourbits: "11",
other: "12"
}
}
},
BYR: {
url: "https://bt.byr.cn",
host: "byr.cn",
siteType: "NexusPHP",
icon: '',
asSource: false,
asTarget: true,
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
}
},
subtitle: {
selector: 'input[name="small_descr"]'
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
douban: {
selector: 'input[name="dburl"]'
}
},
Bdc: {
url: "https://broadcity.in",
host: "broadcity.in",
siteType: "Bdc",
icon: '',
asSource: false,
asTarget: false,
uploadPath: "/upload.php",
search: {
path: "/browse.php",
imdbOptionKey: "t_genre",
nameOptionKey: "t_name",
params: {
imdb: "{imdb}",
search_area: "{optionKey}"
}
}
},
BeiTai: {
url: "https://www.beitai.pt",
host: "beitai.pt",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: false,
seedDomSelector: "#top~table:first>tbody>tr:nth-child(5)",
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
}
},
BeyondHD: {
url: "https://beyond-hd.me",
host: "beyond-hd.me",
siteType: "F3NIX",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: ".table-details tr:last",
needDoubanInfo: true,
uploadPath: "/upload",
search: {
path: "/torrents/all",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
imdb: "{imdb}",
search: "{name}",
sorting: "size",
direction: "desc",
doSearch: "Search"
}
},
sourceInfo: {
editionTags: {
"10-bit": "10_bit",
"2-Disc Set": "2_disc_set",
"2D/3D Edition": "2d_3d_edition",
"2in1": "2_in_1",
"3D": "3d",
"3D Anaglyph": "3d_anaglyph",
"3D Full SBS": "3d_full_sbs",
"3D Half OU": "3d_half_ou",
"3D Half SBS": "3d_half_sbs",
"4K Remaster": "4k_remaster",
"4K Restoration": "4k_restoration",
"Digital Extras": "extras",
"Director's Cut": "director_s_cut",
"Dolby Atmos": "dolby_atmos",
"Dolby Vision": "dolby_vision",
"Dual Audio": "dual_audio",
"English Dub": "english_dub",
"Extended Cut": "extended_edition",
"Extended Edition": "extended_edition",
Extras: "extras",
HDR10: "hdr10",
"HDR10+": "hdr10_plus",
"Masters of Cinema": "masters_of_cinema",
Scene: "scene",
"The Criterion Collection": "the_criterion_collection",
"Theatrical Cut": "theatrical_cut",
Trumpable: null,
"Two-Disc Set": "two_disc_set",
Remux: "remux",
Rifftrax: "rifftrax",
Uncut: "uncut",
Unrated: "unrated",
"Warner Archive Collection": "warner_archive_collection",
Commentary: "with_commentary"
}
},
name: {
selector: "#title"
},
description: {
selector: "#upload-form-description"
},
imdb: {
selector: "#imdbauto"
},
tmdb: {
selector: "#tmdbauto"
},
mediaInfo: {
selector: "#mediainfo"
},
anonymous: {
selector: 'input[name="anonymous"]'
},
videoType: {
selector: "#category_id",
map: {
movie: "1",
tv: "2",
tvPack: "2"
}
},
category: {
selector: "#autotype",
map: {
BD100: "UHD 100",
BD66: "UHD 66",
UHD50: "UHD 50",
BD50: "BD 50",
BD25: "BD 25",
remux: [
"UHD Remux",
"BD Remux",
"DVD Remux"
],
encode: [
"2160p",
"1080p",
"720p",
"576p",
"540p",
"480p"
],
web: [
"2160p",
"1080p",
"720p",
"576p",
"540p",
"480p"
],
hdtv: [
"2160p",
"1080p",
"1080i",
"720p"
],
dvd: [
"DVD 9",
"DVD 5",
"DVD Remux"
],
dvdrip: [
"480p"
],
other: ""
}
},
source: {
selector: "#autosource",
map: {
uhdbluray: [
"Blu-ray"
],
bluray: [
"Blu-ray",
"BD 50",
"BD 25",
"BD Remux",
"UHD 100",
"UHD 66",
"UHD 50",
"UHD Remux",
"2160p",
"1080p",
"720p",
"576p",
"540p",
"480p"
],
hdtv: [
"HDTV",
"2160p",
"1080p",
"1080i",
"720p"
],
dvd: [
"DVD",
"DVD 9",
"DVD 5",
"DVD Remux",
"480p"
],
web: [
"WEB",
"2160p",
"1080p",
"720p",
"576p",
"540p",
"480p"
],
hddvd: "HD-DVD"
}
},
resolution: {
map: {
"2160p": [
"UHD 100",
"UHD 66",
"UHD 50",
"UHD Remux",
"2160p"
],
"1080p": [
"BD 50",
"BD 25",
"BD Remux",
"1080p"
],
"1080i": [
"BD 50",
"BD 25",
"BD Remux",
"1080i"
],
"720p": [
"720p"
],
"576p": [
"576p"
],
"540p": [
"540p"
],
"480p": [
"DVD 9",
"DVD 5",
"DVD Remux",
"480p"
],
other: [
"Other"
]
}
}
},
Bib: {
url: " https://bibliotik.me",
host: "bibliotik.me",
siteType: "Bib",
icon: '',
asSource: false,
asTarget: true,
uploadPath: "/upload",
name: {
selector: "#TitleField"
},
description: {
selector: "#DescriptionField"
},
anonymous: {
selector: "#AnonymousField"
},
image: {
selector: "#ImageField"
},
format: {
selector: "#FormatField",
map: {
epub: "15",
mobi: "16",
pdf: "2",
azw3: "21"
}
}
},
Blutopia: {
url: "https://blutopia.xyz",
host: "blutopia.xyz",
siteType: "UNIT3D",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/upload/1",
needDoubanInfo: true,
seedDomSelector: '#meta-info+.meta-general>.panel:has(".table-responsive"):first table tr:last',
search: {
path: "/torrents",
replaceKey: [
"tt",
""
],
params: {
name: "{name}",
imdbId: "{imdb}",
sortField: "size"
}
},
name: {
selector: "#title"
},
description: {
selector: "#upload-form-description"
},
imdb: {
selector: "#autoimdb"
},
tmdb: {
selector: "#autotmdb"
},
mediaInfo: {
selector: 'textarea[name="mediainfo"]'
},
anonymous: {
selector: '.radio-inline:first input[name="anonymous"]'
},
category: {
selector: "#browsecat",
map: {
movie: "1",
tv: "2",
tvPack: "2"
}
},
videoType: {
selector: "#autotype",
map: {
uhdbluray: "1",
bluray: "1",
remux: "3",
encode: "12",
web: "4",
hdtv: "6",
dvd: "1",
dvdrip: "12",
other: ""
}
},
resolution: {
selector: "#autores",
map: {
"4320p": "11",
"2160p": "1",
"1080p": "2",
"1080i": "3",
"720p": "5",
"576p": "6",
"480p": "8"
}
}
},
CHDBits: {
url: "https://chdbits.co",
host: "chdbits.co",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: "#top~table:first>tbody>tr:nth-child(6)",
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: 'textarea[name="descr"]'
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
anonymous: {
selector: 'input[name="uplver"]'
},
tags: {
chinese_audio: 'input[name="cnlang"]',
chinese_subtitle: 'input[name="cnsub"]',
diy: 'input[name="diy"]'
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "403",
tvPack: "402",
documentary: "404",
cartoon: "405",
sport: "407",
concert: "406"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
hevc: "5",
h265: "5",
x264: "1",
x265: "5",
mpeg2: "4",
mpeg4: "6",
vc1: "2",
xvid: "6"
}
},
audioCodec: {
selector: 'select[name="audiocodec_sel"]',
map: {
aac: "6",
ac3: "7",
dd: "4",
"dd+": "7",
flac: "1",
dts: "3",
truehd: "11",
lpcm: "13",
dtshdma: "10",
atmos: "10",
dtsx: "3"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: [
"19"
],
bluray: [
"1"
],
remux: [
"3"
],
encode: [
"4"
],
web: [
"18"
],
hdtv: [
"6"
]
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"2160p": [
"6"
],
"1080p": [
"1"
],
"1080i": [
"2"
],
"720p": [
"3"
],
"480p": [
"5"
]
}
},
area: {
selector: 'select[name="processing_sel"]',
map: {
CN: "8",
US: "3",
EU: "7",
HK: "5",
TW: "9",
JP: "4",
KR: "6",
OT: "0"
}
},
team: {
selector: 'select[name="team_sel"]',
map: {
chdbits: "14",
sgnb: "13",
remux: "1",
chdtv: "2",
chdpad: "15",
chdweb: "12",
chdhktv: "11",
stbox: "10",
onehd: "8",
blucook: "16",
hqc: "17",
gbt: "18",
kan: "19"
}
}
},
DiscFan: {
url: "https://discfan.net",
host: "discfan.net",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: "#top~table:first>tbody>tr:nth-child(3)",
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: 'textarea[name="descr"]'
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
douban: {
selector: 'input[name="douban_url"]'
},
category: {
selector: "#browsecat1",
map: {
tv: "411",
tvPack: "411",
documentary: "413",
cartoon: "419",
sport: "417",
concert: "414",
variety: "416"
}
},
videoType: {
selector: 'select[name="source_sel"]',
map: {
uhdbluray: "2",
bluray: "3",
remux: "0",
encode: "0",
web: "9",
hdtv: "1",
dvd: "4",
hddvd: "4",
dvdrip: "10",
other: "0"
}
},
area: {
selector: "#browsecat",
map: {
CN: "401",
US: "410",
EU: "410",
HK: "404",
TW: "405",
JP: "403",
KR: "406"
}
}
},
EMP: {
url: "https://www.empornium.is",
host: "empornium.is",
siteType: "gazelle",
asSource: true,
asTarget: false,
uploadPath: "/upload.php"
},
FL: {
url: "https://filelist.io",
host: "filelist.io",
siteType: "FL",
icon: '',
asSource: false,
asTarget: false,
uploadPath: "/upload.php",
search: {
path: "/browse.php",
imdbOptionKey: "3",
nameOptionKey: "0",
params: {
search: "{imdb}",
searchin: "{optionKey}",
sort: "3"
}
}
},
GPW: {
url: "https://greatposterwall.com",
host: "greatposterwall.com",
siteType: "gazelle",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
params: {
searchstr: "{imdb}",
order_by: "size",
order_way: "desc",
group_results: 1,
action: "basic",
searchsubmit: 1
}
},
needDoubanInfo: true,
sourceInfo: {
editionTags: {
"10-bit": "10_bit",
"2D/3D\u7248": "2d_3d_edition",
"4K\u4FEE\u590D\u7248": "4k_restoration",
"4K\u91CD\u5236\u7248": "4k_remaster",
DIY: "diy",
"DTS:X": "dts_x",
"HDR10+": "hdr10plus",
HDR10: "hdr10",
Remux: "remux",
Rifftrax: "rifftrax",
Scene: null,
\u534A\u9AD83D: "3d_half_ou",
\u534A\u5BBD3D: "3d_half_sbs",
\u6807\u51C6\u6536\u85CF: "the_criterion_collection",
\u91CD\u5236\u7248: "remaster",
\u5BFC\u6F14\u526A\u8F91\u7248: "director_s_cut",
\u7535\u5F71\u5927\u5E08: "masters_of_cinema",
\u675C\u6BD4\u5168\u666F\u58F0: "dolby_atmos",
\u675C\u6BD4\u89C6\u754C: "dolby_vision",
\u989D\u5916\u5185\u5BB9: "extras",
\u4E8C\u5408\u4E00: "2_in_1",
\u7EA2\u84DD3D: "3d_anaglyph",
\u534E\u7EB3\u6863\u6848\u9986: "warner_archive_collection",
\u52A0\u957F\u7248: "extended_edition",
\u8BC4\u8BBA\u97F3\u8F68: "with_commentary",
\u5168\u5BBD3D: "3d_full_sbs",
\u53CC\u789F\u5957\u88C5: "2_disc_set",
\u53CC\u97F3\u8F68: "dual_audio",
\u672A\u5206\u7EA7\u7248: "unrated",
\u672A\u5220\u51CF\u7248: "uncut",
\u82F1\u8BED\u914D\u97F3: "english_dub",
\u5F71\u9662\u7248: "theatrical_cut",
\u4E2D\u5B57: "chinese_subtitle"
}
},
targetInfo: {
editionTags: {
"10_bit": "10_bit",
"2_disc_set": "2_disc_set",
"2d_3d_edition": "2d_3d_edition",
"2_in_1": "2_in_1",
"3d": "3d",
"3d_anaglyph": "3d_anaglyph",
"3d_full_sbs": "3d_full_sbs",
"3d_half_ou": "3d_half_ou",
"3d_half_sbs": "3d_half_sbs",
"4k_remaster": "4k_remaster",
"4k_restoration": "4k_restoration",
director_s_cut: "director_s_cut",
dolby_atmos: "dolby_atmos",
dolby_vision: "dolby_vision",
dual_audio: "dual_audio",
english_dub: "english_dub",
extended_edition: "extended_edition",
extras: "extras",
hdr10: "hdr10",
hdr10_plus: "hdr10plus",
masters_of_cinema: "masters_of_cinema",
scene: null,
the_criterion_collection: "the_criterion_collection",
theatrical_cut: "theatrical_cut",
two_disc_set: "2_disc_set",
remux: null,
rifftrax: "rifftrax",
uncut: "uncut",
unrated: "unrated",
warner_archive_collection: "warner_archive_collection",
with_commentary: "with_commentary"
}
},
description: {
selector: "#release_desc"
},
imdb: {
selector: "#imdb"
},
mediaInfo: {
selector: 'textarea[name="mediainfo[]"]'
},
category: {
selector: "#releasetype",
map: {
movie: "1",
tv: "3",
tvPack: "3",
concert: "5"
}
},
source: {
selector: "#source",
map: {
uhdbluray: "Blu-ray",
bluray: "Blu-ray",
web: "WEB",
hdtv: "HDTV",
hddvd: "HD-DVD",
dvd: "DVD",
other: "Other"
}
},
videoCodec: {
selector: "#codec",
map: {
h264: "H.264",
hevc: "H.265",
x264: "x264",
x265: "x265",
h265: "H.265",
mpeg2: "Other",
mpeg4: "H.264",
vc1: "Other",
xvid: "xvid"
}
},
resolution: {
selector: "#resolution",
map: {
NTSC: "NTSC",
PAL: "PAL",
"2160p": "2160p",
"1080p": "1080p",
"1080i": "1080i",
"720p": "720p",
"576p": "576p",
"480p": "480p"
}
},
format: {
selector: "#container",
map: {
mkv: "MKV",
mp4: "MP4",
avi: "AVI",
ts: "TS",
wmv: "WMV",
vob: "VOB IFO",
iso: "ISO",
mpg: "MPG",
m2ts: "m2ts"
}
},
videoType: {
selector: "#processing",
map: {
encode: "Encode",
remux: "Remux",
DIY: "DIY",
bluray: "Untouched",
uhdbluray: "Untouched",
dvd: "Untouched",
dvdrip: "Encode"
}
}
},
HD4FANS: {
url: "https://pt.hd4fans.org",
host: "hd4fans.org",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/upload.php",
seedDomSelector: "#top~table:first>tbody>tr:nth-child(3)",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "403",
tvPack: "402",
documentary: "404",
concert: "406",
sport: "407",
cartoon: "405",
variety: "405"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: "1",
bluray: "1",
hddvd: "2",
remux: "3",
encode: "7",
web: "7",
hdtv: "5",
dvd: "6",
dvdrip: "6",
other: ""
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
hevc: "10",
x264: "1",
x265: "10",
h265: "10",
mpeg2: "4",
mpeg4: "5",
vc1: "2",
xvid: "3",
dvd: "4"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"2160p": "5",
"1080p": "1",
"1080i": "2",
"720p": "3",
"576p": "4",
"480p": "4"
}
},
team: {
selector: 'select[name="team_sel"]',
map: {
chd: "2",
mysilu: "3",
wiki: "4",
other: "5",
cmct: "6",
r2ts: "7",
kbits: "8"
}
}
},
HDAI: {
url: "http://www.hd.ai",
host: "hd.ai",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/Torrents.upload",
seedDomSelector: "#top~table:first>tbody>tr:nth-child(3)",
search: {
path: "/Torrents.index",
imdbOptionKey: "9",
nameOptionKey: "1",
params: {
name: "{name}",
search_area: "{optionKey}",
imdb: "{imdb}"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
poster: 'input[name="poster"]',
imdb: {
selector: 'input[name="url"][type="text"]'
},
mediaInfo: {
selector: 'textarea[name="nfo"]'
},
screenshots: {
selector: 'textarea[name="screenshot"]'
},
tags: {
chinese_audio: 'input[type="checkbox"][name="tag[cn]"]',
chinese_subtitle: 'input[type="checkbox"][name="tag[zz]"]'
},
category: {
selector: 'select[name="type"]',
map: {
movie: "1",
tv: "2",
tvPack: "2",
documentary: "4",
concert: "6",
sport: "7",
cartoon: "5",
variety: "3"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "2",
hevc: "1",
x264: "2",
x265: "1",
h265: "1",
mpeg2: "5",
mpeg4: "2",
vc1: "3",
xvid: "4",
dvd: "5"
}
},
audioCodec: {
selector: 'select[name="audiocodec_sel"]',
map: {
aac: "10",
ac3: "11",
dd: "11",
"dd+": "11",
flac: "7",
dts: "5",
truehd: "4",
lpcm: "6",
dtshdma: "2",
atmos: "3",
dtsx: "1"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: "1",
bluray: "2",
remux: "3",
encode: "5",
web: "4",
hdtv: "6",
dvd: "7",
dvdrip: "10",
other: "0"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"4320p": "1",
"2160p": "2",
"1080p": "3",
"1080i": "4",
"720p": "5",
"576p": "6",
"480p": "6"
}
},
area: {
selector: 'select[name="source_sel"]',
map: {
CN: "1",
US: "2",
EU: "2",
HK: "3",
TW: "3",
JP: "4",
KR: "5",
OT: "6"
}
},
team: {
selector: 'select[name="team_sel"]',
map: {
other: "1",
ao: "20",
beitai: "18",
beyondhd: "19",
beast: "23",
chd: "2",
chdbits: "3",
cmct: "4",
frds: "5",
fltth: "17",
hdai: "6",
hdchina: "7",
hdhome: "8",
hdsky: "9",
lemonhd: "28",
leaguehd: "29",
mteam: "10",
nypt: "24",
ngb: "26",
ourtv: "11",
ourbits: "12",
pter: "13",
pthome: "14",
putao: "22",
strife: "21",
tjupt: "15",
ttg: "16",
tlf: "30",
u2: "31",
wiki: "25"
}
}
},
HDArea: {
url: "https://www.hdarea.co",
host: "hdarea.co",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: "#top~table:first>tbody>tr:nth-child(3)",
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
douban: {
selector: 'input[name="dburl"]'
},
anonymous: {
selector: 'input[name="uplver"]'
},
category: {
selector: "#browsecat",
map: {
movie: [
"300",
"401",
"415",
"416",
"410",
"411",
"414",
"412",
"413",
"417"
],
tv: [
"402",
"403"
],
tvPack: "402",
documentary: "404",
concert: "406",
sport: "407",
cartoon: "405",
variety: "403"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "7",
x264: "7",
hevc: "6",
x265: "6",
h265: "6",
mpeg2: "4",
mpeg4: "1",
vc1: "2",
xvid: "0",
dvd: "0"
}
},
audioCodec: {
selector: 'select[name="audiocodec_sel"]',
map: {
aac: "6",
ac3: "11",
dd: "5",
"dd+": "4",
flac: "1",
dts: "3",
truehd: "7",
lpcm: "8",
dtshdma: "4",
atmos: "10",
dtsx: "0"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: [
"1",
"300"
],
bluray: [
"1",
"401"
],
remux: [
"3",
"415"
],
encode: "7",
web: [
"9",
"412"
],
hdtv: [
"5",
"413"
],
dvd: [
"2",
"414"
],
dvdrip: "6",
other: "0"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"2160p": "5",
"1080p": [
"1",
"410"
],
"1080i": "2",
"720p": [
"3",
"411"
],
"576p": "4",
"480p": "4"
}
},
team: {
selector: 'select[name="team_sel"]',
map: {
epic: "1",
hdarea: "2",
hdwing: "3",
wiki: "4",
ttg: "5",
other: "6",
mteam: "7",
hdapad: "8",
chd: "9",
hdaccess: "10",
hdatv: "11",
cxcy: "12",
cmct: "13"
}
}
},
HDAtmos: {
url: "https://hdatmos.club",
host: "hdatmos.club",
siteType: "NexusPHP",
icon: '',
asSource: false,
asTarget: true,
seedDomSelector: "#top~table:first>tbody>tr:nth-child(3)",
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: 'textarea[name="descr"]'
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "402",
tvPack: "402",
documentary: "404",
cartoon: "405",
sport: "407",
concert: "406"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
hevc: "10",
h265: "10",
x264: "1",
x265: "10",
mpeg2: "4",
mpeg4: "1",
vc1: "2",
xvid: "3"
}
},
audioCodec: {
selector: 'select[name="audiocodec_sel"]',
map: {
aac: "20",
ac3: "22",
dd: "23",
"dd+": "23",
flac: "17",
dts: "14",
truehd: "13",
lpcm: "15",
dtshdma: "10",
atmos: "11",
dtsx: "12"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: "1",
bluray: "1",
remux: "3",
encode: "7",
web: "10",
hdtv: "5",
dvd: "6",
hddvd: "2",
dvdrip: "13",
other: "13"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"4320p": "15",
"2160p": "10",
"1080p": "11",
"1080i": "12",
"720p": "13",
"576p": "14",
"480p": "14"
}
},
area: {
selector: 'select[name="processing_sel"]',
map: {
CN: "3",
US: "4",
EU: "8",
HK: "5",
TW: "3",
JP: "5",
KR: "6",
OT: "9"
}
},
source: {
selector: 'select[name="source_sel"]',
map: {
uhdbluray: "6",
bluray: "6",
hdtv: "3",
dvd: "8",
web: "2",
vhs: "12",
hddvd: "7"
}
},
team: {
selector: 'select[name="team_sel"]',
map: {
other: "22"
}
}
},
HDBits: {
url: "https://hdbits.org",
host: "hdbits.org",
siteType: "HDB",
icon: '',
asSource: true,
asTarget: true,
needDoubanInfo: true,
uploadPath: "/upload.php",
seedDomSelector: "#details >tbody >tr:contains(Last seeded)",
search: {
path: "/browse.php",
params: {
sort: "size",
d: "DESC",
search: "{imdb}"
}
},
name: {
selector: "#name"
},
description: {
selector: "#descr"
},
imdb: {
selector: "#imdb"
},
mediaInfo: {
selector: 'textarea[name="techinfo"]'
},
category: {
selector: "#type_category",
map: {
movie: "1",
tv: "2",
tvPack: "2",
documentary: "3",
concert: "4",
sport: "5",
cartoon: "1"
}
},
videoCodec: {
selector: "#type_codec",
map: {
h264: "1",
h265: "5",
hevc: "5",
x264: "1",
x265: "5",
mpeg2: "2",
vc1: "3",
xvid: "4",
bluray: "1",
uhdbluray: "5",
vp9: "6"
}
},
videoType: {
selector: "#type_medium",
map: {
uhdbluray: "1",
bluray: "1",
remux: "5",
encode: "3",
web: "6",
hdtv: "4"
}
}
},
HDChina: {
url: "https://hdchina.org",
host: "hdchina.org",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: ".table_details>tbody>tr:nth-child(1)",
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrent_list>tbody>tr",
url: '.tbname td a[href*="details.php?id="]',
name: '.tbname td a[href*="details.php?id="]',
size: ".t_size"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
poster: "#cover",
imdb: {
selector: 'input[name="url"][type="text"]'
},
douban: {
selector: 'input[name="douban_id"]'
},
anonymous: {
selector: 'input[name="uplver"]'
},
category: {
selector: "#browsecat",
map: {
movie: [
"20",
"17",
"16",
"9",
"410",
"27"
],
tv: [
"13",
"25",
"26",
"24",
"27"
],
tvPack: [
"20",
"21",
"22",
"23",
"27"
],
documentary: [
"20",
"5",
"27"
],
concert: "402",
sport: "15",
cartoon: "14",
variety: "401"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
hevc: "10",
x264: "6",
x265: "10",
h265: "10",
mpeg2: "4",
mpeg4: [
"1",
"27"
],
vc1: "2",
xvid: "3",
dvd: "4"
}
},
audioCodec: {
selector: 'select[name="audiocodec_sel"]',
map: {
aac: "6",
ac3: "8",
dd: "8",
"dd+": "8",
dts: "3",
truehd: "13",
lpcm: "11",
dtshdma: "12",
atmos: "15",
dtsx: "14",
flac: "1"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: [
"11",
"20",
"410"
],
bluray: [
"11",
"20"
],
remux: "6",
encode: "5",
web: "21",
hdtv: "13",
dvd: "14",
dvdrip: "4",
other: "15"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"2160p": [
"17",
"13",
"25",
"26",
"24",
"21",
"22",
"23",
"410"
],
"1080p": [
"11",
"17",
"13",
"25",
"26",
"24",
"21",
"22",
"23"
],
"1080i": [
"12",
"16",
"13",
"25",
"26",
"24",
"21",
"22",
"23"
],
"720p": [
"13",
"9",
"13",
"25",
"26",
"24",
"21",
"22",
"23"
],
"576p": "15",
"480p": "15"
}
},
area: {
map: {
CN: [
"25",
"22"
],
US: [
"13",
"21"
],
EU: [
"13",
"21"
],
HK: [
"25",
"22"
],
TW: [
"25",
"22"
],
JP: [
"24",
"23"
],
KR: [
"26",
"23"
]
}
},
team: {
selector: 'select[name="team_sel"]',
map: {
hdchina: "15",
hdctv: "16",
ihd: "12",
hdwing: "10",
hdwtv: "11",
kishd: "17",
openmv: "7",
hdc: "22",
diy: "23",
khq: "6",
exren: "30",
joma: "26",
anonymous: "25",
crss: "24",
ebp: "18",
don: "19",
esir: "20",
trollhd: "29",
wiki: "9",
beast: "4",
cmct: "2",
ngb: "8",
lu9998: "21",
taichi: "28",
u2: "27",
enichi: "31",
arey: "32",
other: "5"
}
}
},
HDDolby: {
url: "https://www.hddolby.com",
host: "hddolby.com",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: "#top~table:first>tbody>tr:nth-child(3)",
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
douban: {
selector: 'input[name="douban_id"]'
},
tags: {
chinese_audio: "#tag_gy",
diy: "#tag_diy",
chinese_subtitle: "#tag_zz",
cantonese_audio: "#tag_yy",
hdr: "#tag_hdr10",
hdr10_plus: "#tag_hdrm",
dolby_vision: "#tag_db"
},
anonymous: {
selector: 'input[name="uplver"]'
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "402",
tvPack: "402",
documentary: "404",
concert: "406",
sport: "407",
cartoon: "405",
variety: "403"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
x264: "3",
hevc: "2",
x265: "4",
h265: "2",
mpeg2: "6",
mpeg4: "0",
vc1: "5",
xvid: "0",
dvd: "0"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: "1",
bluray: "2",
remux: "3",
encode: "10",
web: "6",
hdtv: "5",
dvd: "8",
dvdrip: "8",
other: "0"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"2160p": "1",
"1080p": "2",
"1080i": "3",
"720p": "4",
"576p": "5",
"480p": "5"
}
},
team: {
selector: 'select[name="team_sel"]',
map: {
dream: "1",
hdo: "9",
dbtv: "10",
nazorip: "12",
mteam: "2",
frds: "7",
wiki: "4",
beast: "11",
chd: "5",
cmct: "6",
pthome: "3",
other: "8"
}
}
},
HDF: {
url: "https://hdf.world",
host: "hdf.world",
siteType: "gazelle",
icon: '',
asSource: false,
asTarget: false,
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
params: {
order_way: "desc",
order_by: "time",
searchstr: "{name}",
group_results: "1",
action: "basic"
}
}
},
HDFans: {
url: "https://hdfans.org",
host: "hdfans.org",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/upload.php",
seedDomSelector: "#top~table:first>tbody>tr:nth-child(5)",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
anonymous: {
selector: 'input[name="uplver"]'
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "402",
tvPack: "402",
documentary: "403",
concert: "441",
sport: "418",
cartoon: "417",
variety: "416",
app: "419",
ebook: "423",
audioBook: "405"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
hevc: "3",
x264: "2",
x265: "4",
h265: "3",
mpeg2: "10",
mpeg4: "11",
vc1: "5",
xvid: "12"
}
},
source: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: "1",
bluray: "2",
hdtv: "6",
dvd: "7",
web: "5",
vhs: "10",
hddvd: "17",
cd: "9",
sacd: "16"
}
},
audioCodec: {
selector: 'select[name="audiocodec_sel"]',
map: {
aac: "11",
ac3: "10",
dd: "21",
"dd+": "21",
flac: "12",
dts: "2",
truehd: "6",
lpcm: "7",
dtshdma: "4",
atmos: "1",
dtsx: "3",
ape: "13",
wav: "14",
mp3: "17",
m4a: "5",
other: "7"
}
},
videoType: {
selector: 'select[name="source_sel"]',
map: {
uhdbluray: "1",
bluray: "3",
remux: "10",
encode: "9",
web: "7",
hdtv: "6",
dvd: "17",
dvdrip: "17",
other: "10"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"4320p": "1",
"2160p": [
"2",
"10",
"9"
],
"1080p": [
"3",
"5",
"8"
],
"1080i": [
"4",
"5",
"8"
],
"720p": [
"5",
"11"
],
"576p": "6",
"480p": "6"
}
},
area: {
selector: 'select[name="processing_sel"]',
map: {
CN: "1",
US: "2",
EU: "8",
HK: "4",
TW: "5",
JP: "6",
KR: "7",
OT: "9"
}
},
team: {
selector: 'select[name="team_sel"]',
map: {
hdfans: "9",
hdf: "10",
chd: "1",
hdc: "2",
ttg: "19",
wiki: "3",
beast: "4",
cmct: "5",
frds: "6",
hdsky: "7",
ourbits: "17",
hdhome: "18",
pthome: "16",
tlf: "8",
pter: "20",
pbk: "21"
}
}
},
HDHome: {
url: "https://hdhome.org",
host: "hdhome.org",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/upload.php",
seedDomSelector: "#top~table:first>tbody>tr:nth-child(5)",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
douban: {
selector: 'input[name="douban_id"]'
},
anonymous: {
selector: 'input[name="uplver"]'
},
tags: {
chinese_audio: "#tag_gy",
diy: "#tag_diy",
cantonese_audio: "#tag_yy",
chinese_subtitle: "#tag_zz",
hdr: "#tag_hdr10",
hdr10_plus: "#tag_hdrm",
dolby_vision: "#tag_db"
},
category: {
selector: "#browsecat",
map: {
movie: [
"411",
"412",
"413",
"414",
"415",
"450",
"499",
"416"
],
tv: [
"425",
"426",
"471",
"427",
"428",
"429",
"430",
"452",
"431"
],
tvPack: [
"432",
"433",
"434",
"435",
"436",
"437",
"438",
"502"
],
documentary: [
"417",
"418",
"419",
"420",
"421",
"451",
"500",
"422"
],
concert: "441",
sport: [
"442",
"443"
],
cartoon: [
"444",
"445",
"446",
"447",
"448",
"454",
"449",
"501"
],
variety: []
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
hevc: "12",
x264: "1",
x265: "2",
h265: "2",
mpeg2: "4",
mpeg4: "1",
vc1: "3",
xvid: "5",
dvd: "5"
}
},
source: {
selector: 'select[name="source_sel"]',
map: {
uhdbluray: "9",
bluray: "1",
hdtv: "4",
dvd: "3",
web: "7",
vhs: "8",
hddvd: "8"
}
},
audioCodec: {
selector: 'select[name="audiocodec_sel"]',
map: {
aac: "6",
ac3: "15",
dd: "15",
"dd+": "15",
dts: "3",
truehd: "13",
lpcm: "14",
dtshdma: "11",
atmos: "12",
dtsx: "17"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: [
"10",
"499",
"500",
"502",
"501"
],
bluray: [
"1",
"450",
"451",
"452",
"453",
"454"
],
remux: [
"3",
"415",
"421",
"430",
"437",
"448"
],
encode: [
"7",
"411",
"412",
"413",
"414",
"416",
"417",
"418",
"419",
"420",
"422",
"425",
"426",
"471",
"427",
"428",
"429",
"431",
"432",
"433",
"434",
"435",
"436",
"438",
"444",
"445",
"446",
"447",
"449"
],
web: [
"11",
"411",
"412",
"413",
"414",
"416",
"417",
"418",
"419",
"420",
"422",
"425",
"426",
"471",
"427",
"429",
"431",
"432",
"433",
"434",
"436",
"438",
"444",
"445",
"446",
"447",
"449"
],
hdtv: [
"5",
"412",
"413",
"416",
"418",
"419",
"422",
"424",
"426",
"471",
"427",
"428",
"431",
"433",
"434",
"435",
"438",
"442",
"443",
"445",
"446",
"449"
],
dvd: [
"",
"411",
"417",
"425",
"432",
"444"
],
dvdrip: [
"7",
"411",
"417",
"425",
"432",
"444"
],
other: ""
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"2160p": [
"1",
"499",
"416",
"500",
"422",
"431",
"438",
"502",
"449",
"501"
],
"1080p": [
"2",
"414",
"420",
"429",
"436",
"447"
],
"1080i": [
"3",
"424",
"428",
"435",
"443"
],
"720p": [
"4",
"413",
"419",
"423",
"427",
"434",
"442",
"446"
],
"576p": [
"5",
"411",
"417",
"425",
"432",
"444"
],
"480p": [
"5",
"411",
"417",
"425",
"432",
"444"
]
}
},
team: {
selector: 'select[name="team_sel"]',
map: {
"3201": "20",
"969154968": "22",
hdhome: "1",
hdh: "2",
hdhtv: "3",
hdhpad: "4",
hdhweb: "12",
shma: "17",
tvman: "21",
arin: "19",
ttg: "6",
mteam: "7",
other: "11"
}
}
},
HDMaYi: {
url: "http://hdmayi.com",
host: "hdmayi.com",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: "#top~table:first>tbody>tr:nth-child(3)",
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
anonymous: {
selector: 'input[name="uplver"]'
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "402",
tvPack: "402",
documentary: "404",
concert: "406",
sport: "407",
cartoon: "405",
variety: "403"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "2",
x264: "6",
hevc: "3",
x265: "5",
h265: "1",
mpeg2: "7",
mpeg4: "4",
vc1: "7",
xvid: "7",
dvd: "7"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: "1",
bluray: "1",
remux: "2",
encode: "4",
web: "5",
hdtv: "6",
dvd: "7",
dvdrip: "4",
other: "0",
cd: "8"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"2160p": "1",
"1080p": "2",
"1080i": "3",
"720p": "4",
"576p": "5",
"480p": "5"
}
},
team: {
selector: 'select[name="team_sel"]',
map: {
hds: "1",
chd: "2",
mt: "3",
wiki: "4",
cmct: "5",
cnxp: "6",
hdh: "7",
fgt: "8",
mz: "9",
other: "10"
}
}
},
HDPOST: {
url: "https://pt.hdpost.top",
host: "hdpost.top",
siteType: "UNIT3D",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/upload/1",
needDoubanInfo: true,
seedDomSelector: '#meta-info+.meta-general>.panel:has(".table-responsive"):first table tr:last',
search: {
path: "/torrents",
params: {
name: "{name}",
imdb: "{imdb}"
}
},
name: {
selector: "#title"
},
description: {
selector: "#upload-form-description"
},
imdb: {
selector: "#autoimdb"
},
tmdb: {
selector: "#autotmdb"
},
mediaInfo: {
selector: 'textarea[name="mediainfo"]'
},
anonymous: {
selector: '.radio-inline:first input[name="anonymous"]'
},
category: {
selector: "#browsecat",
map: {
movie: "1",
tv: "2",
tvPack: "2"
}
},
videoType: {
selector: "#autotype",
map: {
uhdbluray: "1",
bluray: "1",
remux: "2",
encode: "3",
web: "4",
hdtv: "6",
dvd: "1",
dvdrip: "12",
other: ""
}
},
resolution: {
selector: "#autores",
map: {
"4320p": "1",
"2160p": "2",
"1080p": "3",
"1080i": "4",
"720p": "5",
"576p": "6",
"480p": "8"
}
}
},
HDRoute: {
url: "http://hdroute.org",
host: "hdroute.org",
siteType: "NexusPHP",
icon: '',
asSource: false,
asTarget: true,
uploadPath: "/upload.php",
search: {
path: "/browse.php",
imdbOptionKey: "4",
nameOptionKey: "0",
replaceKey: [
"tt",
""
],
params: {
s: "{name}",
dp: "0",
add: "0",
action: "s",
or: "4",
imdb: "{imdb}"
}
},
name: {
selector: "#title_eng"
},
subtitle: {
selector: 'input[name="title_sub"]'
},
description: {
selector: 'textarea[name="description"]'
},
poster: 'input[name="poster_big"]',
imdb: {
selector: "#upload-imdb_url"
},
anonymous: {
selector: 'input[name="is_anonymous"]'
},
tags: {
chinese_audio: 'input[name="is_mandrain"]',
cantonese_audio: 'input[name="is_cantonese"]',
diy: 'input[name="is_diyed"]',
chinese_subtitle: 'input[name="is_chs_sub_incl"]'
},
category: {
selector: "#type_category",
map: {
movie: "1",
tv: "3",
tvPack: "3",
documentary: "2",
concert: "5",
sport: "6",
cartoon: "4",
variety: "9"
}
},
videoCodec: {
selector: "#type_codec",
map: {
h264: "1",
hevc: "7",
x264: "1",
x265: "7",
h265: "7",
mpeg2: "3",
mpeg4: "1",
vc1: "2",
xvid: "4",
dvd: "3"
}
},
audioCodec: {
selector: "#type_audio",
map: {
aac: "9",
ac3: "5",
dd: "5",
"dd+": "5",
flac: "7",
dts: "4",
truehd: "3",
lpcm: "1",
dtshdma: "2",
atmos: "2",
dtsx: "4"
}
},
videoType: {
selector: "#type_medium",
map: {
uhdbluray: "1",
bluray: "1",
remux: "2",
encode: "4",
web: "6",
hddvd: "6",
hdtv: "3",
dvd: "6",
dvdrip: "6",
other: "6"
}
},
resolution: {
selector: "#type_resolution",
map: {
"2160p": "7",
"1080p": "1",
"1080i": "2",
"720p": "4",
"576p": "6",
"480p": "6"
}
}
},
HDSky: {
url: "https://hdsky.me",
host: "hdsky.me",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: "#top~table:first>tbody>tr:nth-child(5)",
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: 'input[name="name"]'
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
douban: {
selector: 'input[name="url_douban"]'
},
anonymous: {
selector: 'input[name="uplver"]'
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "402",
tvPack: "411",
documentary: "404",
concert: "406",
sport: "407",
cartoon: "405",
variety: "403"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
hevc: "12",
x264: "10",
x265: "13",
h265: "12",
mpeg2: "4",
mpeg4: "1",
vc1: "2",
xvid: "3",
dvd: "4"
}
},
audioCodec: {
selector: 'select[name="audiocodec_sel"]',
map: {
aac: "6",
ac3: "12",
dd: "12",
"dd+": "12",
flac: "1",
dts: "3",
truehd: "11",
lpcm: "13",
dtshdma: "10",
atmos: "17",
dtsx: "16"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: "13",
bluray: "1",
remux: "3",
encode: "7",
web: "11",
hddvd: "2",
hdtv: "5",
dvd: "6",
dvdrip: "6",
other: "0"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"2160p": "5",
"1080p": "1",
"1080i": "2",
"720p": "3",
"576p": "4",
"480p": "4"
}
}
},
HDSpace: {
url: "https://hd-space.org",
host: "hd-space.org",
siteType: "HDSpace",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: "#mcol>table>tbody>tr:last table:first>tbody>tr:nth-child(2)",
needDoubanInfo: true,
uploadPath: "/index.php?page=upload",
search: {
path: "/index.php",
imdbOptionKey: "2",
nameOptionKey: "0",
replaceKey: [
"tt",
""
],
params: {
search: "{imdb}",
page: "torrents",
options: "{optionKey}",
order: 4,
by: 2
}
},
name: {
selector: "#filename"
},
imdb: {
selector: 'input[name="imdb"]'
},
description: {
selector: 'textarea[name="info"]'
},
anonymous: {
selector: 'input[name="anonymous"][value="true"]'
},
category: {
selector: 'select[name="category"]',
map: {
movie: [
"15",
"40",
"16",
"18",
"19",
"41"
],
tv: [
"15",
"40",
"16",
"21",
"22"
],
tvPack: [
"15",
"40",
"16",
"21",
"22"
],
documentary: [
"15",
"40",
"16",
"24",
"25"
],
cartoon: [
"15",
"40",
"16",
"27",
"28"
],
concert: [
"15",
"40",
"16",
"31"
]
}
},
videoType: {
map: {
uhdbluray: [
"15"
],
bluray: [
"15"
],
remux: [
"40"
],
encode: [
"18",
"19",
"41",
"21",
"22",
"24",
"25",
"27",
"28",
"31"
],
web: [
"18",
"19",
"41",
"21",
"22",
"24",
"25",
"27",
"28",
"31"
],
hdtv: [
"18",
"19",
"41",
"21",
"22",
"24",
"25",
"27",
"28",
"31"
]
}
},
resolution: {
map: {
"2160p": [
"15",
"40",
"16",
"41"
],
"1080p": [
"19",
"22",
"25",
"28",
"31"
],
"1080i": [
"19",
"22",
"25",
"28",
"31"
],
"720p": [
"18",
"21",
"24",
"24",
"31"
]
}
}
},
HDT: {
url: "https://hd-torrents.org",
host: "hd-torrents.org",
siteType: "HDT",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: ".listadetails>tbody>tr:nth-child(2)",
needDoubanInfo: true,
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
imdbOptionKey: "2",
nameOptionKey: "3",
params: {
search: "{imdb}",
options: "{optionKey}",
order: "size",
by: "DESC"
}
},
name: {
selector: 'input[name="filename"]'
},
imdb: {
selector: 'input[name="infosite"]'
},
description: {
selector: 'textarea[name="info"]'
},
tags: {
hdr: 'input[name="HDR10"]',
hdr10_plus: 'input[name="HDR10Plus"]',
dolby_vision: 'input[name="DolbyVision"]'
},
anonymous: {
selector: 'input[name="anonymous"][value="true"]'
},
category: {
selector: 'select[name="category"]',
map: {
movie: [
"70",
"1",
"71",
"2",
"64",
"5",
"3",
"63"
],
tv: [
"72",
"59",
"73",
"60",
"65",
"30",
"38"
],
tvPack: [
"72",
"59",
"73",
"60",
"65",
"30",
"38"
],
documentary: [
"70",
"1",
"71",
"2",
"64",
"5",
"3",
"63"
],
cartoon: [
"70",
"1",
"71",
"2",
"64",
"5",
"3",
"63"
],
concert: [
"61",
"62",
"66",
"57",
"45",
"44"
],
variety: [
"72",
"59",
"73",
"60",
"65",
"30",
"38"
]
}
},
videoType: {
map: {
uhdbluray: [
"70",
"72"
],
bluray: [
"1",
"59",
"61"
],
remux: [
"71",
"2",
"62",
"73",
"60"
],
encode: [
"64",
"5",
"3",
"65",
"30",
"38",
"66",
"57",
"45"
],
web: [
"64",
"5",
"3",
"65",
"30",
"38",
"66",
"57",
"45"
],
hdtv: [
"64",
"5",
"3",
"65",
"30",
"38",
"66",
"57",
"45"
]
}
},
resolution: {
map: {
"2160p": [
"70",
"72",
"71",
"73",
"64",
"65",
"66"
],
"1080p": [
"1",
"59",
"61",
"2",
"60",
"62",
"5",
"30",
"57"
],
"1080i": [
"1",
"59",
"61",
"2",
"60",
"62",
"5",
"30",
"57"
],
"720p": [
"3",
"38",
"45"
]
}
}
},
HDTime: {
url: "https://hdtime.org",
host: "hdtime.org",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: "#top~table:first>tbody>tr:nth-child(5)",
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
mediaInfo: {
selector: 'textarea[name="technical_info"]'
},
tags: {
diy: 'input[type="checkbox"][name="tags[]"][value="8"]',
chinese_audio: 'input[type="checkbox"][name="tags[]"][value="16"]',
chinese_subtitle: 'input[type="checkbox"][name="tags[]"][value="32"]',
hdr: 'input[type="checkbox"][name="tags[]"][value="64"]',
hdr10_plus: 'input[type="checkbox"][name="tags[]"][value="64"]'
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "402",
tvPack: "402",
documentary: "404",
concert: "406",
sport: "407",
cartoon: "405",
variety: "403"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
hevc: "12",
x264: "10",
x265: "12",
h265: "12",
mpeg2: "4",
mpeg4: "1",
vc1: "2",
xvid: "3",
dvd: "4"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: "1 ",
bluray: "1",
remux: "3",
encode: "7",
web: "7",
hddvd: "2",
hdtv: "5",
dvd: "6",
dvdrip: "6",
other: "0"
}
},
team: {
selector: 'select[name="team_sel"]',
map: {
hdtime: "6",
hdt: "12",
vtime: "15",
padtime: "7",
cmct: "8",
wiki: "4",
beast: "3",
chd: "2",
other: "5"
}
}
},
HDU: {
url: "https://pt.hdupt.com",
host: "hdupt.com",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: "#top~table:first>tbody>tr:nth-child(3)",
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
anonymous: {
selector: 'input[name="uplver"]'
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "402",
tvPack: "402",
documentary: "404",
concert: "406",
sport: "407",
cartoon: "405",
variety: "403"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
hevc: "14",
x264: "16",
x265: "14",
h265: "14",
mpeg2: "18",
mpeg4: "18",
vc1: "2",
xvid: "3",
dvd: "18"
}
},
audioCodec: {
selector: 'select[name="audiocodec_sel"]',
map: {
aac: "6",
ac3: "2",
dd: "2",
"dd+": "2",
flac: "7",
dts: "4",
truehd: "3",
lpcm: "11",
dtshdma: "1",
atmos: "17",
dtsx: "16"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: "11",
bluray: "1",
remux: "3",
encode: "7",
web: "10",
hddvd: "2",
hdtv: "5",
dvd: "6",
dvdrip: "6",
other: "0"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"2160p": "5",
"1080p": "1",
"1080i": "2",
"720p": "3",
"576p": "4",
"480p": "4"
}
},
area: {
selector: 'select[name="processing_sel"]',
map: {
CN: "1",
US: "2",
EU: "2",
HK: "3",
TW: "3",
JP: "4",
KR: "5",
IND: "6",
SEA: "8",
OT: "7"
}
}
},
HaresClub: {
url: "https://club.hares.top",
host: "hares.top",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: "#top~table:first+table:first>tbody>tr:nth-child(3)",
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
imdb: {
selector: 'input[name="pt_gen[imdb][link]"]'
},
douban: {
selector: 'input[name="pt_gen[douban][link]"]'
},
anonymous: {
selector: 'input[name="uplver"]'
},
mediaInfo: {
selector: 'textarea[name="technical_info"]'
},
tags: {
chinese_audio: 'input[name="tags[]"][value="32"]',
cantonese_audio: 'input[name="tags[]"][value="64"]',
diy: 'input[name="tags[]"][value="1024"]',
hdr: 'input[name="tags[]"][value="4096"]',
hdr10_plus: 'input[name="tags[]"][value="8192"]',
dolby_vision: 'input[name="tags[]"][value="16384"]',
chinese_subtitle: 'input[name="tags[]"][value="256"]'
},
category: {
selector: 'select[name="type"]',
map: {
movie: "401",
tv: "402",
tvPack: "402",
documentary: "404",
concert: "409",
sport: "407",
cartoon: "405",
variety: "403"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
hevc: "6",
x264: "8",
x265: "7",
h265: "6",
mpeg2: "4",
mpeg4: "9",
vc1: "2",
xvid: "3",
dvd: "4"
}
},
audioCodec: {
selector: 'select[name="audiocodec_sel"]',
map: {
aac: "6",
ac3: "13",
dd: "13",
mp3: "4",
"dd+": "13",
flac: "1",
dts: "3",
truehd: "9",
lpcm: "14",
dtshdma: "11",
atmos: "8",
dtsx: "10",
ape: "2",
ogg: "5",
wav: "15"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: "2",
bluray: "2",
remux: "3",
encode: "4",
web: "5",
hdtv: "8",
dvd: "0",
dvdrip: "0",
other: "0"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"4320p": "5",
"2160p": "6",
"1080p": "1",
"1080i": "2",
"720p": "3"
}
},
area: {
selector: 'select[name="processing_sel"]',
map: {
chd: "4",
hds: "5",
wiki: "6",
cmct: "8",
beast: "9",
hdc: "10",
frds: "11",
pter: "12",
bhd: "13",
pth: "14",
other: "15"
}
}
},
KEEPFRDS: {
url: "https://pt.keepfrds.com",
host: "keepfrds.com",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: false,
seedDomSelector: "#top~table:first>tbody>tr:nth-child(3)",
uploadPath: "/upload.php",
needDoubanInfo: true,
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
}
}
},
KG: {
url: "https://karagarga.in",
host: "karagarga.in",
siteType: "KG",
icon: '',
asSource: true,
asTarget: false,
uploadPath: "/upload.php",
seedDomSelector: ".outer h1~table:first>tbody>tr:nth-child(6)",
needDoubanInfo: true,
search: {
path: "/browse.php",
imdbOptionKey: "imdb",
nameOptionKey: "title",
params: {
search: "{imdb}",
search_type: "{optionKey}",
sort: "size",
d: "DESC"
}
}
},
LemonHD: {
url: "https://lemonhd.org",
host: "lemonhd.org",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: "#top~table:first>tbody>tr:nth-child(5)",
uploadPath: "/upload_movie.php",
search: {
path: "/torrents.php",
imdbOptionKey: "imdb",
nameOptionKey: "name",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: 'td a[href*="details_"]:first',
name: 'td a[href*="details_"]:first b',
size: "td:nth-child(6)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
douban: {
selector: 'input[name="douban_url"]'
},
tags: {
chinese_audio: 'input[name="tag_gy"]',
diy: "#tagDIY",
cantonese_audio: 'input[name="tag_yy"]',
chinese_subtitle: 'input[name="tag_zz"]',
the_criterion_collection: 'input[name="tag_cc"]'
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "402",
tvPack: "402",
documentary: "404",
concert: "406",
variety: "403"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
hevc: "10",
x264: "12",
x265: "11",
h265: "10",
mpeg2: "4",
mpeg4: "1",
vc1: "2",
xvid: "3",
dvd: "4"
}
},
audioCodec: {
selector: 'select[name="audiocodec_sel"]',
map: {
aac: "8",
ac3: "14",
dd: "14",
"dd+": "14",
flac: "7",
dts: "6",
truehd: "2",
lpcm: "15",
dtshdma: "5",
atmos: "1",
dtsx: "4"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: "9",
bluray: "1",
remux: "3",
encode: "7",
web: "11",
hdtv: "5",
dvd: "6",
dvdrip: "7",
hddvd: "2",
other: "4"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"4320p": "6",
"2160p": "1",
"1080p": "2",
"1080i": "2",
"720p": "4",
"576p": "5",
"480p": "5"
}
},
area: {
selector: 'select[name="processing_sel"]',
map: {
CN: "1",
US: "3",
EU: "3",
HK: "2",
TW: "2",
JP: "4",
KR: "4",
OT: "5"
}
}
},
MTeam: {
url: "https://kp.m-team.cc",
host: "m-team.cc",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/upload.php",
seedDomSelector: "#top~table:first>tbody>tr:nth-child(6)",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrenttr .torrentname td a[href*="details.php?id="]',
name: '.torrenttr .torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
tags: {
chinese_audio: "#l_dub",
diy: "#l_diy",
chinese_subtitle: "#l_sub"
},
category: {
selector: "#browsecat",
map: {
movie: [
"401",
"419",
"420",
"421",
"439"
],
tv: [
"403",
"402",
"435",
"438"
],
tvPack: [
"403",
"402",
"435",
"438"
],
documentary: "404",
concert: "406",
sport: "407",
cartoon: "405",
app: "422",
ebook: "427",
magazine: "427",
audioBook: "427"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
hevc: "16",
h265: "16",
x264: "1",
x265: "16",
mpeg2: "4",
mpeg4: "15",
vc1: "2",
xvid: "3"
}
},
videoType: {
map: {
uhdbluray: [
"421",
"438"
],
bluray: [
"421",
"438"
],
remux: "439",
encode: [
"401",
"419",
"403",
"402"
],
web: [
"419",
"402"
],
hdtv: [
"419",
"402"
],
dvd: [
"420",
"435"
],
dvdrip: [
"401",
"403"
],
other: ""
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"2160p": [
"6",
"419",
"402"
],
"1080p": [
"1",
"419",
"402"
],
"1080i": [
"2",
"419",
"402"
],
"720p": [
"3",
"419",
"402"
],
"576p": [
"5",
"401",
"403"
],
"480p": [
"5",
"401",
"403"
]
}
},
area: {
selector: 'select[name="processing_sel"]',
map: {
CN: "1",
US: "2",
EU: "2",
HK: "3",
TW: "3",
JP: "4",
KR: "5",
OT: "6"
}
},
team: {
selector: 'select[name="team_sel"]',
map: {
mteam: "9",
mpad: "10",
tnp: "23",
mteamtv: "17",
kishd: "7",
bmdru: "6",
onehd: "18",
cnhk: "19",
stbox: "20",
r2hd: "21",
pack: "8",
geek: "24"
}
}
},
NPUBits: {
url: "https://npupt.com",
host: "npupt.com",
siteType: "NexusPHP",
icon: '',
asSource: false,
asTarget: true,
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
params: {
incldead: "0",
search: "{name}",
sort: "5",
type: "desc"
},
result: {
list: "#torrents_table>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(3)>center:first"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: "#small_descr"
},
description: {
selector: "#descr"
},
anonymous: {
selector: 'input[name="uplver"]',
value: "yes"
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "402",
tvPack: "402",
documentary: "404",
concert: "406",
sport: "407",
cartoon: "405",
variety: "403",
music: "414",
app: "408",
ebook: "411",
magazine: "411",
audioBook: "411"
}
},
area: {
selector: "#source_sel",
map: {
CN: "6",
US: "5",
EU: "5",
HK: "6",
TW: "6",
JP: "5",
KR: "5",
OT: "7"
}
},
videoCodec: {
selector: 4,
map: {
h264: "H264",
hevc: "x265",
x264: "x264",
x265: "x265",
h265: "x265",
mpeg2: "MPEG2",
mpeg4: "H264",
xvid: "Xvid",
dvd: "MPEG2"
}
},
videoType: {
selector: 2,
map: {
uhdbluray: "BluRay",
bluray: "BluRay",
remux: "Remux",
encode: "BluRay",
web: "WEB-DL",
hdtv: "HDTV",
dvd: "DVD",
dvdrip: "DVDRip",
other: ""
}
},
resolution: {
selector: 3,
map: {
"2160p": "2160p",
"1080p": "1080p",
"1080i": "1080i",
"720p": "720p",
"576p": "576p",
"480p": "480p"
}
},
team: {
selector: 5,
map: {
wiki: "WiKi",
cmct: "CMCT",
mteam: "MTeam",
epic: "EPiC",
hdchina: "HDChina",
hds: "HDS",
beast: "beAst",
ctrlhd: "CtrlHD",
chd: "CHD"
}
}
},
NYPT: {
url: "https://nanyangpt.com",
host: "nanyangpt.com",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/upload.php",
seedDomSelector: "#top~table:first>tbody>tr:nth-child(5)",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
}
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
douban: {
selector: 'input[name="dburl"]'
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "402",
tvPack: "402",
documentary: "406",
concert: "407",
sport: "405",
cartoon: "403",
variety: "404"
}
}
},
OpenSub: {
url: "https://www.opensubtitles.org",
host: "opensubtitles.org",
icon: '',
asSource: false,
asTarget: false,
search: {
path: "/en/search/sublanguageid-all/imdbid-{name}"
}
},
OurBits: {
url: "https://ourbits.club",
host: "ourbits.club",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: "#top~table:first>tbody>tr:nth-child(3)",
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: "#torrenttable>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: 'input[name="name"]'
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
poster: 'input[name="picture"]',
imdb: {
selector: 'input[name="url"][type="text"]'
},
anonymous: {
selector: 'input[name="uplver"]'
},
tags: {
chinese_audio: "#tagGY",
diy: "#tagDIY",
cantonese_audio: "#tag_yy",
chinese_subtitle: "#tagZZ",
hdr: "#tagHDR10",
hdr10_plus: "#tagHDR10P",
dolby_vision: "#tagDB"
},
category: {
selector: 'select[name="type"]',
map: {
movie: "401",
"3d": "402",
tv: "412",
tvPack: "405",
documentary: "410",
concert: "419",
sport: "415",
cartoon: "411",
variety: "413"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "12",
hevc: "14",
x264: "12",
x265: "14",
h265: "14",
mpeg2: "15",
mpeg4: "12",
vc1: "16",
xvid: "17",
dvd: "18"
}
},
audioCodec: {
selector: 'select[name="audiocodec_sel"]',
map: {
aac: "7",
ac3: "6",
dd: "6",
"dd+": "6",
flac: "13",
dts: "4",
truehd: "2",
lpcm: "5",
dtshdma: "1",
atmos: "14",
dtsx: "21"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: "12",
bluray: "1",
remux: "4",
encode: "7",
web: "9",
hdtv: "5",
dvd: "2",
dvdrip: "2",
other: "0"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"2160p": "5",
"1080p": "1",
"1080i": "2",
"720p": "3",
"576p": "4",
"480p": "4"
}
},
area: {
selector: 'select[name="processing_sel"]',
map: {
CN: "1",
US: "2",
EU: "2",
HK: "3",
TW: "3",
JP: "4",
KR: "5",
OT: "6"
}
}
},
PTHome: {
url: "https://www.pthome.net",
host: "pthome.net",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/upload.php",
seedDomSelector: "#top~table:first>tbody>tr:nth-child(3)",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
douban: {
selector: 'input[name="douban_id"]'
},
anonymous: {
selector: 'input[name="uplver"]'
},
tags: {
chinese_audio: "#tag_gy",
diy: "#tag_diy",
cantonese_audio: "#tag_yy",
chinese_subtitle: "#tag_zz",
hdr: "#tag_hdr10",
hdr10_plus: "#tag_hdrm",
dolby_vision: "#tag_db"
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "402",
tvPack: "402",
documentary: "404",
concert: "408",
sport: "407",
cartoon: "405",
variety: "403"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
x264: "1",
hevc: "6",
x265: "6",
h265: "6",
mpeg2: "4",
mpeg4: "1",
vc1: "2",
xvid: "5",
dvd: "4"
}
},
audioCodec: {
selector: 'select[name="audiocodec_sel"]',
map: {
aac: "6",
ac3: "18",
dd: "18",
"dd+": "18",
flac: "1",
dts: "3",
truehd: "20",
lpcm: "21",
dtshdma: "19",
atmos: "19",
dtsx: "3"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: "12",
bluray: "1",
remux: "3",
encode: "15",
web: "10",
hdtv: "5",
dvd: "2",
dvdrip: "15",
other: "11"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"4320p": "10",
"2160p": "5",
"1080p": "1",
"1080i": "2",
"720p": "3",
"576p": "4",
"480p": "4"
}
},
team: {
selector: 'select[name="team_sel"]',
map: {
pthome: "19",
pth: "21",
pthweb: "20",
pthtv: "22",
pthaudio: "23",
pthebook: "24",
pthmusic: "25",
other: "5"
}
}
},
PTN: {
url: "https://piratethenet.org",
host: "piratethenet.org",
siteType: "PTN",
icon: '',
asSource: false,
asTarget: true,
uploadPath: "/upload.php",
search: {
path: "/browse.php",
params: {
name: "{name}",
imdb: "{imdb}"
}
},
name: {
selector: "#name"
},
description: {
selector: "#descr"
},
mediaInfo: {
selector: 'textarea[name="mediainfo"]'
}
},
PTP: {
url: "https://passthepopcorn.me",
host: "passthepopcorn.me",
siteType: "gazelle",
icon: '',
asSource: true,
asTarget: true,
needDoubanInfo: true,
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
params: {
action: "advanced",
searchstr: "{imdb}"
}
},
sourceInfo: {
editionTags: {
"10-bit": "10_bit",
"2-Disc Set": "2_disc_set",
"2D/3D Edition": "2d_3d_edition",
"2in1": "2_in_1",
"3D": "3d",
"3D Anaglyph": "3d_anaglyph",
"3D Full SBS": "3d_full_sbs",
"3D Half OU": "3d_half_ou",
"3D Half SBS": "3d_half_sbs",
"4K Remaster": "4k_remaster",
"4K Restoration": "4k_restoration",
"Director's Cut": "director_s_cut",
"Dolby Atmos": "dolby_atmos",
"Dolby Vision": "dolby_vision",
"Dual Audio": "dual_audio",
"English Dub": "english_dub",
"Extended Cut": "extended_edition",
"Extended Edition": "extended_edition",
Extras: "extras",
HDR10: "hdr10",
"HDR10+": "hdr10_plus",
"Masters of Cinema": "masters_of_cinema",
Scene: "scene",
"The Criterion Collection": "the_criterion_collection",
"Theatrical Cut": "theatrical_cut",
Trumpable: null,
"Two-Disc Set": "two_disc_set",
Remux: "remux",
Reported: null,
Rifftrax: "rifftrax",
Uncut: "uncut",
Unrated: "unrated",
"Warner Archive Collection": "warner_archive_collection",
"With Commentary": "with_commentary"
}
},
description: {
selector: "#release_desc"
},
poster: "#image",
imdb: {
selector: "#imdb"
},
anonymous: {
selector: 'input[name="uplver"]'
},
mediaInfo: {
selector: "#Media_BDInfo"
},
screenshots: {
selector: "#url_vimages"
},
category: {
selector: "#categories",
map: {
movie: "Feature Film",
tv: "Miniseries",
tvPack: "Miniseries",
documentary: "Feature Film",
concert: "Live Performance"
}
},
videoCodec: {
selector: "#codec",
map: {
h264: "H.264",
hevc: "H.265",
x264: "x264",
x265: "x265",
h265: "H.265",
mpeg2: "Other",
mpeg4: "H.264",
vc1: "Other",
xvid: "XviD",
DVD5: "DVD5",
DVD9: "DVD9",
BD100: "BD100",
BD66: "BD66",
BD50: "BD50",
BD25: "BD25"
}
},
source: {
selector: "#source",
map: {
uhdbluray: "Blu-ray",
bluray: "Blu-ray",
hdtv: "HDTV",
dvd: "DVD",
web: "WEB",
vhs: "VHS",
hddvd: "HD-DVD"
}
},
resolution: {
selector: "#resolution",
map: {
"2160p": "2160p",
"1080p": "1080p",
"1080i": "1080i",
"720p": "720p",
"576p": "576p",
"480p": "480p",
NTSC: "NTSC",
PAL: "PAL",
other: "Other"
}
}
},
PTSBAO: {
url: "https://ptsbao.club",
host: "ptsbao.club",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: "#top~table:first>tbody>tr:nth-child(5)",
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(7)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: "#small_descr"
},
description: {
selector: 'textarea[name="descr"]'
},
imdb: {
selector: 'input[name="imdburl"][type="text"]'
},
anonymous: {
selector: 'input[name="uplver"]'
},
tags: {
chinese_subtitle: 'input[type="checkbox"][name="zz"]'
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "402",
tvPack: "402",
documentary: "404",
concert: "414",
sport: "409",
cartoon: "405",
variety: "403"
}
},
source: {
selector: "#medium_sel",
map: {
uhdbluray: "10",
bluray: "1",
hdtv: "5",
dvd: "3",
web: "2",
vhs: "9",
hddvd: "9"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
hevc: "6",
x264: "1",
x265: "6",
h265: "6",
mpeg2: "4",
mpeg4: "5",
vc1: "2",
xvid: "3",
dvd: "4"
}
},
audioCodec: {
selector: "#audiocodec_sel",
map: {
aac: "6",
ac3: "11",
dd: "10",
"dd+": "10",
dts: "3",
truehd: "9",
lpcm: "12",
dtshdma: "8",
atmos: "8",
dtsx: "13",
flac: "1"
}
},
videoType: {
selector: "#source_sel",
map: {
uhdbluray: "92",
bluray: "55",
remux: "88",
encode: [
"3",
"91",
"92"
],
web: "4",
hdtv: "94",
dvd: "89",
dvdrip: "89",
other: ""
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"2160p": [
"5",
"92"
],
"1080p": [
"1",
"3"
],
"1080i": "1",
"720p": [
"2",
"91"
],
"576p": "3",
"480p": "4"
}
},
team: {
selector: 'select[name="team_sel"]',
map: {
ffansbd: "8",
ops: "11",
ffansweb: "12",
ffanstv: "13",
hqc: "10",
ttg: "3",
hdc: "6",
chd: "2",
hdsky: "9",
cmct: "4",
frds: "5",
other: "7",
ffansdvd: "14",
fhdmv: "15",
enichi: "16"
}
}
},
PTer: {
url: "https://pterclub.com",
host: "pterclub.com",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/upload.php",
seedDomSelector: "#top~table:first>tbody>tr:nth-child(5)",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: "#torrenttable>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
douban: {
selector: 'input[name="douban"]'
},
anonymous: {
selector: 'input[name="uplver"]'
},
tags: {
chinese_audio: "#guoyu",
diy: "#diy",
cantonese_audio: "#yueyu",
chinese_subtitle: "#zhongzi"
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "404",
tvPack: "404",
documentary: "402",
concert: "406",
sport: "407",
cartoon: "403",
variety: "405"
}
},
videoType: {
selector: 'select[name="source_sel"]',
map: {
uhdbluray: "1",
bluray: "2",
remux: "3",
encode: "6",
web: "5",
hdtv: "4",
dvd: "7",
dvdrip: "7",
other: "15"
}
},
area: {
selector: 'select[name="team_sel"]',
map: {
CN: "1",
US: "4",
EU: "4",
HK: "2",
TW: "3",
JP: "6",
KR: "5",
IND: "7",
OT: "8"
}
}
},
PrivateHD: {
url: "https://privatehd.to",
host: "privatehd.to",
siteType: "AvistaZ",
icon: '',
asSource: true,
asTarget: false,
uploadPath: "/upload.php",
seedDomSelector: "#content-area .block:last table:first>tbody>tr:nth-child(3)",
needDoubanInfo: true,
search: {
path: "/browse.php",
params: {
search: "{name}",
in: "1",
order: "size",
sort: "desc"
}
}
},
SC: {
url: "https://secret-cinema.pw",
host: "secret-cinema.pw",
siteType: "gazelle",
icon: '',
asSource: false,
asTarget: true,
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
params: {
action: "advanced",
searchsubmit: 1,
filter_cat: 1,
groupname: "{name}",
cataloguenumber: "{imdb}",
order_by: "size",
order_way: "desc",
tags_type: 0
}
}
},
SSD: {
url: "https://springsunday.net",
host: "springsunday.net",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/upload.php",
seedDomSelector: "#top~table:first>tbody>tr:nth-child(3)",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(6)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: "#small_descr"
},
description: {
selector: "#descr"
},
poster: "#url_poster",
imdb: {
selector: "#url"
},
anonymous: {
selector: 'input[name="uplver"]'
},
mediaInfo: {
selector: "#Media_BDInfo"
},
screenshots: {
selector: "#url_vimages"
},
category: {
selector: "#browsecat",
map: {
movie: "501",
tv: "502",
tvPack: "502",
documentary: "503",
concert: "507",
sport: "506",
cartoon: "504",
variety: "505"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "2",
hevc: "1",
x264: "2",
x265: "1",
h265: "1",
mpeg2: "4",
mpeg4: "2",
vc1: "3",
xvid: "",
dvd: "4"
}
},
audioCodec: {
selector: 'select[name="audiocodec_sel"]',
map: {
aac: "5",
ac3: "4",
dd: "4",
"dd+": "4",
flac: "7",
dts: "3",
truehd: "2",
lpcm: "6",
dtshdma: "1",
atmos: "3",
dtsx: "3"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: "1",
bluray: "1",
remux: "4",
encode: "6",
web: "7",
hdtv: "5",
dvd: "3",
dvdrip: "10",
other: ""
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"2160p": "1",
"1080p": "2",
"1080i": "3",
"720p": "4",
"576p": "5",
"480p": "5"
}
},
area: {
selector: 'select[name="source_sel"]',
map: {
CN: "1",
US: "9",
EU: "9",
HK: "2",
TW: "2",
JP: "10",
KR: "10",
OT: "3"
}
}
},
SoulVoice: {
url: "https://pt.soulvoice.club",
host: "soulvoice.club",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/upload.php",
seedDomSelector: "#top~table:first>tbody>tr:nth-child(3)",
needDoubanBookInfo: true,
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
anonymous: {
selector: 'input[name="uplver"]'
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "402",
tvPack: "402",
documentary: "404",
cartoon: "405",
sport: "407",
concert: "406",
variety: "403"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
hevc: "2",
h265: "2",
x264: "1",
x265: "2",
mpeg2: "5",
mpeg4: "1",
vc1: "5",
xvid: "5"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"2160p": "3",
"1080p": "1",
"1080i": "2",
"720p": "4",
"576p": "4",
"480p": "4"
}
},
team: {
selector: 'select[name="team_sel"]',
map: {
hds: "1",
chd: "2",
frds: "3",
cmct: "4",
other: "5"
}
}
},
SubHD: {
url: "https://subhd.tv",
host: "subhd.tv",
icon: '',
asSource: false,
asTarget: false,
search: {
path: "/search/{name}"
}
},
TCCF: {
url: "https://et8.org",
host: "et8.org",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: "#top~table:first>tbody>tr:nth-child(3)",
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
anonymous: {
selector: 'input[name="uplver"]'
},
category: {
selector: "#browsecat",
map: {
movie: "622",
tv: "623",
tvPack: "623",
documentary: "404",
concert: "626",
sport: "627",
cartoon: "627",
variety: "627",
app: "625",
ebook: "629",
magazine: "631",
comics: "632",
audioBook: "633",
onlineCourse: "634"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
x264: "7",
hevc: "8",
x265: "6",
h265: "8",
mpeg2: "4",
mpeg4: "1",
vc1: "2",
xvid: "3",
dvd: "4"
}
},
audioCodec: {
selector: 'select[name="audiocodec_sel"]',
map: {
aac: "6",
ac3: "4",
dd: "4",
"dd+": "4",
flac: "1",
dts: "3",
truehd: "9",
lpcm: "10",
dtshdma: "8",
atmos: "8",
dtsx: "3"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: "10",
bluray: "1",
remux: "5",
encode: "11",
web: "9",
hdtv: "6",
dvd: "7",
dvdrip: "4",
other: "0"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"2160p": "5",
"1080p": "1",
"1080i": "2",
"720p": "3",
"576p": "4",
"480p": "4"
}
},
team: {
selector: 'select[name="team_sel"]',
map: {
torrentccf: "1",
tccf: "1",
tlf: "2",
bmdru: "3",
catedu: "4",
madfox: "5",
other: "7"
}
}
},
TJUPT: {
url: "https://www.tjupt.org",
host: "tjupt.org",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/upload.php",
seedDomSelector: "#top~table:first>tbody>tr:nth-child(5)",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: "#descr"
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
douban: {
selector: "#external_url"
},
category: {
selector: "#browsecat",
map: {
movie: "401",
tv: "402",
tvPack: "402",
documentary: "411",
concert: "406",
sport: "407",
cartoon: "405",
variety: "403"
}
}
},
TLF: {
url: "https://pt.eastgame.org",
host: "eastgame.org",
siteType: "NexusPHP",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: "#top~table:first>tbody>tr:nth-child(3)",
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
imdbOptionKey: "4",
nameOptionKey: "0",
params: {
incldead: "0",
search_area: "{optionKey}",
search: "{imdb}",
sort: "5",
type: "desc"
},
result: {
list: ".torrents>tbody>tr",
url: '.torrentname td a[href*="details.php?id="]',
name: '.torrentname td a[href*="details.php?id="]',
size: "td:nth-child(5)"
}
},
name: {
selector: "#name"
},
subtitle: {
selector: 'input[name="small_descr"]'
},
description: {
selector: 'textarea[name="descr"]'
},
imdb: {
selector: 'input[name="url"][type="text"]'
},
douban: {
selector: 'input[name="douban_url"]'
},
category: {
selector: "#browsecat",
map: {
movie: "438",
tv: "440",
tvPack: "440",
documentary: "443",
cartoon: "442",
sport: "444",
concert: "445",
variety: "441"
}
},
videoCodec: {
selector: 'select[name="codec_sel"]',
map: {
h264: "1",
hevc: "6",
h265: "6",
x264: "1",
x265: "6",
mpeg2: "4",
mpeg4: "0",
vc1: "2",
xvid: "3"
}
},
audioCodec: {
selector: 'select[name="audiocodec_sel"]',
map: {
aac: "6",
ac3: "9",
dd: "9",
"dd+": "9",
flac: "1",
dts: "10",
truehd: "14",
lpcm: "12",
dtshdma: "11",
atmos: "13",
dtsx: "10"
}
},
videoType: {
selector: 'select[name="medium_sel"]',
map: {
uhdbluray: "10",
bluray: "1",
remux: "3",
encode: "7",
web: "4",
hdtv: "5",
dvd: "6",
hddvd: "1",
dvdrip: "6",
other: "9"
}
},
resolution: {
selector: 'select[name="standard_sel"]',
map: {
"2160p": "6",
"1080p": "1",
"1080i": "2",
"720p": "3",
"576p": "4",
"480p": "4"
}
},
area: {
selector: 'select[name="processing_sel"]',
map: {
CN: "1",
US: "2",
EU: "2",
HK: "3",
TW: "3",
JP: "4",
KR: "5",
OT: "6"
}
}
},
TMDB: {
url: "https://www.themoviedb.org",
host: "www.themoviedb.org",
icon: '',
asSource: false,
asTarget: false,
search: {
path: "/search?query={name}"
}
},
TTG: {
url: "https://totheglory.im",
host: "totheglory.im",
siteType: "TTG",
icon: '',
asSource: true,
asTarget: true,
seedDomSelector: "#main_table h1~table:first>tbody>tr:nth-child(2)",
uploadPath: "/upload.php",
search: {
path: "/browse.php",
replaceKey: [
"tt",
"imdb"
],
params: {
search_field: "{imdb}",
sort: "5",
type: "desc",
c: "M"
},
result: {
list: "#torrent_table>tbody>tr",
url: '.name_left a[href*="/t/"]',
name: '.name_left a[href*="/t/"] b',
size: "td:nth-child(7)"
}
},
name: {
selector: 'input[name="name"]'
},
description: {
selector: 'textarea[name="descr"]'
},
imdb: {
selector: 'input[name="imdb_c"]'
},
anonymous: {
selector: 'select[name="anonymity"]',
value: "yes"
},
category: {
selector: 'select[name="type"]',
map: {
movie: [
"51",
"52",
"53",
"54",
"108",
"109"
],
tv: [
"69",
"70",
"73",
"74",
"75",
"76"
],
tvPack: [
"87",
"88",
"99",
"90"
],
documentary: [
"62",
"63",
"67"
],
concert: "59",
sport: "57",
cartoon: "58",
variety: [
"103",
"60",
"101"
]
}
},
videoType: {
map: {
uhdbluray: [
"109"
],
bluray: [
"54",
"109",
"67"
],
remux: [
"53",
"108",
"63",
"70",
"75"
],
encode: [
"53",
"63",
"70",
"75",
"52",
"62",
"69",
"76",
"108"
],
web: [
"53",
"62",
"63",
"70",
"75",
"52",
"69",
"76",
"108",
"87",
"88",
"99",
"90"
],
hdtv: [
"53",
"63",
"70",
"75",
"52",
"62",
"69",
"76",
"108",
"87",
"88",
"99",
"90"
],
dvd: [
"51"
],
dvdrip: [
"51"
],
other: ""
}
},
resolution: {
map: {
"2160p": [
"108",
"109",
"67"
],
"1080p": [
"53",
"63",
"70",
"75",
"54",
"67",
"87",
"88",
"99",
"90"
],
"1080i": [
"53",
"63",
"70",
"75",
"87",
"88",
"99",
"90"
],
"720p": [
"52",
"62",
"69",
"76",
"87",
"88",
"99",
"90"
],
"576p": "51",
"480p": "51"
}
},
area: {
map: {
CN: [
"76",
"75",
"90"
],
US: [
"69",
"70",
"87"
],
EU: [
"69",
"70",
"87"
],
HK: [
"76",
"75",
"90"
],
TW: [
"76",
"75",
"90"
],
JP: [
"73",
"88",
"101"
],
KR: [
"74",
"99",
"103"
],
OT: ""
}
}
},
TeamHD: {
url: "https://teamhd.org",
host: "teamhd.org",
siteType: "TeamHD",
icon: '',
asSource: true,
asTarget: false,
seedDomSelector: "#details_hop",
needDoubanInfo: true,
search: {
path: "/browse",
params: {
incldead: "0",
search: "{name}"
}
}
},
UHDBits: {
url: "https://uhdbits.org",
host: "uhdbits.org",
siteType: "gazelle",
icon: '',
asSource: true,
asTarget: true,
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
params: {
order_way: "desc",
order_by: "size",
searchstr: "{imdb}"
}
},
needDoubanInfo: true,
description: {
selector: "#release_desc"
},
imdb: {
selector: "#imdbid"
},
anonymous: {
selector: "#anonymous"
},
mediaInfo: {
selector: 'textarea[name="mediainfo"]'
},
category: {
selector: "#categories",
map: {
movie: "0",
tv: "2",
tvPack: "2",
music: "1"
}
},
videoType: {
selector: "#media",
map: {
uhdbluray: "Blu-ray",
bluray: "Blu-ray",
remux: "Remux",
encode: "Encode",
web: "WEB-DL",
hdtv: "HDTV",
dvdrip: "Encode",
other: "Others"
}
},
videoCodec: {
selector: "#codec",
map: {
h264: "AVC/H.264",
hevc: "HEVC",
x264: "x264",
x265: "x265",
h265: "HEVC",
mpeg2: "MPEG-2",
mpeg4: "AVC/H.264",
vc1: "VC-1",
dvd: "MPEG"
}
},
resolution: {
selector: "#format",
map: {
"2160p": "2160p",
"1080p": "1080p",
"1080i": "1080i",
"720p": "720p",
"576p": "Others",
"480p": "Others"
}
}
},
bB: {
url: "https://baconbits.org",
host: "baconbits.org",
siteType: "gazelle",
icon: '',
asSource: false,
asTarget: true,
uploadPath: "/upload.php",
search: {
path: "/torrents.php",
params: {
searchstr: "{name}",
order_by: "s4",
order_way: "desc",
disablegrouping: 1
}
},
name: {
selector: "#title"
},
description: {
selector: "#desc"
},
category: {
selector: "#categories",
map: {
movie: "Movies",
tv: "TV",
tvPack: "TV",
documentary: "Movies",
cartoon: "Anime",
app: "Applications",
ebook: "E-Books",
magazine: "Magazines",
audioBook: "Audiobooks",
comics: "Comics"
}
},
source: {
selector: 'select[name="source"]',
map: {
uhdbluray: "BluRay",
bluray: "BluRay",
hdtv: "HDTV",
dvd: "DVD9",
web: "WEB-DL",
webrip: "WebRip",
vhs: "VHSRip",
hddvd: "HD-DVD",
bluray3d: "BluRay 3D"
}
},
videoCodec: {
selector: 'select[name="videoformat"]',
map: {
h264: "H.264",
hevc: "H.265",
x264: "x264",
x265: "x265",
h265: "H.265",
mpeg2: "MPEG-2",
mpeg4: "H.264",
vc1: "VC-1",
xvid: "XVid",
dvd: "MPEG-2"
}
},
audioCodec: {
selector: 'select[name="audioformat"]',
map: {
aac: "AAC",
ac3: "AC-3",
dd: "AC-3",
"dd+": "AC-3",
dts: "DTS",
truehd: "True-HD",
lpcm: "PCM",
flac: "FLAC",
dtshdma: "DTS-HD",
atmos: "Dolby Atmos",
dtsx: "DTS:X",
mp3: "MP3"
}
},
format: {
selector: 'select[name="container"]',
map: {
mkv: "MKV",
mp4: "MP4",
avi: "AVI",
ts: "TS",
wmv: "WMV",
vob: "VOB",
m2ts: "m2ts"
}
},
resolution: {
selector: 'select[name="resolution"]',
map: {
"2160p": "2160p",
"1080p": "1080p",
"1080i": "1080i",
"720p": "720p",
"480p": "480p",
"480i": "480i",
other: "SD"
}
},
mediaInfo: {
selector: "#release_desc"
},
poster: {
selector: "#image"
},
year: {
selector: 'input[name="year"]'
},
tags: {
selector: "#tags"
}
},
iTS: {
url: "http://shadowthein.net",
host: "shadowthein.net",
siteType: "its",
asSource: false,
asTarget: true,
icon: '',
seedDomSelector: "h1~.line>tbody>tr:nth-child(2)",
needDoubanInfo: true,
uploadPath: "/upload.php",
search: {
path: "/browse.php",
params: {
incldead: 1,
search: "{imdb}",
search_in: "names",
sort: 5,
type: "desc"
}
},
name: {
selector: 'input[name="name"]'
},
imdb: {
selector: 'input[name="imdblink"]'
},
description: {
selector: 'textarea[name="descr"]'
},
mediaInfo: {
selector: 'textarea[name="mediainfo"]'
},
tags: {
hdr: 'input[name="HDR10"]',
hdr10_plus: 'input[name="HDR10Plus"]',
dolby_vision: 'input[name="DolbyVision"]'
},
anonymous: {
selector: 'input[name="anonymous"][value="true"]'
},
category: {
selector: 'select[name="type"]',
map: {
movie: "68",
tv: "65",
concert: "61",
music: "6",
ebook: "26"
}
}
},
"nzbs.in": {
url: "https://nzbs.in",
host: "nzbs.in",
siteType: "nzb",
icon: '',
asSource: false,
asTarget: false,
search: {
path: "/search/{name}",
params: {
t: -1,
ob: "size_desc"
}
}
},
zimuku: {
url: "http://zimuku.org",
host: "zimuku.org",
icon: '',
asSource: false,
asTarget: false,
search: {
path: "/search",
params: {
q: "{imdb}"
}
}
},
\u8C46\u74E3\u7535\u5F71: {
url: "https://search.douban.com",
host: "search.douban.com",
icon: '',
asSource: false,
asTarget: false,
search: {
path: "/movie/subject_search",
params: {
search_text: "{imdb}"
}
}
},
\u8C46\u74E3\u8BFB\u4E66: {
url: "https://search.douban.com",
host: "search.douban.com",
icon: '',
asSource: false,
asTarget: false,
search: {
path: "/book/subject_search?search_text={name}"
}
}
};
// src/const.js
var TORRENT_INFO = {
title: "",
subtitle: "",
description: "",
originalDescription: "",
year: "",
category: "",
videoType: "",
format: "",
source: "",
videoCodec: "",
audioCodec: "",
resolution: "",
area: "",
doubanUrl: "",
doubanInfo: "",
imdbUrl: "",
tags: {
diy: false,
chinese_audio: false,
cantonese_audio: false,
chinese_subtitle: false,
dolby_atoms: false,
dts_x: false,
hdr: false,
dolby_vision: false
},
otherTags: {},
mediaInfo: "",
mediaInfos: [],
screenshots: [],
comparisons: [],
movieAkaName: "",
movieName: "",
sourceSite: "",
sourceSiteType: "",
size: "",
isForbidden: false,
poster: ""
};
var DOUBAN_SUGGEST_API = "https://www.douban.com/search?cat=1002&q={query}";
var PT_GEN_API = "https://media.pttool.workers.dev";
var TMDB_API_URL = "https://api.tmdb.org";
var TMDB_API_KEY = "3d62cb1443c6b34b61262ab332aaf78c";
var USE_CHINESE = /zh-cn|zh-hk|zh-tw/.test(navigator.language.toLowerCase());
var getSiteName = (host) => {
let siteName = "";
try {
Object.keys(PT_SITE).forEach((key) => {
const hostName = PT_SITE[key].host;
const matchReg = new RegExp(hostName, "i");
if (hostName && host.match(matchReg)) {
siteName = key;
}
});
return siteName;
} catch (error) {
if (error.message !== "end loop") {
console.log(error);
}
}
};
var getSortedSiteKeys = () => {
return Object.keys(PT_SITE).sort((a, b) => {
const isChineseReg = /[\u4e00-\u9fa5]+/;
if (isChineseReg.test(a) && !isChineseReg.test(b)) {
return 1;
}
if (!isChineseReg.test(a) && isChineseReg.test(b)) {
return -1;
}
return a.toLowerCase().localeCompare(b.toLowerCase());
});
};
var SORTED_SITE_KEYS = getSortedSiteKeys();
var EUROPE_LIST = ["Albania", "Andorra", "Armenia", "Austria", "Azerbaijan", "Belarus", "Belgium", "Bosnia and Herzegovina", "Bulgaria", "Croatia", "Cyprus", "Czech Republic", "Denmark", "Estonia", "Finland", "France", "Georgia", "Germany", "Greece", "Hungary", "Iceland", "Ireland", "Italy", "Kazakhstan", "Latvia", "Liechtenstein", "Lithuania", "Luxembourg", "Malta", "Moldova", "Monaco", "Montenegro", "Netherlands", "North Macedonia", "Norway", "Poland", "Portugal", "Romania", "Russia", "San Marino", "Serbia", "Slovakia", "Slovenia", "Spain", "Sweden", "Switzerland", "Turkey", "Ukraine", "United Kingdom", "UK", "Vatican City"];
var CURRENT_SITE_NAME = getSiteName(location.host);
var CURRENT_SITE_INFO = PT_SITE[CURRENT_SITE_NAME];
var HDB_TEAM = ["Chotab", "CRiSC", "CtrlHD", "DON", "EA", "EbP", "Geek", "LolHD", "NTb", "RightSiZE", "SA89", "SbR", "TayTo", "VietHD"];
var NOTIFICATION_TEMPLATE = `
`;
// src/i18n.json
var en_US = {
\u8C46\u74E3\u94FE\u63A5\u83B7\u53D6\u5931\u8D25: "Failed to get Douban link",
\u8C46\u74E3ID\u83B7\u53D6\u5931\u8D25: "Failed to get Douban ID",
\u83B7\u53D6\u8C46\u74E3\u4FE1\u606F\u5931\u8D25: "Failed to get Douban data",
\u7F3A\u5C11IMDB\u4FE1\u606F: "Missing IMDB information",
\u83B7\u53D6\u5931\u8D25: "Request failed",
\u83B7\u53D6\u6210\u529F: "Data request successful",
\u8BF7\u6C42\u5931\u8D25: "Request failed",
"\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5": "Upload failed, please try again",
ptpimg\u4E0A\u4F20\u5931\u8D25: "PtpImg upload failed",
\u8BF7\u5230\u914D\u7F6E\u9762\u677F\u4E2D\u586B\u5165ptpimg\u7684api_key: "Please enter the API_KEY of ptpimg in the setting panel",
\u5C01\u9762\u4E0A\u4F20\u5931\u8D25: "Failed to upload poster",
"\u6570\u636E\u52A0\u8F7D\u4E2D...": "Loading data...",
\u83B7\u53D6\u56FE\u7247\u5217\u8868\u5931\u8D25: "Failed to get list of images",
"\u8F6C\u6362\u4E2D...": "Converting...",
"\u8F6C\u6362\u6210\u529F\uFF01": "Converted!",
"\u83B7\u53D6\u4E2D...": "Requesting...",
\u7F3A\u5C11\u8C46\u74E3\u94FE\u63A5: "Missing Douban link",
"\u672C\u79CD\u5B50\u7981\u6B62\u8F6C\u8F7D\uFF0C\u786E\u5B9A\u8981\u7EE7\u7EED\u8F6C\u8F7D\u4E48\uFF1F": "Transfer of this torrent is prohibited, are you sure to continue?",
\u8BF7\u7B49\u5F85\u9875\u9762\u52A0\u8F7D\u5B8C\u6210: "Please wait for the page to load",
\u624B\u52A8\u8F93\u5165\u8C46\u74E3\u94FE\u63A5: "Enter the Douban link",
\u83B7\u53D6\u8C46\u74E3\u7B80\u4ECB: "Get data of Douban",
\u83B7\u53D6\u8C46\u74E3\u8BFB\u4E66\u7B80\u4ECB: "Get data of Douban Book",
\u8F6C\u7F29\u7565\u56FE: "Convert to thumbnails",
\u5FEB\u901F\u68C0\u7D22: "Quick search",
\u4E00\u952E\u7FA4\u8F6C: "Batch transfer",
\u5FEB\u6377\u64CD\u4F5C: "Quick operation",
\u4E00\u952E\u8F6C\u79CD: "Transfer to",
\u8F6C\u79CD\u7AD9\u70B9\u542F\u7528: "Select sites for the 'Transfer to' section",
\u6279\u91CF\u8F6C\u79CD\u542F\u7528: "Select sites for the 'Batch transfer' button",
\u4E00\u952E\u6279\u91CF\u8F6C\u53D1\u5230\u4EE5\u4E0B\u9009\u4E2D\u7684\u7AD9\u70B9: "One-click batch transfer to the selected sites below",
\u7AD9\u70B9\u641C\u7D22\u542F\u7528: "Select sites for the 'Quick search' section",
\u56FE\u5E8A\u914D\u7F6E: "Image Host Settings",
"\u5982\u4F55\u83B7\u53D6\uFF1F": "How to get it?",
\u989D\u5916\u529F\u80FD\u5173\u95ED: "Turn off extra features",
\u5173\u95ED\u8F6C\u7F29\u7565\u56FE\u529F\u80FD: "Remove the 'Convert to thumbnails' button",
\u5173\u95ED\u7AD9\u70B9\u56FE\u6807\u663E\u793A: "Remove the icons",
\u5173\u95ED\u8F6C\u5B58ptpimg\u529F\u80FD: "Remove the 'Upload screenshots to ptpimg' button",
\u4FDD\u5B58: "Save",
\u53D6\u6D88: "Cancel",
\u9519\u8BEF: "Error",
\u6210\u529F: "Success",
\u4FDD\u5B58\u672C\u5730\u7AD9\u70B9\u8BBE\u7F6E\u5931\u8D25: "Failed to save local site settings",
\u8BF7\u5148\u8BBE\u7F6E\u7FA4\u8F6C\u5217\u8868: "Please set up the batch transfer list first",
"\u8F6C\u79CD\u9875\u9762\u5DF2\u6253\u5F00\uFF0C\u8BF7\u524D\u5F80\u5BF9\u5E94\u9875\u9762\u64CD\u4F5C": "The transfer pages have been opened, please go to the corresponding page to operate",
\u63D0\u793A: "Hint",
\u8F6C\u5B58\u622A\u56FE: "Upload screenshots to another host",
\u65E0\u9700\u8F6C\u5B58: "No need to upload",
"\u4E0A\u4F20\u4E2D\uFF0C\u8BF7\u7A0D\u5019...": "Uploading, be patient",
\u4E0D\u663E\u793A\u81F4\u8C22\u5185\u5BB9: "Do not include thanks",
\u62F7\u8D1D: "Copy",
\u5DF2\u590D\u5236: "Copied",
\u4E0D\u663E\u793A\u8C46\u74E3\u6309\u94AE\u548C\u8C46\u74E3\u94FE\u63A5: "Hide Douban button & link field",
\u8BF7\u586B\u5199\u6B63\u786E\u94FE\u63A5: "Please fill the correct link"
};
var zh_CN = {
\u8C46\u74E3\u94FE\u63A5\u83B7\u53D6\u5931\u8D25: "\u8C46\u74E3\u94FE\u63A5\u83B7\u53D6\u5931\u8D25",
\u8C46\u74E3ID\u83B7\u53D6\u5931\u8D25: "\u8C46\u74E3ID\u83B7\u53D6\u5931\u8D25",
\u83B7\u53D6\u8C46\u74E3\u4FE1\u606F\u5931\u8D25: "\u83B7\u53D6\u8C46\u74E3\u4FE1\u606F\u5931\u8D25",
\u7F3A\u5C11IMDB\u4FE1\u606F: "\u7F3A\u5C11IMDB\u4FE1\u606F",
\u83B7\u53D6\u5931\u8D25: "\u83B7\u53D6\u5931\u8D25",
\u83B7\u53D6\u6210\u529F: "\u83B7\u53D6\u6210\u529F",
\u8BF7\u6C42\u5931\u8D25: "\u8BF7\u6C42\u5931\u8D25",
"\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5": "\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5",
ptpimg\u4E0A\u4F20\u5931\u8D25: "ptpimg\u4E0A\u4F20\u5931\u8D25",
\u8BF7\u5230\u914D\u7F6E\u9762\u677F\u4E2D\u586B\u5165ptpimg\u7684api_key: "\u8BF7\u5230\u914D\u7F6E\u9762\u677F\u4E2D\u586B\u5165ptpimg\u7684api_key",
\u5C01\u9762\u4E0A\u4F20\u5931\u8D25: "\u5C01\u9762\u4E0A\u4F20\u5931\u8D25",
"\u6570\u636E\u52A0\u8F7D\u4E2D...": "\u6570\u636E\u52A0\u8F7D\u4E2D...",
\u83B7\u53D6\u56FE\u7247\u5217\u8868\u5931\u8D25: "\u83B7\u53D6\u56FE\u7247\u5217\u8868\u5931\u8D25",
"\u8F6C\u6362\u4E2D...": "\u8F6C\u6362\u4E2D...",
"\u8F6C\u6362\u6210\u529F\uFF01": "\u8F6C\u6362\u6210\u529F\uFF01",
"\u83B7\u53D6\u4E2D...": "\u83B7\u53D6\u4E2D...",
\u7F3A\u5C11\u8C46\u74E3\u94FE\u63A5: "\u7F3A\u5C11\u8C46\u74E3\u94FE\u63A5",
"\u672C\u79CD\u5B50\u7981\u6B62\u8F6C\u8F7D\uFF0C\u786E\u5B9A\u8981\u7EE7\u7EED\u8F6C\u8F7D\u4E48\uFF1F": "\u672C\u79CD\u5B50\u7981\u6B62\u8F6C\u8F7D\uFF0C\u786E\u5B9A\u8981\u7EE7\u7EED\u8F6C\u8F7D\u4E48\uFF1F",
\u8BF7\u7B49\u5F85\u9875\u9762\u52A0\u8F7D\u5B8C\u6210: "\u8BF7\u7B49\u5F85\u9875\u9762\u52A0\u8F7D\u5B8C\u6210",
\u624B\u52A8\u8F93\u5165\u8C46\u74E3\u94FE\u63A5: "\u624B\u52A8\u8F93\u5165\u8C46\u74E3\u94FE\u63A5",
\u83B7\u53D6\u8C46\u74E3\u7B80\u4ECB: "\u83B7\u53D6\u8C46\u74E3\u7B80\u4ECB",
\u83B7\u53D6\u8C46\u74E3\u8BFB\u4E66\u7B80\u4ECB: "\u83B7\u53D6\u8C46\u74E3\u8BFB\u4E66\u7B80\u4ECB",
\u8F6C\u7F29\u7565\u56FE: "\u8F6C\u7F29\u7565\u56FE",
\u5FEB\u901F\u68C0\u7D22: "\u5FEB\u901F\u68C0\u7D22",
\u4E00\u952E\u7FA4\u8F6C: "\u4E00\u952E\u7FA4\u8F6C",
\u5FEB\u6377\u64CD\u4F5C: "\u5FEB\u6377\u64CD\u4F5C",
\u4E00\u952E\u8F6C\u79CD: "\u4E00\u952E\u8F6C\u79CD",
\u8F6C\u79CD\u7AD9\u70B9\u542F\u7528: "\u8F6C\u79CD\u7AD9\u70B9\u542F\u7528",
\u6279\u91CF\u8F6C\u79CD\u542F\u7528: "\u6279\u91CF\u8F6C\u79CD\u542F\u7528",
\u4E00\u952E\u6279\u91CF\u8F6C\u53D1\u5230\u4EE5\u4E0B\u9009\u4E2D\u7684\u7AD9\u70B9: "\u4E00\u952E\u6279\u91CF\u8F6C\u53D1\u5230\u4EE5\u4E0B\u9009\u4E2D\u7684\u7AD9\u70B9",
\u7AD9\u70B9\u641C\u7D22\u542F\u7528: "\u7AD9\u70B9\u641C\u7D22\u542F\u7528",
\u56FE\u5E8A\u914D\u7F6E: "\u56FE\u5E8A\u914D\u7F6E",
"\u5982\u4F55\u83B7\u53D6\uFF1F": "\u5982\u4F55\u83B7\u53D6\uFF1F",
\u989D\u5916\u529F\u80FD\u5173\u95ED: "\u989D\u5916\u529F\u80FD\u5173\u95ED",
\u5173\u95ED\u8F6C\u7F29\u7565\u56FE\u529F\u80FD: "\u5173\u95ED\u8F6C\u7F29\u7565\u56FE\u529F\u80FD",
\u5173\u95ED\u7AD9\u70B9\u56FE\u6807\u663E\u793A: "\u5173\u95ED\u7AD9\u70B9\u56FE\u6807\u663E\u793A",
\u5173\u95ED\u8F6C\u5B58ptpimg\u529F\u80FD: "\u5173\u95ED\u8F6C\u5B58ptpimg\u529F\u80FD",
\u4FDD\u5B58: "\u4FDD\u5B58",
\u53D6\u6D88: "\u53D6\u6D88",
\u9519\u8BEF: "\u9519\u8BEF",
\u6210\u529F: "\u6210\u529F",
\u4FDD\u5B58\u672C\u5730\u7AD9\u70B9\u8BBE\u7F6E\u5931\u8D25: "\u4FDD\u5B58\u672C\u5730\u7AD9\u70B9\u8BBE\u7F6E\u5931\u8D25",
\u8BF7\u5148\u8BBE\u7F6E\u7FA4\u8F6C\u5217\u8868: "\u8BF7\u5148\u8BBE\u7F6E\u7FA4\u8F6C\u5217\u8868",
"\u8F6C\u79CD\u9875\u9762\u5DF2\u6253\u5F00\uFF0C\u8BF7\u524D\u5F80\u5BF9\u5E94\u9875\u9762\u64CD\u4F5C": "\u8F6C\u79CD\u9875\u9762\u5DF2\u6253\u5F00\uFF0C\u8BF7\u524D\u5F80\u5BF9\u5E94\u9875\u9762\u64CD\u4F5C",
\u63D0\u793A: "\u63D0\u793A",
\u8F6C\u5B58\u622A\u56FE: "\u8F6C\u5B58\u622A\u56FE",
\u65E0\u9700\u8F6C\u5B58: "\u65E0\u9700\u8F6C\u5B58",
"\u4E0A\u4F20\u4E2D\uFF0C\u8BF7\u7A0D\u5019...": "\u4E0A\u4F20\u4E2D\uFF0C\u8BF7\u7A0D\u5019...",
\u4E0D\u663E\u793A\u81F4\u8C22\u5185\u5BB9: "\u4E0D\u663E\u793A\u81F4\u8C22\u5185\u5BB9",
\u62F7\u8D1D: "\u62F7\u8D1D",
\u5DF2\u590D\u5236: "\u5DF2\u590D\u5236",
\u4E0D\u663E\u793A\u8C46\u74E3\u6309\u94AE\u548C\u8C46\u74E3\u94FE\u63A5: "\u4E0D\u663E\u793A\u8C46\u74E3\u6309\u94AE\u548C\u8C46\u74E3\u94FE\u63A5",
\u8BF7\u586B\u5199\u6B63\u786E\u94FE\u63A5: "\u8BF7\u586B\u5199\u6B63\u786E\u94FE\u63A5"
};
var i18n_default = {
en_US,
"zh-CN": zh_CN
};
// src/common.js
var formatTorrentTitle = (title) => {
return title.replace(/\.(?!(\d+))/ig, " ").replace(/\.(?=\d{4}|48|57|72|2k|4k|7.1|6.1|5.1|4.1|2.0|1.0)/ig, " ").trim();
};
var handleError = (error) => {
showNotice({
text: error.message || error
});
};
var getDoubanInfo = async (doubanUrl) => {
try {
if (doubanUrl) {
const data = await fetch(doubanUrl, {
responseType: "text"
});
if (data) {
const doubanData = await getDataFromDoubanPage(data);
doubanData.format = getDoubanFormat(doubanData);
return doubanData;
} else {
if (doubanUrl.match(/\/book/)) {
throw data.error;
} else {
const doubanInfo = await getAnotherDoubanInfo(doubanUrl);
return doubanInfo;
}
}
} else {
throw $t("\u8C46\u74E3\u94FE\u63A5\u83B7\u53D6\u5931\u8D25");
}
} catch (error) {
handleError(error);
}
};
var getDataFromDoubanPage = async (domString) => {
var _a, _b, _c, _d;
const dom = new DOMParser().parseFromString(domString, "text/html");
const fetchAnchor = function(anchor) {
return anchor[0].nextSibling.nodeValue.trim();
};
const chineseTitle = $("title", dom).text().replace("(\u8C46\u74E3)", "").trim();
const foreignTitle = $('span[property="v:itemreviewed"]', dom).text().replace(chineseTitle, "").trim();
let aka = [];
let transTitle;
let thisTitle;
const akaAnchor = $('#info span.pl:contains("\u53C8\u540D")', dom);
if (akaAnchor.length > 0) {
aka = fetchAnchor(akaAnchor).split(" / ").sort(function(a, b) {
return a.localeCompare(b);
}).join("/");
aka = aka.split("/");
}
if (foreignTitle) {
transTitle = chineseTitle + (aka.length > 0 ? "/" + aka.join("/") : "");
thisTitle = foreignTitle;
} else {
transTitle = aka.join("/") || "";
thisTitle = chineseTitle;
}
transTitle = transTitle.split("/");
thisTitle = thisTitle.split("/");
const jsonData = JSON.parse($('head > script[type="application/ld+json"]', dom).html().replace(/(\r\n|\n|\r|\t)/gm, ""));
const rating = jsonData.aggregateRating ? jsonData.aggregateRating.ratingValue : 0;
const votes = jsonData.aggregateRating ? jsonData.aggregateRating.ratingCount : 0;
const director = jsonData.director ? jsonData.director : [];
const writer = jsonData.author ? jsonData.author : [];
const cast = jsonData.actor ? jsonData.actor : [];
const poster = jsonData.image.replace(/s(_ratio_poster|pic)/g, "l$1").replace(/img\d/, "img9");
const doubanLink = `https://movie.douban.com${jsonData.url}`;
let imdbId, imdbLink, imdbAverageRating, imdbVotes, imdbRating;
const imdbLinkAnchor = $('#info span.pl:contains("IMDb")', dom);
const hasImdb = imdbLinkAnchor.length > 0;
if (hasImdb) {
imdbId = fetchAnchor(imdbLinkAnchor);
imdbLink = `https://www.imdb.com/title/${imdbId}/`;
const imdbData = await fetch(`https://p.media-imdb.com/static-content/documents/v1/title/${imdbId}/ratings%3Fjsonp=imdb.rating.run:imdb.api.title.ratings/data.json`, {
responseType: "text"
});
imdbAverageRating = (_b = (_a = imdbData.match(/rating":(\d\.\d)/)) == null ? void 0 : _a[1]) != null ? _b : 0;
imdbVotes = (_d = (_c = imdbData.match(/ratingCount":(\d+)/)) == null ? void 0 : _c[1]) != null ? _d : 0;
imdbRating = `${imdbAverageRating}/10 from ${imdbVotes} users`;
}
const year = " " + $("#content > h1 > span.year", dom).text().substr(1, 4);
const playdate = $('#info span[property="v:initialReleaseDate"]', dom).map(function() {
return $(this).text().trim();
}).toArray().sort(function(a, b) {
return new Date(a) - new Date(b);
});
const introductionDom = $('#link-report > span.all.hidden, #link-report > [property="v:summary"]', dom);
const summary = (introductionDom.length > 0 ? introductionDom.text() : "\u6682\u65E0\u76F8\u5173\u5267\u60C5\u4ECB\u7ECD").split("\n").map((a) => a.trim()).filter((a) => a.length > 0).join("\n");
const genre = $('#info span[property="v:genre"]', dom).map(function() {
return $(this).text().trim();
}).toArray();
const language = fetchAnchor($('#info span.pl:contains("\u8BED\u8A00")', dom));
const region = fetchAnchor($('#info span.pl:contains("\u5236\u7247\u56FD\u5BB6/\u5730\u533A")', dom));
const runtimeAnchor = $('#info span.pl:contains("\u5355\u96C6\u7247\u957F")', dom);
const runtime = runtimeAnchor[0] ? fetchAnchor(runtimeAnchor) : $('#info span[property="v:runtime"]', dom).text().trim();
const episodesAnchor = $('#info span.pl:contains("\u96C6\u6570")');
const episodes = episodesAnchor[0] ? fetchAnchor(episodesAnchor) : "";
let tags;
const tag_another = $('div.tags-body > a[href^="/tag"]', dom);
if (tag_another.length > 0) {
tags = tag_another.map(function() {
return $(this).text();
}).get();
}
const awardsPage = await fetch(`${doubanLink}/awards`, {
responseType: "text"
});
const awardsDoc = new DOMParser().parseFromString(awardsPage, "text/html");
const awards = $("#content > div > div.article", awardsDoc).html().replace(/[ \n]/g, "").replace(/<\/li>/g, " ").replace(/<\/a> ]*>/g, "\n").replace(/<[^>]+>/g, "").replace(/ /g, " ").replace(/ +\n/g, "\n").trim();
return {
imdb_link: imdbLink,
imdb_id: imdbId,
imdb_rating_average: imdbAverageRating,
imdb_votes: imdbVotes,
imdb_rating: imdbRating,
chinese_title: chineseTitle,
foreign_title: foreignTitle,
aka,
trans_title: transTitle,
this_title: thisTitle,
year,
playdate,
region,
genre,
language,
episodes,
duration: runtime,
introduction: summary,
douban_link: doubanLink,
douban_rating_average: rating || 0,
douban_votes: votes,
douban_rating: `${rating}/10 from ${votes} users`,
poster,
director,
cast,
writer,
awards,
tags
};
};
var getAnotherDoubanInfo = async (doubanUrl) => {
var _a, _b;
try {
if (doubanUrl) {
const doubanId = (_b = (_a = doubanUrl.match(/subject\/(\d+)/)) == null ? void 0 : _a[1]) != null ? _b : "";
if (!doubanId) {
throw $t("\u8C46\u74E3ID\u83B7\u53D6\u5931\u8D25");
}
const data = await fetch(`https://movie.querydata.org/api?id=${doubanId}`);
if (data && data.id) {
return formatDoubanInfo(data);
} else {
throw data.message || $t("\u83B7\u53D6\u8C46\u74E3\u4FE1\u606F\u5931\u8D25");
}
} else {
throw $t("\u8C46\u74E3\u94FE\u63A5\u83B7\u53D6\u5931\u8D25");
}
} catch (error) {
handleError(error);
}
};
var formatDoubanInfo = (data) => {
var _a;
const {
doubanId,
imdbId,
imdbRating,
imdbVotes,
dateReleased,
alias,
originalName,
doubanRating,
episodes,
doubanVotes,
year,
duration,
director,
data: info,
actor,
writer
} = data;
const [chineseInfo, englishInfo] = info;
const chineseTitle = chineseInfo.name;
const foreignTitle = englishInfo.name;
const directorArray = director.map((item) => {
return {
name: `${item.data[0].name} ${item.data[1].name}`
};
});
const actorArray = actor.map((item) => {
return {
name: `${item.data[0].name} ${item.data[1].name}`
};
});
const writerArray = writer.map((item) => {
return {
name: `${item.data[0].name} ${item.data[1].name}`
};
});
let transTitle = (_a = alias == null ? void 0 : alias.split("/")) != null ? _a : "";
if (chineseTitle !== originalName && !alias.includes(chineseTitle)) {
transTitle = [chineseTitle].concat(transTitle);
}
const formatData = {
imdb_link: `https://www.imdb.com/title/${imdbId}`,
imdb_id: imdbId,
imdb_rating_average: imdbRating,
imdb_votes: imdbVotes,
imdb_rating: `${imdbRating}/10 from ${imdbVotes} users`,
chinese_title: chineseTitle,
foreign_title: foreignTitle,
aka: alias.split("/"),
trans_title: transTitle,
this_title: [originalName],
year,
playdate: [dateReleased == null ? void 0 : dateReleased.match(/\d+-\d+-\d+/)[0]],
region: info[0].country,
genre: chineseInfo.genre.split("/"),
language: chineseInfo.language,
episodes,
duration: `${duration / 60}\u5206\u949F`,
introduction: chineseInfo.description,
douban_link: `https://movie.douban.com/subject/${doubanId}`,
douban_rating_average: doubanRating || 0,
douban_votes: doubanVotes,
douban_rating: `${doubanRating}/10 from ${doubanVotes} users`,
poster: chineseInfo.poster,
director: directorArray,
cast: actorArray,
writer: writerArray
};
formatData.format = getDoubanFormat(formatData);
return formatData;
};
var getDoubanFormat = (data) => {
const {
poster,
this_title,
trans_title,
genre,
year: movieYear,
region,
language,
playdate,
imdb_rating,
imdb_link,
douban_rating,
douban_link,
episodes: showEpisodes,
duration: movieDuration,
director: directors,
writer: writers,
cast: actors,
introduction,
awards,
tags
} = data;
let descr = poster ? `[img]${poster}[/img]
` : "";
descr += trans_title ? `\u25CE\u8BD1\u3000\u3000\u540D\u3000${trans_title.join("/")}
` : "";
descr += this_title ? `\u25CE\u7247\u3000\u3000\u540D\u3000${this_title.join("/")}
` : "";
descr += movieYear ? `\u25CE\u5E74\u3000\u3000\u4EE3\u3000${movieYear.trim()}
` : "";
descr += region ? `\u25CE\u4EA7\u3000\u3000\u5730\u3000${region}
` : "";
descr += genre ? `\u25CE\u7C7B\u3000\u3000\u522B\u3000${genre.join(" / ")}
` : "";
descr += language ? `\u25CE\u8BED\u3000\u3000\u8A00\u3000${language}
` : "";
descr += playdate ? `\u25CE\u4E0A\u6620\u65E5\u671F\u3000${playdate.join(" / ")}
` : "";
descr += imdb_rating ? `\u25CEIMDb\u8BC4\u5206 ${imdb_rating}
` : "";
descr += imdb_link ? `\u25CEIMDb\u94FE\u63A5 ${imdb_link}
` : "";
descr += douban_rating ? `\u25CE\u8C46\u74E3\u8BC4\u5206\u3000${douban_rating}
` : "";
descr += douban_link ? `\u25CE\u8C46\u74E3\u94FE\u63A5\u3000${douban_link}
` : "";
descr += showEpisodes ? `\u25CE\u96C6\u3000\u3000\u6570\u3000${showEpisodes}
` : "";
descr += movieDuration ? `\u25CE\u7247\u3000\u3000\u957F\u3000${movieDuration}
` : "";
descr += directors && directors.length > 0 ? `\u25CE\u5BFC\u3000\u3000\u6F14\u3000${directors.map((x) => x.name).join(" / ")}
` : "";
descr += writers && writers.length > 0 ? `\u25CE\u7F16\u3000\u3000\u5267\u3000${writers.map((x) => x.name).join(" / ")}
` : "";
descr += actors && actors.length > 0 ? `\u25CE\u4E3B\u3000\u3000\u6F14\u3000${actors.map((x) => x.name).join("\n" + "\u3000".repeat(4) + " \u3000").trim()}
` : "";
descr += tags && tags.length > 0 ? `
\u25CE\u6807\u3000\u3000\u7B7E\u3000${tags.join(" | ")}
` : "";
descr += introduction ? `
\u25CE\u7B80\u3000\u3000\u4ECB
\u3000\u3000${introduction.replace(/\n/g, "\n" + "\u3000".repeat(2))}
` : "";
descr += awards ? `
\u25CE\u83B7\u5956\u60C5\u51B5
\u3000\u3000${awards.replace(/\n/g, "\n" + "\u3000".repeat(2))}
` : "";
return descr.trim();
};
var getDoubanIdByIMDB = async (query) => {
var _a, _b, _c;
try {
const imdbId = getIMDBIdByUrl(query);
const params = imdbId || query;
const url = DOUBAN_SUGGEST_API.replace("{query}", params);
const data = await fetch(url, {
responseType: "text"
});
const doc = new DOMParser().parseFromString(data, "text/html");
const linkDom = doc.querySelector(".result-list .result h3 a");
if (!linkDom) {
throw $t("\u8C46\u74E3ID\u83B7\u53D6\u5931\u8D25");
} else {
const {href, textContent} = linkDom;
const season = (_b = (_a = textContent.match(/第(.+?)季/)) == null ? void 0 : _a[1]) != null ? _b : "";
const doubanId = (_c = decodeURIComponent(href).match(/subject\/(\d+)/)) == null ? void 0 : _c[1];
return {
id: doubanId,
season,
title: textContent
};
}
} catch (error) {
handleError(error);
}
};
var getIMDBData = async (imdbUrl) => {
try {
if (!imdbUrl) {
throw new Error("$t(\u7F3A\u5C11IMDB\u4FE1\u606F)");
}
const data = await fetch(`${PT_GEN_API}?url=${imdbUrl}`);
if (data && data.success) {
return data;
} else {
throw data.error || $t("\u8BF7\u6C42\u5931\u8D25");
}
} catch (error) {
handleError(error);
}
};
var transferImgs = async (screenshot, authToken, imgHost = "https://imgbb.com/json") => {
try {
const isHdbHost = !!screenshot.match(/i\.hdbits\.org/);
const formData = new FormData();
if (isHdbHost) {
const promiseArray = [urlToFile(screenshot)];
const [fileData] = await Promise.all(promiseArray);
formData.append("type", "file");
formData.append("source", fileData);
} else {
formData.append("type", "url");
formData.append("source", screenshot);
}
formData.append("action", "upload");
formData.append("timestamp", Date.now());
formData.append("auth_token", authToken);
const res = await fetch(imgHost, {
method: "POST",
data: formData,
timeout: 3e5
});
if (res.status_txt !== "OK") {
throw $t("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
}
if (res.image) {
return res.image;
} else {
throw $t("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
}
} catch (error) {
handleError(error);
}
};
var getPreciseCategory = (torrentInfo, category) => {
var _a, _b;
const {description, title, subtitle, doubanInfo} = torrentInfo;
const movieGenre = (_b = (_a = (description + doubanInfo).match(/(类\s+别)\s+(.+)?/)) == null ? void 0 : _a[2]) != null ? _b : "";
if (category === "movie") {
if (movieGenre.match(/动画/)) {
category = "cartoon";
} else if (movieGenre.match(/纪录/)) {
category = "documentary";
}
} else if (category == null ? void 0 : category.match(/tv/)) {
if (movieGenre.match(/动画/)) {
category = "cartoon";
} else if (movieGenre.match(/纪录/)) {
category = "documentary";
} else if (title.match(/(s0?\d{1,2})?e(p)?\d{1,2}/i) || (subtitle == null ? void 0 : subtitle.match(/第[^\s]集/))) {
category = "tv";
} else {
category = "tvPack";
}
}
return category;
};
var getUrlParam = (key) => {
const reg = new RegExp("(^|&)" + key + "=([^&]*)(&|$)");
const regArray = location.search.substr(1).match(reg);
if (regArray) {
return unescape(regArray[2]);
}
return "";
};
var getAudioCodecFromTitle = (title) => {
if (!title) {
return "";
}
title = title.replace(/:|-|\s/g, "");
if (title.match(/atmos/i)) {
return "atmos";
} else if (title.match(/dtshdma/i)) {
return "dtshdma";
} else if (title.match(/dtsx/i)) {
return "dtsx";
} else if (title.match(/dts/i)) {
return "dts";
} else if (title.match(/truehd/i)) {
return "truehd";
} else if (title.match(/lpcm/i)) {
return "lpcm";
} else if (title.match(/flac/i)) {
return "flac";
} else if (title.match(/aac/i)) {
return "aac";
} else if (title.match(/DD\+|DDP|DolbyDigitalPlus/i)) {
return "dd+";
} else if (title.match(/DD|DolbyDigital/i)) {
return "dd";
} else if (title.match(/ac3/i)) {
return "ac3";
}
return "";
};
var getVideoCodecFromTitle = (title, videoType = "") => {
title = title.replace(/\.|-/g, "");
if (title.match(/x264/i) || title.match(/h264|avc/i) && videoType === "encode") {
return "x264";
} else if (title.match(/h264|AVC/i)) {
return "h264";
} else if (title.match(/x265/i) || title.match(/h265|hevc/i) && videoType === "encode") {
return "x265";
} else if (title.match(/hevc|h265/i)) {
return "hevc";
} else if (title.match(/vc-?1/i)) {
return "vc1";
} else if (title.match(/mpeg-?2/i)) {
return "mpeg2";
} else if (title.match(/mpeg-?4/i)) {
return "mpeg4";
}
return "";
};
var getFilterImages = (bbcode) => {
if (!bbcode) {
return [];
}
let allImages = bbcode.match(/(\[url=(http(s)*:\/{2}.+?)\])?\[img\](.+?)\[\/img](\[url\])?/g);
if (allImages && allImages.length > 0) {
allImages = allImages.map((img) => {
if (img.match(/\[url=.+?\]/)) {
return img + "[/url]";
}
return img;
});
return allImages.filter((item) => {
return !item.match(/MoreScreens|PTer\.png|trans\.gif|PTerREMUX\.png|PTerWEB\.png|CS\.png|Ourbits_info|GDJT|douban|logo|(2019\/03\/28\/5c9cb8f8216d7\.png)|_front|(info_01\.png)|(screens\.png)|(04\/6b\/Ggp5ReQb_o)|(ce\/e7\/KCmGFMOB_o)/);
});
}
return [];
};
var getScreenshotsFromBBCode = (bbcode) => {
const allImages = getFilterImages(bbcode);
if (allImages && allImages.length > 0) {
return getOriginalImgUrl(allImages);
}
return "";
};
var getOriginalImgUrl = (imgArray) => {
return imgArray.map((item) => {
var _a, _b, _c, _d, _e, _f;
let imgUrl = item;
if (item.match(/\[url=http(s)*:.+/)) {
imgUrl = (_a = item.match(/=(([^\]])+)/)) == null ? void 0 : _a[1];
if (imgUrl.match(/img\.hdbits\.org/)) {
const imgId = item.match(/\[url=https:\/\/img\.hdbits\.org\/(\w+)?\]/)[1];
imgUrl = `https://i.hdbits.org/${imgId}.png`;
} else if (item.match(/img\.pterclub\.com/)) {
imgUrl = (_b = item.match(/img\](([^[])+)/)) == null ? void 0 : _b[1];
imgUrl = imgUrl.replace(/\.th/g, "");
} else if (item.match(/https:\/\/imgbox\.com/)) {
imgUrl = (_c = item.match(/img\](([^[])+)/)) == null ? void 0 : _c[1];
imgUrl = imgUrl.replace(/thumbs(\d)/, "images$1").replace(/_t(\.png)/, "_o.png");
} else if (!imgUrl.match(/\.(jpg|png|gif|bmp)$/)) {
imgUrl = (_d = item.match(/img\](([^[])+)/)) == null ? void 0 : _d[1];
} else if (item.match(/https:\/\/pixhost\.to/)) {
const hostNumber = (_e = item.match(/img\]https:\/\/t(\d+)\./)) == null ? void 0 : _e[1];
imgUrl = imgUrl.replace(/(pixhost\.to)\/show/, `img${hostNumber}.$1/images`);
}
} else if (item.match(/\[img\]/)) {
imgUrl = (_f = item.match(/img\](([^[])+)/)) == null ? void 0 : _f[1];
}
return imgUrl;
});
};
var getSourceFromTitle = (title) => {
if (title.match(/(uhd|2160|4k).*(blu(-)?ray|remux)/i)) {
return "uhdbluray";
} else if (title.match(/blu(-)?ray|remux/i)) {
return "bluray";
} else if (title.match(/hdtv/i)) {
return "hdtv";
} else if (title.match(/web(-(rip|dl))+/i)) {
return "web";
} else if (title.match(/hddvd/i)) {
return "hddvd";
} else if (title.match(/dvd/i)) {
return "dvd";
} else if (title.match(/vhs/i)) {
return "vhs";
}
return "other";
};
var getSubTitle = (data) => {
var _a, _b;
const {chinese_title: chineseTitle, this_title: originalTitle, trans_title: transTitle} = data;
let title = "";
if (chineseTitle.match(/[\u4e00-\u9fa5]+/)) {
title += chineseTitle;
}
const moreTitle = originalTitle.concat(transTitle).filter((item) => title !== item);
let seasonEpisode = (_b = (_a = TORRENT_INFO.title.match(/S\d+EP?(\d+)?/i)) == null ? void 0 : _a[1]) != null ? _b : "";
seasonEpisode = seasonEpisode.replace(/^0/i, "");
const episode = seasonEpisode ? ` \u7B2C${seasonEpisode}\u96C6` : "";
return `${title}${moreTitle.length > 0 ? "/" : ""}${moreTitle.join("/")}${episode}`;
};
var getAreaCode = (area) => {
const europeList = EUROPE_LIST;
if (area) {
if (area.match(/USA|US|Canada|CA|美国|加拿大|United States/i)) {
return "US";
} else if (europeList.includes(area) || area.match(/欧|英|法|德|俄|意|苏联|EU/i)) {
return "EU";
} else if (area.match(/Japan|日本|JP/i)) {
return "JP";
} else if (area.match(/Korea|韩国|KR/i)) {
return "KR";
} else if (area.match(/Taiwan|台湾|TW/i)) {
return "TW";
} else if (area.match(/Hong\s?Kong|香港|HK/i)) {
return "HK";
} else if (area.match(/CN|China|大陆|中|内地|Mainland/i)) {
return "CN";
}
}
return "OT";
};
var getBDType = (size) => {
const GBSize = size / 1e9;
if (GBSize < 5) {
return "DVD5";
} else if (GBSize < 9) {
return "DVD9";
} else if (GBSize < 25) {
return "BD25";
} else if (GBSize < 50) {
return "BD50";
} else if (GBSize < 66) {
return "BD66";
} else if (GBSize < 100) {
return "BD100";
}
};
var getTMDBIdByIMDBId = async (imdbid) => {
try {
const url = `${TMDB_API_URL}/3/find/${imdbid}?api_key=${TMDB_API_KEY}&language=en&external_source=imdb_id`;
const data = await fetch(url);
const isMovie = data.movie_results && data.movie_results.length > 0;
const isTV = !data.tv_results && data.tv_results.length > 0;
if (!isMovie && !isTV) {
throw $t("\u8BF7\u6C42\u5931\u8D25");
}
const tmdbData = isMovie ? data.movie_results[0] : data.tv_results[0];
return tmdbData;
} catch (error) {
return {};
}
};
var getTMDBVideos = async (tmdbId) => {
const url = `${TMDB_API_URL}/3/movie/${tmdbId}/videos?api_key=${TMDB_API_KEY}&language=en`;
const data = await fetch(url);
return data.results || [];
};
var getIMDBIdByUrl = (imdbLink) => {
const imdbIdArray = /tt\d+/.exec(imdbLink);
if (imdbIdArray && imdbIdArray[0]) {
return imdbIdArray[0];
}
return "";
};
var getSize = (size) => {
if (!size) {
return "";
}
if (size.match(/T/i)) {
return parseFloat(size) * 1024 * 1024 * 1024 * 1024 || 0;
} else if (size.match(/G/i)) {
return parseFloat(size) * 1024 * 1024 * 1024 || 0;
} else if (size.match(/M/i)) {
return parseFloat(size) * 1024 * 1024 || 0;
} else if (size.match(/K/i)) {
return parseFloat(size) * 1024 || 0;
}
return "";
};
var getInfoFromMediaInfo = (mediaInfo) => {
var _a, _b, _c;
if (!mediaInfo) {
return false;
}
const mediaArray = mediaInfo.split(/\n\s*\n/).filter((item) => !!item.trim());
const [generalPart, videoPart] = mediaArray;
const secondVideoPart = mediaArray.filter((item) => item.startsWith("Video #2"));
const [audioPart, ...otherAudioPart] = mediaArray.filter((item) => item.startsWith("Audio"));
const textPart = mediaArray.filter((item) => item.startsWith("Text"));
const completeName = getMediaValueByKey("Complete name", generalPart);
const format = (_c = (_b = (_a = completeName == null ? void 0 : completeName.match(/\.(\w+)$/i)) == null ? void 0 : _a[1]) == null ? void 0 : _b.toLowerCase()) != null ? _c : "";
const fileName = completeName.replace(/\.\w+$/i, "");
const fileSize = getSize(getMediaValueByKey("File size", generalPart));
const {videoCodec, hdrFormat, isDV} = getVideoCodecByMediaInfo(videoPart, generalPart, secondVideoPart);
const {audioCodec, channelName, languageArray} = getAudioCodecByMediaInfo(audioPart, otherAudioPart);
const subtitleLanguageArray = textPart.map((item) => {
return getMediaValueByKey("Language", item);
});
const mediaTags = getMediaTags(audioCodec, channelName, languageArray, subtitleLanguageArray, hdrFormat, isDV);
const resolution = getResolution(videoPart);
return {
fileName,
fileSize,
format,
subtitles: subtitleLanguageArray,
videoCodec,
audioCodec,
resolution,
mediaTags
};
};
var getMediaValueByKey = (key, mediaInfo) => {
if (!mediaInfo) {
return "";
}
const keyRegStr = key.replace(/\s/, "\\s*").replace(/(\(|\))/g, "\\$1");
const reg = new RegExp(`${keyRegStr}\\s*:\\s([^\\n]+)`, "i");
return mediaInfo.match(reg) ? mediaInfo.match(reg)[1] : "";
};
var getResolution = (mediaInfo) => {
const height = parseInt(getMediaValueByKey("Height", mediaInfo).replace(/\s/g, ""));
const width = parseInt(getMediaValueByKey("Width", mediaInfo).replace(/\s/g, ""));
const ScanType = getMediaValueByKey("Scan type", mediaInfo);
if (height > 1080) {
return "2160p";
} else if (height > 720 && ScanType === "Progressive") {
return "1080p";
} else if (height > 720 && ScanType !== "Progressive") {
return "1080i";
} else if (height > 576 || width > 1024) {
return "720p";
} else if (height > 480 || width === 1024) {
return "576p";
} else if (width >= 840 || height === 480) {
return "480p";
} else if (width && height) {
return `${width}x${height}`;
} else {
return "";
}
};
var getMediaTags = (audioCodec, channelName, languageArray, subtitleLanguageArray, hdrFormat, isDV) => {
const hasChineseAudio = languageArray.includes("Chinese");
const hasChineseSubtitle = subtitleLanguageArray.includes("Chinese");
const mediaTags = {};
if (hasChineseAudio) {
mediaTags.chinese_audio = true;
}
if (languageArray.includes("Cantonese")) {
mediaTags.cantonese_audio = true;
}
if (hasChineseSubtitle) {
mediaTags.chinese_subtitle = true;
}
if (hdrFormat) {
if (hdrFormat.match(/HDR10\+/i)) {
mediaTags.hdr10_plus = true;
} else if (hdrFormat.match(/HDR/i)) {
mediaTags.hdr = true;
}
}
if (isDV) {
mediaTags.dolby_vision = true;
}
if (audioCodec.match(/dtsx|atmos/ig)) {
mediaTags.dts_x = true;
} else if (audioCodec.match(/atmos/ig)) {
mediaTags.dolby_atmos = true;
}
return mediaTags;
};
var getVideoCodecByMediaInfo = (mainVideo, generalPart, secondVideo) => {
const generalFormat = getMediaValueByKey("Format", generalPart);
const videoFormat = getMediaValueByKey("Format", mainVideo);
const videoFormatVersion = getMediaValueByKey("Format version", mainVideo);
const videoCodeId = getMediaValueByKey("Codec ID", mainVideo);
const hdrFormat = getMediaValueByKey("HDR format", mainVideo);
const isDV = hdrFormat.match(/Dolby\s*Vision/i) || secondVideo.length > 0 && getMediaValueByKey("HDR format", secondVideo[0]).match(/Dolby\s*Vision/i);
const isEncoded = !!getMediaValueByKey("Encoding settings", mainVideo);
let videoCodec = "";
if (generalFormat === "DVD Video") {
videoCodec = "mpeg2";
} else if (generalFormat === "MPEG-4") {
videoCodec = "mpeg4";
} else if (videoFormat === "MPEG Video" && videoFormatVersion === "Version 2") {
videoCodec = "mpeg2";
} else if (videoCodeId.match(/xvid/i)) {
videoCodec = "xvid";
} else if (videoFormat.match(/HEVC/i) && !isEncoded) {
videoCodec = "hevc";
} else if (videoFormat.match(/HEVC/i) && isEncoded) {
videoCodec = "x265";
} else if (videoFormat.match(/AVC/i) && isEncoded) {
videoCodec = "x264";
} else if (videoFormat.match(/AVC/i) && !isEncoded) {
videoCodec = "h264";
} else if (videoFormat.match(/VC-1/i)) {
videoCodec = "vc1";
}
return {
videoCodec,
hdrFormat,
isDV
};
};
var getAudioCodecByMediaInfo = (mainAudio, otherAudio = []) => {
const audioFormat = getMediaValueByKey("Format", mainAudio);
const audioChannels = getMediaValueByKey("Channel(s)", mainAudio);
const commercialName = getMediaValueByKey("Commercial name", mainAudio);
const languageArray = [mainAudio, ...otherAudio].map((item) => {
return getMediaValueByKey("Language", item);
});
let channelName = "";
let audioCodec = "";
const channelNumber = parseInt(audioChannels);
if (channelNumber && channelNumber >= 6) {
channelName = `${channelNumber - 1}.1`;
} else {
channelName = `${channelNumber}.0`;
}
if (audioFormat.match(/MLP FBA/i) && commercialName.match(/Dolby Atmos/i)) {
audioCodec = "atmos";
} else if (audioFormat.match(/MLP FBA/i) && !commercialName.match(/Dolby Atmos/i)) {
audioCodec = "truehd";
} else if (audioFormat.match(/AC-3/i) && commercialName.match(/Dolby Digital Plus/i)) {
audioCodec = "dd+";
} else if (audioFormat.match(/AC-3/i) && commercialName.match(/Dolby Digital/i)) {
audioCodec = "dd";
} else if (audioFormat.match(/AC-3/i)) {
audioCodec = "ac3";
} else if (audioFormat.match(/DTS XLL X/i)) {
audioCodec = "dtsx";
} else if (audioFormat.match(/DTS/i) && commercialName.match(/DTS-HD Master Audio/i)) {
audioCodec = "dtshdma";
} else if (audioFormat.match(/DTS/i)) {
audioCodec = "dts";
} else if (audioFormat.match(/FLAC/i)) {
audioCodec = "flac";
} else if (audioFormat.match(/AAC/i)) {
audioCodec = "aac";
} else if (audioFormat.match(/LPCM/i)) {
audioCodec = "lpcm";
}
return {
audioCodec,
channelName,
languageArray
};
};
var getInfoFromBDInfo = (bdInfo) => {
var _a, _b, _c, _d;
if (!bdInfo) {
return "";
}
const splitArray = bdInfo.split("Disc Title");
if (splitArray.length > 2) {
bdInfo = splitArray[1];
}
const videoMatch = bdInfo.match(/VIDEO:(\s|Codec|Bitrate|Description|Language|-)*((.|\n)*)AUDIO:/i);
const hasFileInfo = bdInfo.match(/FILES:/i);
const subtitleReg = new RegExp(`SUBTITLE(S)*:(\\s|Codec|Bitrate|Description|Language|-)*((.|\\n)*)${hasFileInfo ? "FILES:" : ""}`, "i");
const subtitleMatch = bdInfo.match(subtitleReg);
const audioReg = new RegExp(`AUDIO:(\\s|Codec|Bitrate|Description|Language|-)*((.|\\n)*)${subtitleMatch ? "(SUBTITLE(S)?)" : hasFileInfo ? "FILES:" : ""}`, "i");
const audioMatch = bdInfo.match(audioReg);
const fileSize = (_b = (_a = bdInfo.match(/Disc\s*Size:\s*((\d|,| )+)bytes/)) == null ? void 0 : _a[1]) == null ? void 0 : _b.replace(/,/g, "");
const quickSummaryStyle = !bdInfo.match(/PLAYLIST REPORT/i);
const videoPart = splitBDMediaInfo(videoMatch, 2);
const [mainVideo = "", otherVideo = ""] = videoPart;
const videoCodec = mainVideo.match(/2160/) ? "hevc" : "h264";
const hdrFormat = (_c = mainVideo.match(/\/\s*HDR(\d)*(\+)*\s*\//i)) == null ? void 0 : _c[0];
const isDV = !!otherVideo.match(/\/\s*Dolby\s*Vision\s*/i);
const audioPart = splitBDMediaInfo(audioMatch, 2);
const subtitlePart = splitBDMediaInfo(subtitleMatch, 3);
const resolution = (_d = mainVideo.match(/\d{3,4}(p|i)/)) == null ? void 0 : _d[0];
const {audioCodec = "", channelName = "", languageArray = []} = getBDAudioInfo(audioPart, quickSummaryStyle);
const subtitleLanguageArray = subtitlePart.map((item) => {
var _a2, _b2;
const quickStyleMatch = (_a2 = item.match(/(\w+)\s*\//)) == null ? void 0 : _a2[1];
const normalMatch = (_b2 = item.match(/Graphics\s*(\w+)\s*(\d|\.)+\s*kbps/i)) == null ? void 0 : _b2[1];
const language = quickSummaryStyle ? quickStyleMatch : normalMatch;
return language;
});
const mediaTags = getMediaTags(audioCodec, channelName, languageArray, subtitleLanguageArray, hdrFormat, isDV);
return {
fileSize,
videoCodec,
subtitles: subtitleLanguageArray,
audioCodec,
resolution,
mediaTags
};
};
var splitBDMediaInfo = (matchArray, matchIndex) => {
var _a, _b;
return (_b = (_a = matchArray == null ? void 0 : matchArray[matchIndex]) == null ? void 0 : _a.split("\n").filter((item) => !!item)) != null ? _b : [];
};
var getBDAudioInfo = (audioPart, quickSummaryStyle) => {
var _a, _b;
if (audioPart.length < 1) {
return {};
}
const sortArray = audioPart.sort((a, b) => {
var _a2, _b2;
const firstBitrate = parseInt((_a2 = a.match(/\/\s*(\d+)\s*kbps/i)) == null ? void 0 : _a2[1]);
const lastBitrate = parseInt((_b2 = b.match(/\/\s*(\d+)\s*kbps/i)) == null ? void 0 : _b2[1]);
return lastBitrate - firstBitrate;
});
const [mainAudio, secondAudio] = sortArray;
const mainAudioCodec = getAudioCodecFromTitle(mainAudio);
const secondAudioCodec = getAudioCodecFromTitle(secondAudio);
let audioCodec = mainAudioCodec;
let channelName = (_a = mainAudio.match(/\d\.\d/)) == null ? void 0 : _a[0];
if (mainAudioCodec === "lpcm" && secondAudioCodec === "dtshdma") {
audioCodec = secondAudioCodec;
channelName = (_b = mainAudio.match(/\d\.\d/)) == null ? void 0 : _b[0];
}
const languageArray = sortArray.map((item) => {
var _a2, _b2;
const quickStyleMatch = (_a2 = item.match(/(\w+)\s*\//)) == null ? void 0 : _a2[1];
const normalMatch = (_b2 = item.match(/Audio\s*(\w+)\s*\d+\s*kbps/)) == null ? void 0 : _b2[1];
const language = quickSummaryStyle ? quickStyleMatch : normalMatch;
return language;
});
return {
audioCodec,
channelName,
languageArray
};
};
var wrappingBBCodeTag = ({pre, post, tracker}, preTag, poTag) => {
const isPre = typeof pre !== "undefined" && pre !== null;
const isPost = typeof post !== "undefined" && post !== null;
if (isPre) {
pre.unshift(preTag);
}
if (isPost) {
post.push(poTag);
}
};
var getFilterBBCode = (content) => {
if (content) {
const bbCodes = htmlToBBCode(content);
return bbCodes.replace(/\[quote\]((.|\n)*?)\[\/quote\]/g, function(match, p1) {
if (p1 && p1.match(/温馨提示|郑重|PT站|网上搜集|本种子|商业盈利|商业用途|带宽|寬帶|法律责任|Quote:|正版|商用|注明|后果|负责/)) {
return "";
}
return match;
});
}
};
var rgb2hex = (rgb) => {
rgb = rgb.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
return rgb && rgb.length === 4 ? "#" + ("0" + parseInt(rgb[1], 10).toString(16)).slice(-2) + ("0" + parseInt(rgb[2], 10).toString(16)).slice(-2) + ("0" + parseInt(rgb[3], 10).toString(16)).slice(-2) : "";
};
var ensureProperColor = (color) => {
if (/rgba?/.test(color))
return rgb2hex(color);
return color;
};
var htmlToBBCode = (node) => {
const bbCodes = [];
const pre = [];
const post = [];
const pp = wrappingBBCodeTag.bind(null, {pre, post});
switch (node.nodeType) {
case 1: {
switch (node.tagName.toUpperCase()) {
case "SCRIPT": {
return "";
}
case "UL": {
pp(null, null);
break;
}
case "OL": {
pp("[list=1]", "[/list]");
break;
}
case "LI": {
const {className} = node;
if (CURRENT_SITE_INFO.siteType === "UNIT3D" && className) {
return `[quote]${node.textContent.trim()}[/quote]`;
} else {
pp("[*]", "\n");
break;
}
}
case "B": {
pp("[b]", "[/b]");
break;
}
case "U": {
pp("[u]", "[/u]");
break;
}
case "I": {
pp("[i]", "[/i]");
break;
}
case "DIV": {
const {className} = node;
if (className === "codemain") {
if (node.firstChild && node.firstChild.tagName === "PRE") {
pp("");
break;
} else {
node.innerHTML = node.innerHTML.replace(/ /g, " ");
return `
[quote]${node.textContent}[/quote]`;
}
} else if (className === "hidden" && CURRENT_SITE_NAME === "HDT") {
pp("\n[quote]", "[/quote]");
break;
} else if (className.match("spoiler") && CURRENT_SITE_NAME === "KG") {
if (className === "spoiler-content") {
pp("\n[quote]", "[/quote]");
} else if (className === "spoiler-header") {
return "";
}
break;
} else if (CURRENT_SITE_NAME === "BeyondHD") {
if (className === "spoilerChild") {
pp("\n[quote]", "[/quote]");
} else if (className === "spoilerHide") {
return "";
}
break;
} else if (className === "spoiler-text" && CURRENT_SITE_INFO.siteType === "AvistaZ") {
pp("\n[quote]", "[/quote]");
break;
} else if (className === "spoiler-toggle" && CURRENT_SITE_INFO.siteType === "AvistaZ") {
return "";
} else {
pp("\n", "\n");
break;
}
}
case "P": {
pp("\n");
break;
}
case "BR": {
if (CURRENT_SITE_INFO.siteType === "NexusPHP" && CURRENT_SITE_NAME !== "OurBits" || CURRENT_SITE_NAME.match(/^(UHDBits|HDBits|BTN)/)) {
pp("");
} else {
pp("\n");
}
break;
}
case "SPAN": {
pp(null, null);
break;
}
case "BLOCKQUOTE":
case "PRE":
case "FIELDSET": {
pp("[quote]", "[/quote]");
break;
}
case "CENTER": {
pp("[center]", "[/center]");
break;
}
case "TD": {
if (CURRENT_SITE_NAME.match(/^(TTG|HDBits|KG|HDSpace)/) || CURRENT_SITE_NAME === "HDT" || CURRENT_SITE_INFO.siteType === "UNIT3D") {
pp("[quote]", "[/quote]");
break;
} else if (CURRENT_SITE_NAME === "EMP") {
pp("");
break;
} else {
return "";
}
}
case "IMG": {
let imgUrl = "";
const {src, title} = node;
const dataSrc = node.getAttribute("data-src") || node.getAttribute("data-echo");
if (title === ":m:") {
return ":m:";
}
if (dataSrc) {
imgUrl = dataSrc.match(/(http(s)?:)?\/\//) ? dataSrc : location.origin + "/" + dataSrc;
} else if (src && !src.match(/ico_\w+.gif|jinzhuan|thumbsup|kralimarko/)) {
imgUrl = src;
} else {
return "";
}
return `[img]${imgUrl}[/img]`;
}
case "FONT": {
const {color: color2, size} = node;
if (color2) {
pp(`[color=${ensureProperColor(color2)}]`, "[/color]");
}
if (size) {
pp(`[size=${size}]`, "[/size]");
}
break;
}
case "A": {
const {href, textContent} = node;
if (href && href.length > 0) {
if (CURRENT_SITE_NAME === "HDSpace") {
const div = $(node).find("div");
if (div[0] && div.attr("id")) {
const imgUrl = div.find("img").attr("src");
return `[url=${href}][img]${imgUrl}[/img][/url]`;
}
} else if (href.match(/javascript:void/) || textContent === "show" && CURRENT_SITE_NAME === "HDT") {
return "";
} else {
pp(`[url=${href}]`, "[/url]");
}
}
break;
}
case "H1": {
pp('[b][size="7"]', "[/size][/b]\n");
break;
}
case "H2": {
pp('[b][size="6"]', "[/size][/b]\n");
break;
}
case "H3": {
pp('[b][size="5"]', "[/size][/b]\n");
break;
}
case "H4": {
pp('[b][size="4"]', "[/size][/b]\n");
break;
}
}
const {textAlign, fontWeight, fontStyle, textDecoration, color} = node.style;
if (textAlign) {
switch (textAlign.toUpperCase()) {
case "LEFT": {
pp("[left]", "[/left]");
break;
}
case "RIGHT": {
pp("[right]", "[/right]");
break;
}
case "CENTER": {
pp("[center]", "[/center]");
break;
}
}
}
if (fontWeight === "bold" || ~~fontWeight >= 600) {
pp("[b]", "[/b]");
}
if (fontStyle === "italic")
pp("[i]", "[/i]");
if (textDecoration === "underline")
pp("[u]", "[/u]");
if (color && color.trim() !== "")
pp(`[color=${ensureProperColor(color)}]`, "[/color]");
break;
}
case 3: {
if (node.textContent.trim().match(/^(引用|Quote|代码|代碼|Show|Hide|Hidden text|Hidden content|\[show\]|\[Show\])/)) {
return "";
}
return node.textContent;
}
default:
return null;
}
node.childNodes.forEach((node2, i) => {
const code = htmlToBBCode(node2);
if (code) {
bbCodes.push(code);
}
});
return pre.concat(bbCodes).concat(post).join("");
};
var getTagsFromSubtitle = (title) => {
const tags = {};
if (title.match(/diy/i)) {
tags.diy = true;
}
if (title.match(/国配|国语|普通话|国粤/i) && !title.match(/多国语言/)) {
tags.chinese_audio = true;
}
if (title.match(/Atmos|杜比全景声/i)) {
tags.dolby_atoms = true;
}
if (title.match(/HDR/i)) {
if (title.match(/HDR10\+/i)) {
tags.hdr10_plus = true;
} else {
tags.hdr = true;
}
}
if (title.match(/DoVi|(Dolby\s*Vision)|杜比视界/i)) {
tags.dolby_vision = true;
}
if (title.match(/粤/i)) {
tags.cantonese_audio = true;
}
if (title.match(/简繁|繁简|繁体|简体|中字|中英|中文/i)) {
tags.chinese_subtitle = true;
}
if (title.match(/Criterion|CC标准/i)) {
tags.the_criterion_collection = true;
}
return tags;
};
var getBDInfoOrMediaInfo = (bbcode) => {
var _a, _b, _c;
const quoteList = (_a = bbcode == null ? void 0 : bbcode.match(/\[quote\](.|\n)+?\[\/quote\]/g)) != null ? _a : [];
let bdinfo = "";
let mediaInfo = "";
quoteList.forEach((quote) => {
const quoteContent = quote.replace(/\[\/?quote\]/g, "").replace(/\u200D/g, "");
if (quoteContent.match(/Disc\s?Size|\.mpls/i)) {
bdinfo += quoteContent;
}
if (quoteContent.match(/(Unique\s*ID)|(Codec\s*ID)|(Stream\s*size)/i)) {
mediaInfo += quoteContent;
}
});
if (!bdinfo) {
bdinfo = (_c = (_b = bbcode.match(/Disc\s+(Info|Title|Label)[^[]+/i)) == null ? void 0 : _b[0]) != null ? _c : "";
}
return {
bdinfo,
mediaInfo
};
};
var replaceRegSymbols = (string) => {
return string.replace(/([*.?+$^[\](){}|\\/])/g, "\\$1");
};
var getRtIdFromTitle = async (title, tv, year) => {
var _a;
console.log(title, year);
const MAX_YEAR_DIFF = 2;
tv = tv || false;
year = parseInt(year) || 1800;
const url = `https://www.rottentomatoes.com/api/private/v2.0/search/?limit=2&q=${title}`;
const data = await fetch(url);
const movies = tv ? data.tvSeries : data.movies;
if (!Array.isArray(movies) || movies.length < 1) {
console.log("no search results");
return {};
}
const sorted = movies.concat();
if (year && sorted) {
sorted.sort((a, b) => {
if (Math.abs(a.year - year) !== Math.abs(b.year - year)) {
return Math.abs(a.year - year) - Math.abs(b.year - year);
} else {
return b.year - a.year;
}
});
}
let bestMatch, closeMatch;
for (const m of sorted) {
m.title = m.title || m.name;
if (m.title.toLowerCase() === title.toLowerCase()) {
bestMatch = bestMatch || m;
console.log("bestMatch", bestMatch);
} else if (m.title.toLowerCase().startsWith(title.toLowerCase())) {
closeMatch = closeMatch || m;
console.log("closeMatch", closeMatch);
}
if (bestMatch && closeMatch) {
break;
}
}
function yearComp(imdb, rt) {
return rt - imdb <= MAX_YEAR_DIFF && imdb - rt < MAX_YEAR_DIFF;
}
if (year && (!bestMatch || !yearComp(year, bestMatch.year))) {
if (closeMatch && yearComp(year, closeMatch.year)) {
bestMatch = closeMatch;
} else if (yearComp(year, sorted[0].year)) {
bestMatch = sorted[0];
}
}
bestMatch = bestMatch || closeMatch || movies[0];
if (bestMatch) {
const id = bestMatch && bestMatch.url.replace(/\/s\d{2}\/?$/, "");
const score = (_a = bestMatch == null ? void 0 : bestMatch.meterScore) != null ? _a : "0";
return {
id,
score
};
} else {
console.log("no match found on rt");
return {};
}
};
var showNotice = ({title = `${$t("\u63D0\u793A")}`, text = ""}) => {
const id = new Date().getTime();
const lastId = $(".easy-notification:last").attr("id");
if (lastId && id - lastId < 800) {
return;
}
const zIndex = parseInt($(".easy-notification:last").css("zIndex")) || 2e3;
let removeTimer = null;
const notificationDom = NOTIFICATION_TEMPLATE.replace("#title#", title).replace("#message#", text).replace("#id#", id).replace("#top#", 16).replace("#zIndex#", zIndex + 1);
$("body").append(notificationDom);
const offsetHeight = $(".easy-notification:last")[0].offsetHeight;
$(".easy-notification:last").prevAll(".easy-notification").each(function() {
const top = parseInt($(this).css("top"));
$(this).css("top", offsetHeight + top + 16 + "px");
});
$(".easy-notification:last").addClass("easy-notification-enter");
$(`#${id}`).find(".notification-close-btn").click(function() {
const offsetHeight2 = $(`#${id}`)[0].offsetHeight;
const nextDom = $(`#${id}`).prevAll(".easy-notification");
$(`#${id}`).remove();
nextDom.each(function() {
const top = parseInt($(this).css("top"));
$(this).css("top", top - offsetHeight2 + "px");
});
clearTimeout(removeTimer);
});
removeTimer = setTimeout(() => {
$(`#${id}`).remove();
clearTimeout(removeTimer);
}, 4e3);
};
var uploadToPtpImg = async (imgArray, isFiles = false) => {
try {
const apiKey = GM_getValue("easy-seed.ptp-img-api-key");
if (!apiKey) {
showNotice({
title: $t("ptpimg\u4E0A\u4F20\u5931\u8D25"),
text: $t("\u8BF7\u5230\u914D\u7F6E\u9762\u677F\u4E2D\u586B\u5165ptpimg\u7684api_key")
});
return;
}
let formData;
const options = {
method: "POST",
responseType: "json"
};
if (isFiles) {
formData = new FormData();
imgArray.forEach((img, index) => {
formData.append(`file-upload[${index}]`, img);
});
formData.append("api_key", apiKey);
} else {
formData = `link-upload=${imgArray.join("\n")}&api_key=${apiKey}`;
options.headers = {
"Content-Type": "application/x-www-form-urlencoded;charset=utf-8"
};
}
options.data = formData;
const data = await fetch("https://ptpimg.me/upload.php", options);
if (!data) {
throw $t("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
}
let imgResultList = [];
if (data && data.length) {
imgResultList = data.map((img) => {
return `https://ptpimg.me/${img.code}.${img.ext}`;
});
return imgResultList;
} else {
throw $t("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
}
} catch (error) {
handleError(error);
}
};
var $t = (key) => {
var _a, _b;
const languageKey = USE_CHINESE ? "zh_CN" : "en_US";
return (_b = (_a = i18n_default[languageKey]) == null ? void 0 : _a[key]) != null ? _b : key;
};
var urlToFile = async (url) => {
var _a, _b;
const filename = (_b = (_a = url.match(/\/([^/]+)$/)) == null ? void 0 : _a[1]) != null ? _b : "filename";
const data = await fetch(url, {
responseType: "blob"
});
const file = new File([data], filename, {type: data.type});
return file;
};
var saveScreenshotsToPtpimg = async (imgArray) => {
try {
const isHdbHost = !!imgArray[0].match(/i\.hdbits\.org/);
const isPtpHost = !!imgArray[0].match(/ptpimg\.me/);
if (isPtpHost) {
throw $t("\u65E0\u9700\u8F6C\u5B58");
} else if (isHdbHost) {
const promiseArray = imgArray.map((item) => {
return urlToFile(item);
});
const fileArray = await Promise.all(promiseArray);
const data = uploadToPtpImg(fileArray, true);
return data;
} else {
const data = await uploadToPtpImg(imgArray);
return data;
}
} catch (error) {
handleError(error);
}
};
function fetch(url, options = {}) {
return new Promise((resolve, reject) => {
GM_xmlhttpRequest(__assign(__assign({
method: "GET",
url,
responseType: "json"
}, options), {
onload: (res) => {
const {statusText, status, response} = res;
if (status !== 200) {
reject(new Error(statusText || status));
} else {
resolve(response);
}
},
ontimeout: () => {
reject(new Error("timeout"));
},
onerror: (error) => {
reject(error);
}
}));
});
}
// src/target/common.js
var getScreenshotsBBCode = (imgArray) => {
return imgArray.map((img) => {
if (img.match(/\[url=.+\]/i)) {
return img;
}
return `[img]${img}[/img]`;
});
};
var getTeamName = (info) => {
var _a, _b, _c;
const teamMatch = info.title.match(/-([^-]+)$/);
let teamName = (_c = (_b = (_a = teamMatch == null ? void 0 : teamMatch[1]) == null ? void 0 : _a.replace(/-/g, "")) == null ? void 0 : _b.split("@")) != null ? _c : "";
if (teamName) {
teamName = teamName.length > 1 ? teamName[1] : teamName[0];
} else {
teamName = "other";
}
return teamName;
};
// src/target/its.js
var its_default = async (info) => {
var _a, _b, _c, _d, _e, _f, _g;
let template = `[center]
[img]$poster$[/img]
[url=$imdbUrl$][img]https://i.ibb.co/KD855ZM/IMDb-Logo-2016.png[/img][/url][size=3]$imdbScore$[/size][*][url=$rtUrl$][img]https://i.ibb.co/BwtmdcV/rottentomatoes-logo.png[/img][/url][size=3]$rtScore$[/size][*][size=3][url=$tmdbUrl$][img]https://i.ibb.co/HhgF1gC/tmdb-logo.png[/img][/url]$tmdbScore$[/size]
[color=DarkOrange][size=2]\u25E2 SYNOPSIS \u25E3[/size][/color]
$synopsis$
[color=DarkOrange][size=2]\u25E2 TRAILER \u25E3[/size][/color]
[youtube]$youtubeUrl$[/youtube]
[color=DarkOrange][size=2]\u25E2 SCREENSHOTS \u25E3[/size][/color]
[box][hide]$SCREENSHOTS$[/hide][/box]
[/center]`;
const collectionMap = {};
$('select[name="collection_id1"] option').each(function() {
const option = $(this);
collectionMap[option.text()] = option.val();
});
const collectionValueArr = [];
const teamName = getTeamName(info);
if (collectionMap[teamName]) {
collectionValueArr.push(collectionMap[teamName]);
}
const {imdbUrl, category, screenshots, comparisons = [], resolution, movieName} = info;
if (!resolution.match(/2160|1080|720/) && category === "movie") {
$('select[name="type"]').val("67");
}
const screenshotsBBCode = getScreenshotsBBCode(screenshots);
template = template.replace("$SCREENSHOTS$", screenshotsBBCode.join("\n"));
const comparisonImgs = comparisons.flatMap((v) => v.imgs);
if (comparisonImgs.length > 0) {
const comparisonImgsBBCode = getScreenshotsBBCode(comparisonImgs);
template = template.replace(/(\[\/center\])$/, `[color=DarkOrange][size=2]\u25E2 COMPARISONS \u25E3[/size][/color]
[box][hide]${comparisonImgsBBCode.join(" ")}[/hide][/box]
$1`);
}
if (category.match(/tv|movie|cartoon|documentary/)) {
$('textarea[name="descr"]').val($t("\u6570\u636E\u52A0\u8F7D\u4E2D..."));
try {
const replaceParams = {
tmdbUrl: "",
tmdbScore: 0,
imdbScore: 0,
imdbUrl,
poster: "",
synopsis: "",
rtUrl: "",
rtScore: 0,
youtubeUrl: ""
};
const {poster = "", imdb_rating_average: imdbRate = 0, description = "", year, aka, directors = [], details = {}} = await getIMDBData(imdbUrl);
let language = details.Language || "";
language = (_c = (_b = (_a = language == null ? void 0 : language.split("|")) == null ? void 0 : _a[0]) == null ? void 0 : _b.trim()) != null ? _c : "";
const director = directors.map((item) => item.name)[0];
if (collectionMap[director]) {
collectionValueArr.push(collectionMap[director]);
}
if (collectionMap[language]) {
collectionValueArr.push(collectionMap[language]);
}
collectionValueArr.forEach((value, index) => {
$(`select[name="collection_id${index + 1}"]`).val(value);
});
replaceParams.poster = poster;
replaceParams.synopsis = description;
replaceParams.imdbScore = imdbRate;
const imdbId = getIMDBIdByUrl(imdbUrl);
const {id: tmdbId, vote_average: tmdbRate} = await getTMDBIdByIMDBId(imdbId, {
append_to_response: "videos"
});
if (tmdbId) {
replaceParams.tmdbUrl = `https://www.themoviedb.org/movie/${tmdbId}`;
replaceParams.tmdbScore = tmdbRate;
const videos = await getTMDBVideos(tmdbId);
const youtubeId = (_f = (_e = (_d = videos.filter((video) => video.site === "YouTube")) == null ? void 0 : _d[0]) == null ? void 0 : _e.key) != null ? _f : "";
if (youtubeId.length > 0) {
replaceParams.youtubeUrl = `https://www.youtube.com/watch?v=${youtubeId}`;
}
}
const searchMovieName = movieName || ((_g = aka.filter((item) => item.country.match(/(World-wide)|UK|USA/))) == null ? void 0 : _g[0].title);
const rtInfo = await getRtIdFromTitle(searchMovieName, !!category.match(/tv/), year);
const {score = 0, id = ""} = rtInfo;
replaceParams.rtScore = `${score}%`;
replaceParams.rtUrl = `https://www.rottentomatoes.com/${id}`;
const ptpImgApiKey = GM_getValue("easy-seed.ptp-img-api-key") || "";
if (ptpImgApiKey) {
const ptpImgPoster = await uploadToPtpImg([poster]);
replaceParams.poster = ptpImgPoster || "";
}
Object.keys(replaceParams).forEach((key) => {
template = template.replace(`$${key}$`, replaceParams[key]);
});
$('textarea[name="descr"]').val(template);
} catch (error) {
$('textarea[name="descr"]').val(error.message);
}
}
};
// src/target/tjupt.js
var tjupt_default = (info) => {
const domTimeout = setTimeout(() => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
if ($("#ename")) {
const {title, description, doubanInfo, category, resolution} = info;
$("#ename").val(title);
const fullDescription = description + doubanInfo;
let area = (_b = (_a = fullDescription.match(/(产\s+地|国\s+家)\s+(.+)/)) == null ? void 0 : _a[2]) != null ? _b : "";
area = area.replace(/\[\/?.+?\]/g, "");
const originalName = (_d = (_c = fullDescription.match(/(片\s+名)\s+(.+)?/)) == null ? void 0 : _c[2]) != null ? _d : "";
const translateName = (_h = (_g = (_f = (_e = fullDescription.match(/(译\s+名)\s+(.+)/)) == null ? void 0 : _e[2]) == null ? void 0 : _f.split("/")) == null ? void 0 : _g[0]) != null ? _h : "";
const castArray = (_l = (_k = (_j = (_i = fullDescription.match(/(主\s+演)\s+([^◎]+)/)) == null ? void 0 : _i[2]) == null ? void 0 : _j.split("\n")) == null ? void 0 : _k.filter((item) => !!item)) != null ? _l : [];
const language = (_n = (_m = fullDescription.match(/(语\s+言)\s+(.+)/)) == null ? void 0 : _m[2]) != null ? _n : "";
const castStr = castArray.map((item) => {
var _a2;
return (_a2 = item.trim().split(/\s+/)) == null ? void 0 : _a2[0];
}).join("/");
if (area) {
if (category === "movie") {
$("#district").val(area.replace(/,/g, "/").replace(/中国/, ""));
} else if (category.match(/tv/)) {
let selector = "";
if (area.match(/大陆/)) {
selector = "#specificcat1";
} else if (area.match(/台|港/)) {
selector = "#specificcat2";
} else if (area.match(/美国/)) {
selector = "#specificcat3";
} else if (area.match(/英国/)) {
selector = "#specificcat7";
} else if (area.match(/日本/)) {
selector = "#specificcat4";
} else if (area.match(/韩国/)) {
selector = "#specificcat5";
} else {
selector = "#specificcat6";
}
$(selector).attr("checked", true);
getcheckboxvalue("specificcat");
} else if (category.match(/variety/)) {
const districtMap = {
CN: "#district1",
HK: "#district2",
TW: "#district2",
JP: "#district4",
KR: "#district4",
US: "#district3",
EU: "#district3",
OT: "#district5"
};
$(districtMap[info.area]).attr("checked", true);
getcheckboxvalue("district");
}
}
if ($("#format")) {
if (category.match(/variety/)) {
if (resolution.match(/720/)) {
$("#format3").attr("checked", true);
} else if (resolution.match(/1080/)) {
$("#format5").attr("checked", true);
}
getcheckboxvalue("format");
} else if (category.match(/documentary/)) {
if (resolution.match(/720/)) {
$("#format2").attr("checked", true);
} else if (resolution.match(/1080/)) {
$("#format1").attr("checked", true);
}
getradiovalue("format");
}
}
if ($("#language")) {
let selector = "";
if (language) {
if (language.match(/汉语/)) {
selector = "#language1";
} else if (language.match(/粤/)) {
selector = "#language2";
} else if (language.match(/英语/)) {
selector = "#language3";
} else if (language.match(/日语/)) {
selector = "#language4";
} else if (language.match(/韩语/)) {
selector = "#language5";
}
$(selector).attr("checked", true);
getcheckboxvalue("language");
}
}
if (category.match(/variety/)) {
$("#tvshowsguest").val(castStr);
}
let chineseName = originalName;
if (!originalName.match(/[\u4e00-\u9fa5]+/)) {
chineseName = translateName.match(/[\u4e00-\u9fa5]+/) ? translateName : "";
}
$("#cname").val(chineseName);
clearTimeout(domTimeout);
}
}, 2e3);
};
// src/target/hdr.js
var hdr_default = (info) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
const {description, doubanInfo} = info;
const fullDescription = description + doubanInfo;
const imdbRank = (_b = (_a = fullDescription.match(/IMDb评分\s+(\d(\.\d)?)/i)) == null ? void 0 : _a[1]) != null ? _b : "";
$("#upload-imdb").val(imdbRank);
const originalName = (_d = (_c = fullDescription.match(/(片\s+名)\s+(.+)?/)) == null ? void 0 : _c[2]) != null ? _d : "";
const translateName = (_h = (_g = (_f = (_e = fullDescription.match(/(译\s+名)\s+(.+)/)) == null ? void 0 : _e[2]) == null ? void 0 : _f.split("/")) == null ? void 0 : _g[0]) != null ? _h : "";
const summary = (_l = (_k = (_j = (_i = fullDescription.match(/(简\s+介)\s+([^[◎]+)/)) == null ? void 0 : _i[2]) == null ? void 0 : _j.split("/")) == null ? void 0 : _k[0]) != null ? _l : "";
let chineseName = originalName;
if (!originalName.match(/[\u4e00-\u9fa5]+/)) {
chineseName = translateName.match(/[\u4e00-\u9fa5]+/) ? translateName : originalName;
}
$("#title_chs").val(chineseName);
$("#upload_introduction").val(summary);
};
// src/target/bib.js
var bib_default = (info) => {
const {year, pager, translator, author, publisher, ISBN, book_intro} = info.doubanBookInfo;
$("#AuthorsField").val(author.join(","));
$("#PublishersField").val(publisher);
$("#IsbnField").val(ISBN);
$("#YearField").val(year);
$("#PagesField").val(pager);
$("#LanguageField").val("17");
$("#inputFileID").replaceWith('');
$("#TranslatorsField").val(translator.join(","));
$("#DescriptionField").val(book_intro);
const event = new Event("change");
document.getElementById("DescriptionField").dispatchEvent(event);
};
// src/target/bB.js
var bB_default = (info) => {
const {
title,
category,
imdbUrl,
formDom,
tags,
source,
screenshots,
mediaInfo,
videoType
} = info;
const {category: categoryConfig} = CURRENT_SITE_INFO;
$(categoryConfig.selector).attr("onchange", "").val(categoryConfig.map[category]);
$("#dynamic_form").html(formDom);
const isBluray = videoType.match(/bluray/i);
const getInfoFunc = isBluray ? getInfoFromBDInfo : getInfoFromMediaInfo;
const {format = "", subtitles = []} = getInfoFunc(mediaInfo);
info.source = getSource(source, title);
info.format = getFormat(format, videoType);
const tvTitleArray = [];
["source", "videoCodec", "audioCodec", "format", "resolution", "mediaInfo"].forEach((key) => {
const {selector = "", map} = CURRENT_SITE_INFO[key];
if (map) {
const mapValue = map[info[key]];
$(selector).val(mapValue);
tvTitleArray.push(mapValue);
} else {
$(selector).val(info[key]);
}
});
if (imdbUrl) {
getIMDBData(imdbUrl).then((imdbData) => {
var _a, _b, _c;
let {name, year, genre, directors = [], actors = [], description, poster, details, aka} = imdbData;
let movieTitle = name;
const akaName = details["Also Known As"];
const originalTitle = (_b = (_a = aka.filter((item) => {
return item.country === "(original title)";
})) == null ? void 0 : _a[0]) == null ? void 0 : _b.title;
if (akaName && originalTitle !== movieTitle) {
movieTitle += ` AKA ${akaName}`;
}
if (category.match(/tv/i)) {
let seasonEpisode = (_c = title.match(/S\d+(E\d+)?/i)) == null ? void 0 : _c[0];
if (seasonEpisode) {
seasonEpisode = seasonEpisode.toUpperCase().replace(/S0?(\d+)$/, "Season $1");
movieTitle += ` ${seasonEpisode} `;
}
movieTitle += `[${tvTitleArray.join(" / ")}]`;
}
$(CURRENT_SITE_INFO.name.selector).val(movieTitle);
$(CURRENT_SITE_INFO.year.selector).val(year);
if (Array.isArray(genre)) {
genre = genre.join(",");
}
const castTag = [...directors, ...actors].map((item) => {
return item.name.replace(/\s/g, ".").toLowerCase();
});
$("#tags").val(`${genre},${castTag.join(",")}`);
$("#desc").val(`${imdbUrl}
${description}`);
uploadToPtpImg([poster]).then((img) => {
$(CURRENT_SITE_INFO.poster.selector).val(img[0]);
}).catch((error) => {
showNotice({text: error.message || $t("\u5C01\u9762\u4E0A\u4F20\u5931\u8D25")});
});
}).catch((error) => {
console.log(error);
});
}
if (category !== "movie") {
return;
}
const releaseInfo = [];
if (videoType === "remux") {
releaseInfo.push("REMUX");
}
if (title.match(/Commentary/i)) {
releaseInfo.push("w. Commentary");
}
if (subtitles.length > 0) {
releaseInfo.push("w. Subtitles");
}
if (tags.hdr) {
releaseInfo.push("HDR");
}
$('input[name="remaster_title"]').val(releaseInfo.join(" / "));
screenshots.forEach((img, index) => {
index++;
let inputDom = $(`input[name='screenshot${index}']`);
if (inputDom[0]) {
inputDom.val(img);
} else if (index <= 4 && !inputDom[0]) {
add_screenshot();
inputDom = $(`input[name='screenshot${index}']`);
inputDom.val(img);
}
});
};
var getSource = (source, title) => {
if (title.match(/webrip/i)) {
return "webrip";
} else if (title.match(/dvd5/i)) {
return "dvd5";
} else if (title.match(/dvd9/i)) {
return "dvd9";
} else if (title.match(/3D/) && source.match(/bluray/i)) {
return "bluray3d";
}
return source;
};
var getFormat = (format, videoType) => {
if (videoType.match(/bluray/)) {
format = "m2ts";
} else if (videoType.match(/dvd/)) {
format = "vob";
}
return format || "mkv";
};
// src/target/ptp.js
var ptp_default = (info) => {
const {
title,
imdbUrl,
tags,
size,
videoCodec,
videoType,
resolution
} = info;
const groupId = getUrlParam("groupid");
if (!groupId) {
$(CURRENT_SITE_INFO.imdb.selector).val(imdbUrl || 0);
AutoFill();
}
info.resolution = getResolution2(resolution, videoType, title);
info.videoCodec = getVideoCodec(videoCodec, videoType, size);
["category", "source", "videoCodec", "resolution"].forEach((key) => {
const {selector = "", map} = CURRENT_SITE_INFO[key];
if (map) {
const mapValue = map[info[key]];
$(selector).val(mapValue);
} else {
$(selector).val(info[key]);
}
});
const description = getDescription(info);
$(CURRENT_SITE_INFO.description.selector).val(description);
const editionInfo = getEditionInfo(videoType, tags);
if (editionInfo.length > 0) {
$("#remaster").attr("checked", true);
Remaster();
editionInfo.forEach((edition) => {
const event = new Event("click");
$(`#remaster_tags a:contains("${edition}")`)[0].dispatchEvent(event);
});
}
};
var getEditionInfo = (videoType, tags) => {
const editionInfo = [];
if (videoType === "remux") {
editionInfo.push("Remux");
}
if (tags.hdr) {
editionInfo.push("HDR10");
}
if (tags.hdr10_plus) {
editionInfo.push("HDR10+");
}
if (tags.dolby_vision) {
editionInfo.push("Dolby Vision");
}
if (tags.dolby_atmos) {
editionInfo.push("Dolby Atmos");
}
if (tags.dts_x) {
editionInfo.push("DTS:X");
}
return editionInfo;
};
var getVideoCodec = (videoCodec, videoType, size) => {
if (videoType === "bluray") {
return getBDType(size);
} else if (videoType === "dvd") {
const GBSize = size / 1e9;
if (GBSize < 5) {
return "DVD5";
} else {
return "DVD9";
}
}
return videoCodec;
};
var getResolution2 = (resolution, videoType, title) => {
if (videoType === "DVD" && title.match(/NTSC/i)) {
return "NTSC";
} else if (videoType === "DVD" && title.match(/PAL/i)) {
return "PAL";
}
return resolution;
};
var getDescription = (info) => {
const {description, mediaInfo} = info;
let filterDescription = "";
if (mediaInfo) {
filterDescription += `[mediainfo]${mediaInfo}[/mediainfo]`;
}
let screenshots = getScreenshotsFromBBCode(description);
screenshots = screenshots.map((item) => `[img]${item}[/img]`);
return filterDescription + "\n" + screenshots.join("\n");
};
// src/target/ptn.js
var ptn_default = (info) => {
const {resolution, videoType, source} = info;
let format = "";
const formatMap = {
remux: "Remux",
web: "WebRip",
dvd: "DVDR",
dvdrip: "DVDRip",
"720p": "720P",
"1080p": "1080P",
"2160p": "2160P"
};
if (videoType.match(/bluray/)) {
format = "BluRay";
} else if (videoType === "encode" && source === "bluray") {
format = formatMap[resolution];
} else {
format = formatMap[videoType] || "";
}
$("#format").val(format);
};
// src/target/gpw.js
var gpw_default = async (info) => {
const site = CURRENT_SITE_INFO;
const isUploadSuccess = !$("#mediainfo")[0];
if (isUploadSuccess) {
return;
}
transformInfo(info);
const isAddFormat = getUrlParam("groupid");
if (!isAddFormat) {
$(site.imdb.selector).val(info.imdbUrl || 0);
$("#imdb_button").click();
$("#upload .collapse").show();
}
$(site.category.selector).val(site.category.map[info.category]);
fillEditionInfo(info);
fillMediaInfo(info);
if (!$(site.source.selector).val()) {
handleNoAutoCheck(info);
}
fillScene(info);
fillProcessing(info);
fillDescription(info);
document.querySelector("#description-container .bbcode-preview-button").click();
};
function buildDescription(info) {
let description = "";
if (info.comparisons.length > 0) {
for (const comparison of info.comparisons) {
description += `${comparison.reason}[comparison=${comparison.title}]
${comparison.imgs.join("\n")}
[/comparison]
`;
}
}
if (info.screenshots.length > 0) {
description += info.screenshots.map((v) => `[img]${v}[/img]`).join("\n") + "\n\n";
}
return description.trim();
}
function fillEditionInfo(info) {
const site = CURRENT_SITE_INFO;
const editionTags = Object.keys(info.tags).map((tag) => info.tags[tag] && site.targetInfo.editionTags[tag]).filter(Boolean);
let otherTag;
if (Object.keys(info.otherTags).length > 0) {
otherTag = Object.keys(info.otherTags).join(", ");
}
if (editionTags.length > 0 || otherTag) {
$("#movie_edition_information").click();
}
if (editionTags.length > 0) {
for (const tag of editionTags) {
$(`#movie_remaster_tags a[onclick*="'${tag}'"]`).click();
}
}
if (otherTag) {
$("#other-button").click();
$("[name=remaster_custom_title]").val(otherTag);
}
}
function buildPTPDescription(info) {
let text = info.originalDescription;
text = text.replaceAll("http://ptpimg.me", "https://ptpimg.me");
for (const mediainfo of info.mediaInfos) {
text = text.replace(mediainfo, "");
}
text = text.replaceAll(/\[(mediainfo|bdinfo)\][\s\S]*?\[\/(mediainfo|bdinfo)\]/gi, "");
text = text.replaceAll(/^(?!\[img\])https:\/\/ptpimg.me.*?png(?!\[\/img\])$/gim, (imgUrl) => {
return `[img]${imgUrl}[/img]`;
});
text = text.replaceAll(/\[comparison.*\][\s\S]*\[\/comparison\]/gi, (comparisonText) => {
return comparisonText.replaceAll("[img]", "").replaceAll("[/img]", "").split("https://ptpimg.me").join("\nhttps://ptpimg.me").replaceAll(/\s*\n\s*/g, "\n");
});
text = text.replaceAll(/\[hide(.*)?\]\s*\[url=https:\/\/ptpimg.me.*?png\]\[img\][\s\S]*?\[\/hide\]/gi, (imgText) => {
var _a;
const imgs = [];
for (const urlMatch of imgText.matchAll(/\[url=(.*?)\]/ig)) {
imgs.push(urlMatch[1]);
}
const rawTitle = ((_a = imgText.match(/^\[hide=(.*?)\]/)) == null ? void 0 : _a[1]) || "";
const comparisonTitles = rawTitle.trim().split(/\||\/|,|vs\.?| - /i).map((v) => v.trim());
if (comparisonTitles.length >= 2) {
return `[comparison=${comparisonTitles.join(", ")}]
${imgs.join("\n")}
[/comparison]
`;
} else {
const hideTitle = rawTitle ? `=${rawTitle}` : "";
return `[hide${hideTitle}]
[img]${imgs.join("[/img]\n[img]")}[/img]
[/hide]
`;
}
});
text = text + "\n\n";
text = text.replaceAll(/\[url=https:\/\/ptpimg.me.*?png\]\[img\][\s\S]*?\n\n/gi, (imgText) => {
const imgs = [];
for (const urlMatch of imgText.matchAll(/\[url=(.*?)\]/ig)) {
imgs.push(urlMatch[1]);
}
return `[hide]
[img]${imgs.join("[/img]\n[img]")}[/img]
[/hide]
`;
});
text = text.replaceAll(/\n\s*\n/g, "\n\n");
return text.trim();
}
function fillMediaInfo(info) {
for (let i = 1; i < info.mediaInfos.length; i++) {
$("#add-mediainfo")[0].click();
}
const textareas = Array.from($('[name="mediainfo[]"]'));
for (const [index, textarea] of textareas.entries()) {
textarea.value = info.mediaInfos[index];
textarea.dispatchEvent(new Event("input"));
}
;
$('[name="mediainfo[]"]')[0].dispatchEvent(new Event("change"));
}
function fillScene(info) {
if (info.tags.scene) {
$("#scene").prop("checked", true);
}
}
function fillProcessing(info) {
let {videoType, size, source, tags} = info;
if (source.match(/bluray|hddvd|dvd/)) {
if (tags.diy) {
videoType = "DIY";
}
const videoTypeConfig = CURRENT_SITE_INFO.videoType;
const {selector, map} = videoTypeConfig;
$(selector).val(map[videoType]);
$(selector)[0].dispatchEvent(new Event("change"));
if (map[videoType] === "Untouched") {
const bdType = getBDType(size);
$('select[name="processing_other"]').val(bdType);
}
$(selector)[0].dispatchEvent(new Event("input"));
}
}
function handleNoAutoCheck(info) {
const {
mediaInfo,
videoType
} = info;
const isBluray = videoType.match(/bluray/i);
const getInfoFunc = isBluray ? getInfoFromBDInfo : getInfoFromMediaInfo;
const {format = "", subtitles = []} = getInfoFunc(mediaInfo);
info.format = getFormat2(format, videoType);
["source", "videoCodec", "format", "resolution"].forEach((key) => {
const {selector = "", map} = CURRENT_SITE_INFO[key];
if (map) {
const mapValue = map[info[key]];
$(selector).val(mapValue);
if (key === "videoCodec" && mapValue === "Other") {
document.querySelector(selector).dispatchEvent(new Event("change"));
$('input[name="codec_other"]').val(info[key].toUpperCase());
}
} else {
$(selector).val(info[key]);
}
});
if (subtitles.length > 0) {
$("#mixed_subtitles").attr("checked", true);
$('input[name="subtitles[]"][type="checkbox"]').each(function() {
const language = $(this).attr("id").replace(/^\S|(_\S)/g, (letter) => letter.replace("_", " ").toUpperCase());
if (subtitles.includes(language)) {
$(this).attr("checked", true);
}
});
const event = new Event("change");
document.querySelector("#mixed_subtitles").dispatchEvent(event);
const chineseLanguages = subtitles.filter((item) => item.match(/Chinese|Traditional|Simplified/i));
if (chineseLanguages.length === 1 && chineseLanguages[0] === "Chinese") {
const selector = chineseLanguages[0].match(/Traditional/i) ? "#chinese_traditional" : "#chinese_simplified";
$(selector).attr("checked", true);
} else if (chineseLanguages.length >= 2) {
$("#chinese_traditional,#chinese_simplified").attr("checked", true);
}
}
}
var getFormat2 = (format, videoType) => {
if (videoType.match(/bluray/) && format !== "iso") {
format = "m2ts";
} else if (videoType.match(/dvd/)) {
format = "vob";
}
return format || "mkv";
};
function transformInfo(info) {
if (info.mediaInfos.length === 0 && info.mediaInfo) {
info.mediaInfos = [info.mediaInfo];
}
if (["encode", "remux"].includes(info.videoType)) {
const newMediaInfos = [];
for (const mediaInfo of info.mediaInfos) {
if (mediaInfo.match(/Disc Title|Disc Label/i)) {
continue;
}
newMediaInfos.push(mediaInfo);
}
info.mediaInfos = newMediaInfos;
}
}
function fillDescription(info) {
const site = CURRENT_SITE_INFO;
let description;
if (info.sourceSite === "PTP") {
description = buildPTPDescription(info);
} else if (info.sourceSite === "BeyondHD") {
description = info.originalDescription;
} else {
description = buildDescription(info);
}
$(site.description.selector).val(description);
$(site.description.selector)[0].dispatchEvent(new Event("input"));
}
// src/target/npubits.js
var npubits_default = (info) => {
var _a, _b;
let {title, year, movieName, category, doubanInfo, description, subtitle} = info;
$(CURRENT_SITE_INFO.subtitle.selector).val(subtitle);
if (doubanInfo) {
description = doubanInfo + "\n" + description;
}
$(CURRENT_SITE_INFO.description.selector).val(description);
$("#torrent_name_checkbox").attr("checked", true);
$(CURRENT_SITE_INFO.name.selector).val(title);
$(CURRENT_SITE_INFO.category.selector).val(CURRENT_SITE_INFO.category.map[category]);
$(CURRENT_SITE_INFO.category.selector)[0].dispatchEvent(new Event("change"));
if (category.match(/tv/)) {
const districtMap = {
CN: "23",
HK: "24",
TW: "24",
JP: "26",
KR: "27",
US: "25",
EU: "65",
OT: "63"
};
$(CURRENT_SITE_INFO.area.selector).val(districtMap[info.area]);
} else if (category.match(/movie/)) {
$(CURRENT_SITE_INFO.area.selector).val(CURRENT_SITE_INFO.area.map[info.area]);
}
$(CURRENT_SITE_INFO.area.selector)[0].dispatchEvent(new Event("change"));
["videoCodec", "videoType", "resolution", "team"].forEach((key) => {
fill_field(CURRENT_SITE_INFO[key].selector, CURRENT_SITE_INFO[key].map[info[key]]);
});
$("#torrent_name_field0").val(movieName);
if (category === "movie") {
$("#torrent_name_field1").val(year);
} else if (category.match(/tv/)) {
const episode = (_b = (_a = title.match(/S\d+(E\d+)?/i)) == null ? void 0 : _a[0]) != null ? _b : "";
$("#torrent_name_field1").val(episode);
}
$('input[name="uplver"]').attr("checked", true);
};
// src/target/byr.js
var byr_default = (info) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
const {title, description, doubanInfo, category, videoType, mediaInfo, subtitle, imdbUrl, doubanUrl} = info;
$(CURRENT_SITE_INFO.subtitle.selector).val(subtitle);
$(CURRENT_SITE_INFO.imdb.selector).val(imdbUrl);
$(CURRENT_SITE_INFO.douban.selector).val(doubanUrl);
CKEDITOR.on("instanceReady", () => {
CKEDITOR.instances.descr.setData(bbcode2Html(description));
});
$("#ename0day").val(title);
const fullDescription = description + doubanInfo;
let area = (_b = (_a = fullDescription.match(/(产\s+地|国\s+家)\s+(.+)/)) == null ? void 0 : _a[2]) != null ? _b : "";
area = area.replace(/\[\/?.+?\]/g, "");
const originalName = (_d = (_c = fullDescription.match(/(片\s+名)\s+(.+)?/)) == null ? void 0 : _c[2]) != null ? _d : "";
const translateName = (_h = (_g = (_f = (_e = fullDescription.match(/(译\s+名)\s+(.+)/)) == null ? void 0 : _e[2]) == null ? void 0 : _f.split("/")) == null ? void 0 : _g[0]) != null ? _h : "";
let movieType = (_j = (_i = fullDescription.match(/(类\s+别)\s+(.+)/)) == null ? void 0 : _i[2]) != null ? _j : "";
const language = (_l = (_k = fullDescription.match(/(语\s+言)\s+(.+)/)) == null ? void 0 : _k[2]) != null ? _l : "";
let chineseName = originalName;
if (!originalName.match(/[\u4e00-\u9fa5]+/)) {
chineseName = translateName.match(/[\u4e00-\u9fa5]+/) ? translateName : "";
}
if (category.match(/movie/)) {
let selector = "";
if (area.match(/华语|台|港/)) {
selector = "\u534E\u8BED";
} else if (area.match(/日本|韩国|泰国/)) {
selector = "\u4E9A\u6D32";
} else if (area.match(/美国|加拿大/)) {
selector = "\u5317\u7F8E";
} else if (area.match(/欧|英|法|德|俄|意|苏联|EU/)) {
selector = "\u6B27\u6D32";
} else {
selector = "\u5176\u4ED6";
}
const typeMap = {
\u534E\u8BED: "11",
\u6B27\u6D32: "12",
\u5317\u7F8E: "13",
\u4E9A\u6D32: "14",
\u5176\u4ED6: "1"
};
$('select[name="second_type"]').val(typeMap[selector]);
$('select[name="second_type"]')[0].dispatchEvent(new Event("change"));
movieType = movieType.split(/\s\//);
$("#movie_type").val(movieType.join("/"));
fillField(selector, category === "movie" ? "movie_country" : "show_country");
$("#movie_cname").val(chineseName);
} else if (category.match(/tv/)) {
let selector = "movie_country";
if (area.match(/大陆/)) {
selector = "\u5927\u9646";
} else if (area.match(/台|港/)) {
selector = "\u6E2F\u53F0";
} else if (area.match(/美国|欧|英|法|德|俄|意|苏联|EU/)) {
selector = "\u6B27\u7F8E";
} else if (area.match(/日本|韩国/)) {
selector = "\u65E5\u97E9";
} else {
selector = "\u5176\u4ED6";
}
const typeMap = {
\u5927\u9646: "15",
\u6E2F\u53F0: "16",
\u6B27\u7F8E: "17",
\u65E5\u97E9: "18",
\u5176\u4ED6: "2"
};
$('select[name="second_type"]').val(typeMap[selector]);
$('select[name="second_type"]')[0].dispatchEvent(new Event("change"));
fillField(selector, "tv_type");
$("#tv_ename").val(title);
$("#cname").val(chineseName);
const episode = (_n = (_m = title.match(/S\d+(E\d+)?/i)) == null ? void 0 : _m[0]) != null ? _n : "";
$("#tv_season").val(episode);
const isBluray = videoType.match(/bluray/i);
const getInfoFunc = isBluray ? getInfoFromBDInfo : getInfoFromMediaInfo;
const {format} = getInfoFunc(mediaInfo);
fillField(format.toUpperCase() || "MKV", "tv_filetype");
} else if (category.match(/variety/)) {
let selector = "";
if (area.match(/大陆/)) {
selector = "\u5927\u9646";
} else if (area.match(/台|港/)) {
selector = "\u6E2F\u53F0";
} else if (area.match(/美国|欧|英|法|德|俄|意|苏联|EU/)) {
selector = "\u6B27\u7F8E";
} else if (area.match(/日本|韩国/)) {
selector = "\u65E5\u97E9";
} else {
selector = "\u5176\u4ED6";
}
const typeMap = {
\u5927\u9646: "27",
\u6E2F\u53F0: "29",
\u6B27\u7F8E: "30",
\u65E5\u97E9: "28",
\u5176\u4ED6: "5"
};
$('select[name="second_type"]').val(typeMap[selector]);
$('select[name="second_type"]')[0].dispatchEvent(new Event("change"));
fillField(selector, "show_country");
$("#show_cname").val(chineseName);
$("#show_ename").val(title);
let languageVal = "";
if (language.match(/汉语/)) {
languageVal = "\u56FD\u8BED";
} else if (language.match(/粤/)) {
languageVal = "\u7CA4\u8BED";
} else if (language.match(/英语/)) {
languageVal = "\u82F1\u8BED";
} else if (language.match(/日语/)) {
languageVal = "\u65E5\u8BED";
} else if (language.match(/韩语/)) {
languageVal = "\u97E9\u8BED";
}
fillField(languageVal, "show_language");
}
function bbcode2Html(bbcode) {
let html = bbcode.replace(/\[\*\]([^\n]+)/ig, "$1");
html = html.replace(/(\r\n)|\n/g, "
");
html = html.replace(/\[(quote|hide=.+?)\]/ig, "