// ==UserScript== // @name easy-seed PT一键转种 // @namespace https://github.com/techmovie/easy-seed // @version 1.3.0 // @description easy seeding for different trackers // @author birdplane // @require https://cdn.staticfile.org/jquery/1.7.1/jquery.min.js // @match https://passthepopcorn.me/torrents.php?id=* // @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=* // @grant GM_addStyle // @grant GM_getValue // @grant GM_setValue // @grant GM_openInTab // @grant GM_xmlhttpRequest // @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" } }, 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" } } }, "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" } }, 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: "#vue+.panel 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", 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" } } }, BTN: { url: "https://broadcasthe.net", host: "broadcasthe.net", siteType: "BTN", icon: '', asSource: false, asTarget: false, 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" } }, 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: { chineseAudio: 'input[type="checkbox"][name="span[]"][value="5"]', chineseSubtitle: '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" } } }, 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" } } }, 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" } }, 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: "#vue+.panel 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: "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" } }, 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: { chineseAudio: 'input[name="cnlang"]', chineseSubtitle: '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" } } }, 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" } } }, 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" } }, 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: { chineseAudio: 'input[type="checkbox"][name="tag[cn]"]', chineseSubtitle: '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" } }, 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" } }, 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" } }, 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: { chineseAudio: "#tag_gy", DIY: "#tag_diy", chineseSubtitle: "#tag_zz", cantoneseAudio: "#tag_yy", HDR: "#tag_hdr10", "HDR10+": "#tag_hdrm", DolbyVision: "#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" } } }, 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" } }, 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: { chineseAudio: "#tag_gy", DIY: "#tag_diy", cantoneseAudio: "#tag_yy", chineseSubtitle: "#tag_zz", HDR: "#tag_hdr10", "HDR10+": "#tag_hdrm", DolbyVision: "#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" } } }, HDPOST: { url: "https://pt.hdpost.top", host: "hdpost.top", 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"]' }, 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: { chineseAudio: 'input[name="is_mandrain"]', cantoneseAudio: 'input[name="is_cantonese"]', DIY: 'input[name="is_diyed"]', chineseSubtitle: '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" } }, 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" } } }, 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+": 'input[name="HDR10Plus"]', DolbyVision: '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" ] } } }, 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" } } }, 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: "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_url"]' }, tags: { chineseAudio: 'input[name="tag_gy"]', DIY: "#tagDIY", cantoneseAudio: 'input[name="tag_yy"]', chineseSubtitle: 'input[name="tag_zz"]', CC: '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" } }, name: { selector: "#name" }, subtitle: { selector: 'input[name="small_descr"]' }, description: { selector: "#descr" }, imdb: { selector: 'input[name="url"][type="text"]' }, tags: { chineseAudio: "#l_dub", DIY: "#l_diy", chineseSubtitle: "#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" } } }, 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" } } }, 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" } }, 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: { chineseAudio: "#tagGY", DIY: "#tagDIY", cantoneseAudio: "#tag_yy", chineseSubtitle: "#tagZZ", HDR: "#tagHDR10", "HDR10+": "#tagHDR10P", DolbyVision: "#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" } }, 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: { chineseAudio: "#tag_gy", DIY: "#tag_diy", cantoneseAudio: "#tag_yy", chineseSubtitle: "#tag_zz", HDR: "#tag_hdr10", "HDR10+": "#tag_hdrm", DolbyVision: "#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" } } }, PTP: { url: "https://passthepopcorn.me", host: "passthepopcorn.me", siteType: "gazelle", icon: ' ', asSource: true, asTarget: false, needDoubanInfo: true, uploadPath: "/upload.php", search: { path: "/torrents.php", params: { action: "advanced", searchstr: "{imdb}" } }, seedDomSelector: "" }, 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" } }, 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: { chineseSubtitle: '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" } }, 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: { chineseAudio: "#guoyu", DIY: "#diy", cantoneseAudio: "#yueyu", chineseSubtitle: "#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" } } }, SSD: { url: "https://springsunday.net", host: "springsunday.net", siteType: "NexusPHP", icon: ' ', asSource: true, asTarget: true, uploadPath: "/upload.new.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" } }, 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" } }, 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" } } }, 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" } }, 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" } }, 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" } }, 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" } }, 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: "" } } }, 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+": 'input[name="HDR10Plus"]', DolbyVision: '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" } } }, \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: "", year: "", category: "", videoType: "", format: "", source: "", videoCodec: "", audioCodec: "", resolution: "", area: "", doubanUrl: "", doubanInfo: "", imdbUrl: "", tags: { DIY: false, chineseAudio: false, cantoneseAudio: false, chineseSubtitle: false, atoms: false, dtsx: false, HDR: false, DolbyVision: false }, mediaInfo: "", screenshots: [], comparisonImgs: [], movieAkaName: "", movieName: "", sourceSite: "", sourceSiteType: "", size: "", isForbidden: false, poster: "" }; var DOUBAN_SEARCH_API = "https://omit.mkrobot.org/movie/infos"; var DOUBAN_SUGGEST_API = "https://movie.douban.com/j/subject_suggest"; 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 = `

#title#

#message#

`; // 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", \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 group 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" }; 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", \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" }; 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 getDoubanInfo = (doubanUrl) => { return new Promise((resolve, reject) => { try { if (doubanUrl) { GM_xmlhttpRequest({ method: "GET", url: `${PT_GEN_API}?url=${doubanUrl}`, onload(res) { const data = JSON.parse(res.responseText); if (data && data.success) { resolve(data); } else { if (doubanUrl.match(/\/book/)) { reject(new Error(data.error)); } else { getAnotherDoubanInfo(doubanUrl).then((res2) => { resolve(res2); }).catch((error) => { reject(new Error(error.message)); }); } } } }); } else { reject(new Error($t("\u8C46\u74E3\u94FE\u63A5\u83B7\u53D6\u5931\u8D25"))); } } catch (error) { console.log(error); reject(new Error(error.message)); } }); }; var getAnotherDoubanInfo = (doubanUrl) => { return new Promise((resolve, reject) => { var _a, _b; try { if (doubanUrl) { const doubanId = (_b = (_a = doubanUrl.match(/subject\/(\d+)/)) == null ? void 0 : _a[1]) != null ? _b : ""; if (!doubanId) { reject(new Error($t("\u8C46\u74E3ID\u83B7\u53D6\u5931\u8D25"))); } GM_xmlhttpRequest({ method: "GET", url: `https://movie.querydata.org/api?id=${doubanId}`, onload(res) { const data = JSON.parse(res.responseText); if (data && data.id) { resolve(formatDoubanInfo(data)); } else { reject(new Error(data.message || $t("\u83B7\u53D6\u8C46\u74E3\u4FE1\u606F\u5931\u8D25"))); } } }); } else { reject(new Error($t("\u8C46\u74E3\u94FE\u63A5\u83B7\u53D6\u5931\u8D25"))); } } catch (error) { reject(new Error(error.message)); } }); }; var formatDoubanInfo = (data) => { var _a, _b; 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: (_b = dateReleased == null ? void 0 : dateReleased.match(/\d+-\d+-\d+/)[0]) != null ? _b : "", region: info[0].country, genre: chineseInfo.genre, 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 }; 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} = formatData; 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} ` : ""; 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} ` : ""; descr += language ? `\u25CE\u8BED\u3000\u3000\u8A00\u3000${language} ` : ""; descr += playdate ? `\u25CE\u4E0A\u6620\u65E5\u671F\u3000${playdate} ` : ""; 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 += introduction ? ` \u25CE\u7B80\u3000\u3000\u4ECB \u3000\u3000${introduction.replace(/\n/g, "\n" + "\u3000".repeat(2))} ` : ""; formatData.format = descr.trim(); return formatData; }; var getDoubanLinkByIMDB = (imdbUrl, movieName) => { return new Promise((resolve, reject) => { try { if (!imdbUrl) { throw new Error($t("\u7F3A\u5C11IMDB\u4FE1\u606F")); } const doubanUrl = " https://movie.douban.com/subject/"; const imdbId = getIMDBIdByUrl(imdbUrl); if (imdbId) { GM_xmlhttpRequest({ method: "GET", url: `${DOUBAN_SEARCH_API}/${imdbId}`, onload(res) { const data = JSON.parse(res.responseText); if (data && data.data) { resolve(doubanUrl + data.data.id); } else { getDoubanLinkBySuggest(imdbId).then((res2) => { resolve(doubanUrl + res2); }).catch((error) => { reject(new Error(error.message || $t("\u83B7\u53D6\u5931\u8D25"))); }); } } }); } } catch (error) { reject(new Error(error.message)); } }); }; var getDoubanLinkBySuggest = (imdbId) => { return new Promise((resolve, reject) => { GM_xmlhttpRequest({ method: "GET", url: `${DOUBAN_SUGGEST_API}?q=${imdbId}`, onload(res) { const data = JSON.parse(res.responseText); if (data.length > 0) { const doubanId = data[0].id; resolve(doubanId); } else { reject(new Error($t("\u8C46\u74E3ID\u83B7\u53D6\u5931\u8D25"))); } } }); }); }; var getIMDBData = (imdbUrl) => { return new Promise((resolve, reject) => { try { if (!imdbUrl) { throw new Error("$t(\u7F3A\u5C11IMDB\u4FE1\u606F)"); } GM_xmlhttpRequest({ method: "GET", url: `${PT_GEN_API}?url=${imdbUrl}`, onload(res) { const data = JSON.parse(res.responseText); if (data && data.success) { resolve(data); } else { reject(data.error || "$t(\u8BF7\u6C42\u5931\u8D25)"); } }, onerror(res) { console.log(res); } }); } catch (error) { reject(new Error(error.message)); } }); }; var transferImgs = (screenshots) => { return new Promise((resolve, reject) => { const params = encodeURI(`imgs=${screenshots}&content_type=1&max_th_size=300`); try { GM_xmlhttpRequest({ url: "https://pixhost.to/remote/", method: "POST", headers: { Accept: "application/json", "Content-Type": "application/x-www-form-urlencoded;charset=utf-8" }, data: params, onload(res) { const data = res.responseText.match(/(upload_results = )({.*})(;)/); if (!data) { reject(new Error($t("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"))); } let imgResultList = []; if (data && data.length) { imgResultList = JSON.parse(data[2]).images; if (imgResultList.length < 1) { throw new Error($t("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")); } resolve(imgResultList); } else { throw new Error($t("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")); } } }); } catch (error) { reject(error.message); } }); }; 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 (title.match(/(s0?\d{1,2})?e(p)?\d{1,2}/i) || 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(/atoms/i)) { return "atoms"; } 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|CS\.png|GDJT|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 allImages.map((item) => { var _a, _b, _c; let imgUrl = ""; if (item.match(/\[url=http(s)*:.+/)) { imgUrl = (_a = item.match(/=(([^\]])+)/)) == null ? void 0 : _a[1]; if (!imgUrl.match(/\.(jpg|png|gif|bmp)$/)) { imgUrl = (_b = item.match(/img\](([^[])+)/)) == null ? void 0 : _b[1]; } else if (item.match(/https:\/\/pixhost\.to/)) { imgUrl = imgUrl.replace(/(pixhost\.to)\/show/, "img53.$1/images"); } } else { imgUrl = (_c = item.match(/img\](([^[])+)/)) == null ? void 0 : _c[1]; } return imgUrl; }); } return ""; }; 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) => { 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); return `${title}${moreTitle.length > 0 ? "/" : ""}${moreTitle.join("/")}`; }; var getAreaCode = (area) => { const europeList = EUROPE_LIST; if (area) { if (area.match(/USA|US|Canada|CA|美国|加拿大/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 < 25) { return "BD25"; } else if (GBSize < 50) { return "BD50"; } else if (GBSize < 66) { return "BD66"; } else if (GBSize < 100) { return "BD100"; } }; var getTMDBIdByIMDBId = (imdbid) => { try { return new Promise((resolve, reject) => { GM_xmlhttpRequest({ method: "GET", url: `${TMDB_API_URL}/3/find/${imdbid}?api_key=${TMDB_API_KEY}&language=en&external_source=imdb_id`, onload(res) { const data = JSON.parse(res.responseText); const isMovie = data.movie_results && data.movie_results.length > 0; const isTV = !data.tv_results && data.tv_results.length > 0; if (res.status !== 200 && (!isMovie && !isTV)) { reject(new Error($t("\u8BF7\u6C42\u5931\u8D25"))); } const tmdbData = isMovie ? data.movie_results[0] : data.tv_results[0]; resolve(tmdbData); } }); }); } catch (error) { console.log(error); } }; var getTMDBVideos = (tmdbId) => { return new Promise((resolve, reject) => { GM_xmlhttpRequest({ method: "GET", url: `${TMDB_API_URL}/3/movie/${tmdbId}/videos?api_key=${TMDB_API_KEY}&language=en`, onload(res) { const data = JSON.parse(res.responseText); resolve(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/); 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([^ ]+)`, "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.chineseAudio = true; } if (languageArray.includes("Cantonese")) { mediaTags.cantoneseAudio = true; } if (hasChineseSubtitle) { mediaTags.chineseSubtitle = true; } if (hdrFormat) { if (hdrFormat.match(/HDR10\+/i)) { mediaTags["HDR10+"] = true; } else if (hdrFormat.match(/HDR/i)) { mediaTags.HDR = true; } } if (isDV) { mediaTags.DolbyVision = true; } if (audioCodec.match(/dtsx|atmos/ig)) { mediaTags[audioCodec] = 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 = "DVD"; } 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 { pp("\n[quote]", "[/quote]"); break; } } 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 { 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)/)) { 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)/) || CURRENT_SITE_NAME === "HDT" || CURRENT_SITE_INFO.siteType === "UNIT3D") { pp("[quote]", "[/quote]"); 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 (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\])/)) { 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.chineseAudio = true; } if (title.match(/Atoms|杜比全景声/i)) { tags.atoms = true; } if (title.match(/HDR/i)) { if (title.match(/HDR10\+/i)) { tags["HDR10+"] = true; } else { tags.HDR = true; } } if (title.match(/DoVi|(Dolby\s*Vision)|杜比视界/i)) { tags.DolbyVision = true; } if (title.match(/粤/i)) { tags.cantoneseAudio = true; } if (title.match(/简繁|繁简|繁体|简体|中字|中英|中文/i)) { tags.chineseSubtitle = true; } if (title.match(/Criterion|CC标准/i)) { tags.CC = true; } return tags; }; var getBDInfoOrMediaInfo2 = (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 = (title, tv, year) => { console.log(title, year); const MAX_YEAR_DIFF = 2; tv = tv || false; year = parseInt(year) || 1800; return new Promise(function(resolve, reject) { GM_xmlhttpRequest({ method: "GET", responseType: "json", url: `https://www.rottentomatoes.com/api/private/v2.0/search/?limit=2&q=${title}`, onload: (resp) => { var _a; const movies = tv ? resp.response.tvSeries : resp.response.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"; resolve({ id, score }); } else { console.log("no match found on rt"); reject(new Error("no suitable match")); } } }); }); }; 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 = (imgArray) => { return new Promise((resolve, reject) => { 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; } const data = `link-upload=${imgArray.join("\n")}&api_key=${apiKey}`; GM_xmlhttpRequest({ url: "https://ptpimg.me/upload.php", method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded;charset=utf-8" }, data, onload(res) { if (!res || !res.responseText) { reject(new Error($t("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"))); } const data2 = JSON.parse(res.responseText); if (!data2) { reject(new Error($t("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"))); } let imgResultList = []; if (data2 && data2.length) { imgResultList = data2.map((img) => { return `https://ptpimg.me/${img.code}.${img.ext}`; }); resolve(imgResultList); } else { throw new Error($t("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")); } } }); }); }; 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; }; // 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; $('textarea[name="descr"]').val($t("\u6570\u636E\u52A0\u8F7D\u4E2D...")); 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][*][url=$youtubeUrl$][img]https://i.ibb.co/TtHYsVC/youutbe-logo.png[/img][/url] [color=DarkOrange][size=2]\u25E2 SYNOPSIS \u25E3[/size][/color] $synopsis$ [color=DarkOrange][size=2]\u25E2 SCREENSHOTS \u25E3[/size][/color] $SCREENSHOTS$ [/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, comparisonImgs = [], 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")); if (comparisonImgs.length > 0) { const comparisonImgsBBCode = getScreenshotsBBCode(comparisonImgs); template = template.replace(/(\[\/center\])$/, `[color=DarkOrange][size=2]\u25E2 COMPARISONS \u25E3[/size][/color] ${comparisonImgsBBCode.join(" ")} $1`); } if (category.match(/tv|movie/)) { try { const replaceParams = { tmdbUrl: "", tmdbScore: 0, imdbScore: 0, imdbUrl, poster: "", synopsis: "", rtUrl: "", rtScore: 0, youtubeUrl: "" }; const {poster, imdb_rating_average: imdbRate, 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" }); 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/index.js var fillTargetForm = (info) => { var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m; console.log(info); if (CURRENT_SITE_NAME === "bB") { bB_default(info); return false; } if (CURRENT_SITE_NAME === "PTSBAO" && localStorage.getItem("autosave")) { localStorage.removeItem("autosave"); } const imdbId = getIMDBIdByUrl(info.imdbUrl); const isBluray = info.videoType.match(/bluray/i); const {screenshots = []} = info; const imdbSelector = (_a = CURRENT_SITE_INFO.imdb) == null ? void 0 : _a.selector; if (CURRENT_SITE_NAME === "HDRoute") { $(imdbSelector).val((_b = imdbId == null ? void 0 : imdbId.replace("tt", "")) != null ? _b : ""); } else { if (imdbSelector) { $(imdbSelector).val(info.imdbUrl); } } if (CURRENT_SITE_NAME === "HDBits") { let mediaTitle = info.title.replace(/([^\d]+)\s+([12][90]\d{2})/, (match, p1, p2) => { return `${info.movieName || info.movieAkaName} ${p2}`; }); if (info.videoType === "remux") { mediaTitle = mediaTitle.replace(/\s+(bluray|blu-ray)/ig, ""); } info.title = mediaTitle; } if (CURRENT_SITE_INFO.name) { const {title, subtitle} = info; let torrentTitle = title; if (CURRENT_SITE_NAME === "TTG") { torrentTitle += `[${subtitle}]`; } else if (CURRENT_SITE_NAME.match(/SSD|iTS/)) { torrentTitle = title.replace(/\s/ig, "."); } $(CURRENT_SITE_INFO.name.selector).val(torrentTitle); } disableTorrentChange(); const commonInfoKeys = ["subtitle", "douban", "area", "audioCodec"]; commonInfoKeys.forEach((key) => { const siteInfo = CURRENT_SITE_INFO[key]; if (siteInfo && siteInfo.selector) { let value = info[key]; if (key === "douban") { value = info.doubanUrl; } else if (key === "area" || key === "audioCodec") { value = siteInfo.map[info[key]]; } $(siteInfo.selector).val(value); } }); const mediaInfo = info.mediaInfo; let description = ""; if (info.description) { description = info.description.replace(/^(\s+)/g, ""); if (isChineseTacker(CURRENT_SITE_INFO.siteType) && CURRENT_SITE_NAME !== "SSD") { const {doubanInfo} = info; if (doubanInfo) { description = doubanInfo + "\n" + description; } } else { const {sourceSiteType} = info; if (isChineseTacker(sourceSiteType) && CURRENT_SITE_NAME !== "Bib") { description = filterNexusDescription(info); } } } if (CURRENT_SITE_INFO.mediaInfo) { if (!(isBluray && CURRENT_SITE_NAME.match(/^(HDBits|Blutopia)/))) { $(CURRENT_SITE_INFO.mediaInfo.selector).val(mediaInfo); description = description.replace(mediaInfo.trim(), ""); } } if (CURRENT_SITE_INFO.screenshots) { screenshots.forEach((img) => { if (description.includes(img)) { description = description.replace(img, ""); if (!img.match(/\[url=.+?\[url]/)) { description = description.replace(/\[img\]\[\/img\]\n*/g, ""); } } }); } if (CURRENT_SITE_NAME === "SSD") { $(CURRENT_SITE_INFO.imdb.selector).val(info.doubanUrl || info.imdbUrl); $(CURRENT_SITE_INFO.screenshots.selector).val(screenshots.join("\n")); if (info.category === "tvPack" || info.title.match(/Trilogy|Collection/i) || info.subTitle && info.subTitle.match(/合集/)) { $('input[name="pack"]').attr("checked", true); } } if (CURRENT_SITE_NAME === "HDAI") { $(CURRENT_SITE_INFO.imdb.selector).val(info.doubanUrl || info.imdbUrl); $(CURRENT_SITE_INFO.screenshots.selector).val(screenshots.join("\n")); if (isBluray) { $('input[type="checkbox"][name="tag[o]"]').attr("checked", true); } } if (CURRENT_SITE_INFO.poster) { let poster = info.poster; if (!poster) { const doubanPosterImage = (info.description + info.doubanInfo).match(/\[img\](http[^[]+?(poster|(img\d\.doubanio))[^[]+?)\[\/img\]/); if (doubanPosterImage && doubanPosterImage[1]) { poster = doubanPosterImage[1]; } else { poster = (_d = (_c = description.match(/\[img\](.+?)\[\/img\]/)) == null ? void 0 : _c[1]) != null ? _d : ""; } } if (poster) { $(CURRENT_SITE_INFO.poster).val(poster); if (CURRENT_SITE_NAME === "HDRoute") { $('input[name="poster"]').val(poster); description = description.replace(poster, ""); } } } if (CURRENT_SITE_NAME === "BeyondHD") { info.screenshots.forEach((img) => { const regStr = new RegExp(`\\[img\\](${img})\\[\\/img\\]`); if (description.match(regStr)) { description = description.replace(regStr, function(p1, p2) { return `[url=${p2}][img=350x350]${p2}[/img][/url]`; }); } }); } description = filterEmptyTags(description); $(CURRENT_SITE_INFO.description.selector).val(getThanksQuote(info) + description.trim()); if (CURRENT_SITE_NAME.match(/BeyondHD|Blutopia|HDPOST|ACM|Aither/)) { const fillIMDBId = CURRENT_SITE_INFO.siteType === "UNIT3D" ? imdbId.replace("tt", "") : imdbId; $(CURRENT_SITE_INFO.imdb.selector).val(fillIMDBId); getTMDBIdByIMDBId(imdbId).then((data) => { $(CURRENT_SITE_INFO.tmdb.selector).val(data.id); }); if (CURRENT_SITE_NAME.match(/BeyondHD|ACM/i)) { const {category, videoType} = info; info.category = videoType; info.videoType = category; if (isBluray) { let bdType = getBDType(info.size); if (videoType === "uhdbluray" && bdType === "BD50") { bdType = "uhd50"; } info.category = bdType; } } } if (CURRENT_SITE_INFO.category) { const category = CURRENT_SITE_INFO.category.map[info.category]; const keyArray = ["videoCodec", "videoType", "resolution", "source", "area"]; let finalSelectArray = []; if (Array.isArray(category)) { finalSelectArray = [...category]; keyArray.forEach((key) => { finalSelectArray = matchSelectForm(CURRENT_SITE_INFO, info, key, finalSelectArray); if (finalSelectArray.length === 1) { $(CURRENT_SITE_INFO.category.selector).val(finalSelectArray[0]); } }); } else { [...keyArray, "category"].forEach((key) => { matchSelectForm(CURRENT_SITE_INFO, info, key, finalSelectArray); }); } } if (CURRENT_SITE_INFO.format) { const formatData = CURRENT_SITE_INFO.format; $(formatData.selector).val(formatData.map[info.format]); } if (CURRENT_SITE_INFO.image) { $(CURRENT_SITE_INFO.image.selector).val(info.image); } if (CURRENT_SITE_NAME.match(/HDHome|PTHome|SoulVoice|1PTBA|HDAtmos/i)) { setTimeout(() => { const event = new Event("change"); document.querySelector(CURRENT_SITE_INFO.category.selector).dispatchEvent(event); }, 500); } if (CURRENT_SITE_INFO.anonymous) { const {selector, value = ""} = CURRENT_SITE_INFO.anonymous; if (value) { $(selector).val(value); } else { $(selector).attr("checked", true); } } if (CURRENT_SITE_INFO.tags) { Object.keys(info.tags).forEach((key) => { if (info.tags[key] && CURRENT_SITE_INFO.tags[key]) { $(CURRENT_SITE_INFO.tags[key]).attr("checked", true); } }); } fillTeamName(info); if (CURRENT_SITE_NAME.match(/PTHome|HDSky|LemonHD|1PTBA|52pt/i)) { if (info.tags.DIY) { let categoryValue = ""; if (CURRENT_SITE_NAME === "PTHome") { categoryValue = info.videoType === "bluray" ? "14" : "13"; } else if (CURRENT_SITE_NAME === "HDSky") { categoryValue = info.videoType === "bluray" ? "12" : "14"; } else if (CURRENT_SITE_NAME === "LemonHD") { $('select[name="tag_diy"]').val("yes"); return; } else if (CURRENT_SITE_NAME === "1PTBA") { categoryValue = info.videoType === "bluray" ? "1" : "4"; } else if (CURRENT_SITE_NAME === "52pt") { categoryValue = info.videoType === "bluray" ? "2" : "12"; } $(CURRENT_SITE_INFO.videoType.selector).val(categoryValue); } } if (CURRENT_SITE_NAME.match(/HDU/)) { let videoTypeValue = ""; const {resolution, videoType, category} = info; const isTV = category.match(/tv/); if (videoType === "remux") { if (resolution === "2160p") { videoTypeValue = isTV ? "16" : "15"; } else { videoTypeValue = isTV ? "12" : "3"; } } if (isTV) { if (videoType === "encode") { videoTypeValue = "14"; } else if (videoType === "web") { videoTypeValue = "13"; } } if (videoTypeValue) { $(CURRENT_SITE_INFO.videoType.selector).val(videoTypeValue); } if (videoType.match(/bluray/)) { $(CURRENT_SITE_INFO.category.selector).val("424"); } } if (CURRENT_SITE_NAME === "TJUPT") { $("#browsecat").change(); tjupt_default(info); } if (CURRENT_SITE_NAME === "NYPT") { $("#browsecat").change(); const domTimeout = setTimeout(() => { const catMap = { movie: "#movie_enname", tv: "#series_enname", tvPack: "#series_enname", documentary: "#doc_enname", variety: "#show_enname", cartoon: "#anime_enname" }; const selector = catMap[info.category]; if (selector) { $(selector).val(info.title); } clearTimeout(domTimeout); }, 2e3); } if (CURRENT_SITE_INFO.siteType === "UNIT3D" && info.category.match(/tv/)) { const season = (_f = (_e = info.title.match(/S0?(\d{1,2})/i)) == null ? void 0 : _e[1]) != null ? _f : 1; const episode = (_h = (_g = info.title.match(/EP?0?(\d{1,3})/i)) == null ? void 0 : _g[1]) != null ? _h : 0; $("#season_number").val(season); $("#episode_number").val(episode); } if (CURRENT_SITE_NAME === "HDRoute") { hdr_default(info); } if (CURRENT_SITE_NAME === "HDT") { if (info.category !== "tvPack") { $('select[name="season"').val("true"); } if (imdbId) { $(CURRENT_SITE_INFO.imdb.selector).val(`https://www.imdb.com/title/${imdbId}/`); } } if (CURRENT_SITE_NAME === "Pter") { const language = (_j = (_i = info.description.match(/(语\s+言)\s+(.+)/)) == null ? void 0 : _i[2]) != null ? _j : ""; if (!language.match(/英语/) && info.area === "EU") { $(CURRENT_SITE_INFO.area.selector).val("8"); } } if (CURRENT_SITE_NAME === "HDHome") { if (info.title.match(/iPad/i)) { const categoryMap = { movie: "412", tv: "426", tvPack: "433", documentary: "418" }; const ipadCat = categoryMap[info.category]; if (ipadCat) { $("#browsecat").val(ipadCat); } } } if (CURRENT_SITE_NAME === "Bib" && ((_k = info.doubanBookInfo) == null ? void 0 : _k.success)) { bib_default(info); } if (CURRENT_SITE_NAME === "iTS") { its_default(info); } if (CURRENT_SITE_NAME === "UHDBits") { $(CURRENT_SITE_INFO.imdb.selector).val(imdbId); const teamName = getTeamName(info); $("#team").val(teamName === "other" ? "Unknown" : teamName); if (info.title.match(/web-?rip/i)) { $(CURRENT_SITE_INFO.videoType.selector).val("WEBRip"); } $("#imdb_button").click(); } if (CURRENT_SITE_NAME === "52PT") { const {tags, videoType, resolution} = info; let videoTypeValue = videoType; if (videoType.match(/bluray/)) { if (tags.chineseAudio || tags.cantoneseAudio || tags.chineseSubtitle) { videoTypeValue = videoType === "bluray" ? "14" : "15"; } } else if (videoType === "remux" && resolution === "2160p") { videoTypeValue = "5"; } $(CURRENT_SITE_INFO.videoType.selector).val(videoTypeValue); } if (CURRENT_SITE_NAME === "BTSCHOOL") { $(imdbSelector).val(imdbId); if (info.doubanUrl) { const doubanId = (_m = (_l = info.doubanUrl.match(/\/(\d+)/)) == null ? void 0 : _l[1]) != null ? _m : ""; $(CURRENT_SITE_INFO.douban.selector).val(doubanId); } } }; var matchSelectForm = (siteInfo, movieInfo, key, selectArray) => { const valueArray = siteInfo[key] ? siteInfo[key].map[movieInfo[key]] : void 0; if (Array.isArray(valueArray) && selectArray) { if (siteInfo[key].selector) { $(siteInfo[key].selector).val(valueArray.shift()); } if (selectArray.length > 1) { selectArray = selectArray.filter((item) => valueArray.includes(item)); } } else if (siteInfo[key] && siteInfo[key].selector) { $(siteInfo[key].selector).val(valueArray); } return selectArray; }; var fillTeamName = (info) => { const teamConfig = CURRENT_SITE_INFO.team; const teamName = getTeamName(info); if (teamName && teamConfig) { const formateTeamName = teamConfig.map[teamName.toLowerCase()]; const matchValue = formateTeamName || teamConfig.map.other; if (HDB_TEAM.includes(teamName) && CURRENT_SITE_NAME === "BTSCHOOL") { $(teamConfig.selector).val(teamConfig.map.hdbint); return; } if (CURRENT_SITE_NAME === "HDAI" && !formateTeamName) { $('input[name="team"]').val(teamName); return; } if (matchValue) { $(teamConfig.selector).val(matchValue.toLowerCase()); } } }; var disableTorrentChange = () => { var _a, _b; const nameSelector = (_b = (_a = CURRENT_SITE_INFO.name) == null ? void 0 : _a.selector) != null ? _b : ""; if (nameSelector.match(/^#\w+/)) { const nameDom = $(nameSelector).clone().attr("name", "").hide(); $(nameSelector).attr("id", "").after(nameDom); } }; var filterNexusDescription = (info) => { const {description} = info; let filterDescription = ""; const quoteList = description.match(/\[quote(=\w+)?\](.|\n)+?\[\/quote\]/g); if (quoteList && quoteList.length > 0) { quoteList.forEach((quote) => { const isMediaInfoOrBDInfo = quote.match(/Disc\s?Size|\.mpls|Unique\s?ID|唯一ID|Resolution/i); if (!quote.match(/[\u4e00-\u9fa5]+/i) || isMediaInfoOrBDInfo) { filterDescription += quote + "\n"; } }); } const allImages = getFilterImages(description); return filterDescription + "\n" + allImages.join(""); }; var getThanksQuote = (info) => { const isChineseSite = isChineseTacker(CURRENT_SITE_INFO.siteType) || CURRENT_SITE_NAME === "HDPOST"; let thanksQuote = `\u8F6C\u81EA[b]${info.sourceSite}[/b]\uFF0C\u611F\u8C22\u539F\u53D1\u5E03\u8005\uFF01`; if (!isChineseSite) { thanksQuote = `Torrent from [b]${info.sourceSite}[/b]. All thanks to the original uploader\uFF01`; } return `[quote]${thanksQuote}[/quote] `; }; var isChineseTacker = (siteType) => { return siteType.match(/NexusPHP|TTG/); }; var filterEmptyTags = (description) => { const reg = new RegExp("\\[(\\w+)(?:=(?:\\w|\\s)+)?\\]\\s*\\[\\/(\\w+)\\]", "g"); if (description.match(reg)) { description = description.replace(reg, function(match, p1, p2) { if (p1 === p2) { return ""; } }); return filterEmptyTags(description); } else { return description; } }; // src/source/ptp.js var ptp_default = () => { var _a, _b, _c; const torrentId = getUrlParam("torrentid"); if (!torrentId) { return false; } TORRENT_INFO.sourceSite = CURRENT_SITE_NAME; TORRENT_INFO.sourceSiteType = CURRENT_SITE_INFO.siteType; const torrentDom = $(`#torrent_${torrentId}`); const ptpMovieTitle = (_a = $(".page__title").text().match(/]?([^[]+)/)[1]) == null ? void 0 : _a.trim(); const [movieName, movieAkaName = ""] = ptpMovieTitle.split(" AKA "); const mediaInfoArray = []; torrentDom.find(".mediainfo.mediainfo--in-release-description").next("blockquote").each(function() { const textContent = $(this).text(); if (textContent.match(/(Codec\s*ID)|mpls|(Stream\s*size)/i)) { mediaInfoArray.push(textContent); } }); TORRENT_INFO.movieName = movieName; TORRENT_INFO.movieAkaName = movieAkaName; TORRENT_INFO.imdbUrl = (_c = (_b = $("#imdb-title-link")) == null ? void 0 : _b.attr("href")) != null ? _c : ""; TORRENT_INFO.year = $(".page__title").text().match(/\[(\d+)\]/)[1]; const torrentHeaderDom = $(`#group_torrent_header_${torrentId}`); TORRENT_INFO.category = getPTPType(); const screenshots = getPTPImage(torrentDom); getDescription(torrentId).then((res) => { const descriptionData = formatDescriptionData(res, screenshots, mediaInfoArray); TORRENT_INFO.description = descriptionData; const infoArray = torrentHeaderDom.find("#PermaLinkedTorrentToggler").text().replace(/ /g, "").split("/"); const [codes, container, source, ...otherInfo] = infoArray; const isRemux = otherInfo.includes("Remux"); TORRENT_INFO.videoType = source === "WEB" ? "web" : getVideoType(container, isRemux, codes, source); const isBluray = TORRENT_INFO.videoType.match(/bluray/i); const {bdinfo, mediaInfo} = getBDInfoOrMediaInfo2(descriptionData); const mediaInfoOrBDInfo = isBluray ? bdinfo : mediaInfo; const getInfoFunc = isBluray ? getInfoFromBDInfo : getInfoFromMediaInfo; TORRENT_INFO.mediaInfo = mediaInfoOrBDInfo; const {videoCodec, audioCodec, resolution, mediaTags} = getInfoFunc(mediaInfoOrBDInfo); TORRENT_INFO.videoCodec = videoCodec; TORRENT_INFO.audioCodec = audioCodec; TORRENT_INFO.resolution = resolution; TORRENT_INFO.tags = mediaTags; let torrentName = torrentHeaderDom.data("releasename"); torrentName = formatTorrentTitle(torrentName); TORRENT_INFO.title = torrentName; TORRENT_INFO.source = getPTPSource(source, codes, resolution); TORRENT_INFO.size = torrentHeaderDom.find(".nobr span").attr("title").replace(/[^\d]/g, ""); TORRENT_INFO.screenshots = screenshots; console.log(TORRENT_INFO); }); let country = []; const matchArray = $("#movieinfo div").text().match(/Country:\s+([^\n]+)/); if (matchArray && matchArray.length > 0) { country = matchArray == null ? void 0 : matchArray[1].replace(/(,)\s+/g, "$1").split(","); } TORRENT_INFO.area = getAreaCode(country == null ? void 0 : country[0]); return TORRENT_INFO; }; var getPTPType = () => { const typeMap = { "Feature Film": "movie", "Short Film": "movie", "Stand-up Comedy": "other", Miniseries: "tvPack", "Live Performance": "concert", "Movie Collection": "movie" }; const ptpType = $("#torrent-table .basic-movie-list__torrent-edition__main").eq(0).text(); return typeMap[ptpType]; }; var getPTPImage = () => { const imgList = []; const torrentInfoPanel = $(".movie-page__torrent__panel"); const imageDom = torrentInfoPanel.find(".bbcode__image"); for (let i = 0; i < imageDom.length; i++) { imgList.push(imageDom[i].getAttribute("src")); } return imgList; }; var getPTPSource = (source, codes, resolution) => { if (codes.match(/BD100|BD66/i)) { return "uhdbluray"; } if (source.match(/Blu-ray/i) && resolution.match(/2160P|4K/i)) { return "uhdbluray"; } return source.replace(/-/g, "").toLowerCase(); }; var getVideoType = (container, isRemux, codes, source) => { let type = ""; if (isRemux) { type = "remux"; } else if (codes.match(/BD50|BD25/ig)) { type = "bluray"; } else if (codes.match(/BD66|BD100/ig)) { type = "uhdbluray"; } else if (source.match(/DVD/ig) && container.match(/MKV|AVI/ig)) { type = "dvdrip"; } else if (codes.match(/DVD5|DVD9/ig) && container.match(/VOB|ISO/ig)) { type = "dvd"; } else if (container.match(/MKV|MP4/i)) { type = "encode"; } return type; }; var getDescription = (id) => { return new Promise((resolve, reject) => { try { GM_xmlhttpRequest({ method: "GET", url: `https://passthepopcorn.me/torrents.php?action=get_description&id=${id}`, onload(res) { const data = res.responseText; if (data) { const element = document.createElement("span"); element.innerHTML = data; resolve(element.innerText || element.textContent); } } }); } catch (error) { reject(new Error(error.message)); } }); }; var formatDescriptionData = (data, screenshots, mediaInfoArray) => { let descriptionData = data.replace(/\r\n/g, "\n"); descriptionData = descriptionData.split("\n").map((line) => { return line.trim(); }).join("\n"); screenshots.forEach((screenshot) => { const regStr = new RegExp(`\\[img\\]${screenshot}\\[\\/img\\]`, "i"); if (!descriptionData.match(regStr)) { descriptionData = descriptionData.replace(new RegExp(screenshot, "g"), `[img]${screenshot}[/img]`); } }); descriptionData = descriptionData.replace(/\[(\/)?mediainfo\]/g, "[$1quote]"); descriptionData = descriptionData.replace(/\[(\/)?hide(?:=(.+?))?\]/g, function(match, p1, p2) { const slash = p1 || ""; return p2 ? `${p2}: [${slash}quote]` : `[${slash}quote]`; }); descriptionData = descriptionData.replace(/\[(\/)?pre\]/g, "[$1quote]"); descriptionData = descriptionData.replace(/\[align(=(.+?))\]((.|\s)+?)\[\/align\]/g, "[$2]$3[/$2]"); const comparisonArray = descriptionData.match(/\[comparison=(?:.+?)\]((.|\n|\s)+?)\[\/comparison\]/g) || []; let comparisonImgArray = []; comparisonArray.forEach((item) => { comparisonImgArray = comparisonImgArray.concat(item.replace(/\[\/?comparison(=(.+?))?\]/g, "").split(/[ \r\n]/)); descriptionData = descriptionData.replace(item, item.replace(/\s/g, "")); }); const comparisonImgs = []; [...new Set(comparisonImgArray)].forEach((item) => { const formatImg = item.replace(/\s*/g, ""); if (item.match(/^https?.+/)) { comparisonImgs.push(formatImg); descriptionData = descriptionData.replace(new RegExp(`(? { const regStr = new RegExp(`\\[quote\\]\\s*?${replaceRegSymbols(mediaInfo)}`, "i"); if (!descriptionData.match(regStr)) { descriptionData = descriptionData.replace(mediaInfo, `[quote]${mediaInfo}[/quote]`); } }); if (TORRENT_INFO.category === "concert") { descriptionData = $("#synopsis").text() + "\n" + descriptionData; } return descriptionData; }; // src/source/bhd.js var bhd_default = () => { TORRENT_INFO.sourceSite = CURRENT_SITE_NAME; TORRENT_INFO.sourceSiteType = CURRENT_SITE_INFO.siteType; const {Category, Name, Source, Type, Size} = getBasicInfo(); TORRENT_INFO.size = getSize(Size); TORRENT_INFO.title = formatTorrentTitle(Name); const tags = getTagsFromSubtitle(TORRENT_INFO.title); const TMDBYear = $(".movie-heading a:last").text(); const movieName = $(".movie-heading a:first").text(); if (!TMDBYear) { const matchYear = TORRENT_INFO.title.match(/\s([12][90]\d{2})/); TORRENT_INFO.year = matchYear ? matchYear[0] : ""; } else { TORRENT_INFO.year = TMDBYear; } const descriptionDom = $(".panel-heading:contains(Description)").next(".panel-body").find(".forced-nfo"); const descriptionBBCode = getFilterBBCode(descriptionDom[0]); const {category: movieCat, countries, imdbUrl} = getMovieDetails(); TORRENT_INFO.movieName = movieName; let category = Category.toLowerCase().replace(/s/, ""); category = movieCat === "Animation" ? "cartoon" : category; TORRENT_INFO.category = getPreciseCategory(TORRENT_INFO, category); TORRENT_INFO.source = getSource2(Source, Type); TORRENT_INFO.area = getAreaCode(countries); TORRENT_INFO.videoType = getVideoType2(Type); const isBluray = TORRENT_INFO.videoType.match(/bluray/i); const mediaInfo = $("#stats-full code").text(); TORRENT_INFO.mediaInfo = mediaInfo; TORRENT_INFO.description = `${descriptionBBCode} [quote]${mediaInfo}[/quote]`; const getInfoFunc = isBluray ? getInfoFromBDInfo : getInfoFromMediaInfo; const {videoCodec, audioCodec, resolution, mediaTags} = getInfoFunc(mediaInfo); TORRENT_INFO.videoCodec = videoCodec; TORRENT_INFO.audioCodec = audioCodec; TORRENT_INFO.resolution = resolution; TORRENT_INFO.tags = __assign(__assign({}, tags), mediaTags); TORRENT_INFO.imdbUrl = imdbUrl; TORRENT_INFO.screenshots = getImages(); return TORRENT_INFO; }; var getBasicInfo = () => { const basicInfo = {}; $(".dotborder").each((index, element) => { const key = $(element).find("td:first").text(); const value = $(element).find("td:last").text(); basicInfo[key] = value.replace(/\n/g, "").trim(); }); console.log(basicInfo); return basicInfo; }; var getMovieDetails = () => { const infoList = $(".movie-details a"); const movieDetail = {}; infoList.each((index, element) => { const urlParams = $(element).attr("href").replace(/.+\?/g, "").split("="); if (urlParams.length > 1) { let key = decodeURI(urlParams[0]); const value = urlParams[1]; if (key === "g[]") { key = "category"; } movieDetail[key] = value; } else if (urlParams == null ? void 0 : urlParams[0].match(/tt\d+/)) { movieDetail.imdbUrl = urlParams[0]; } }); return movieDetail; }; var getImages = () => { var _a; const screenshots = (_a = TORRENT_INFO.description.match(/\[url=.+?\]\[img\].+?\[\/img\]\[\/url]/g)) != null ? _a : []; return screenshots; }; var getSource2 = (source, resolution) => { if (resolution.match(/BD100|BD66/i)) { return "uhdbluray"; } if (source.match(/Blu-ray/i) && resolution.match(/UHD/i)) { return "uhdbluray"; } if (source.match(/WEB|WEB-DL/i)) { return "web"; } return source.replace(/-/g, "").toLowerCase(); }; var getVideoType2 = (type) => { type = type.replace(/\s/g, ""); if (type.match(/Remux/i)) { return "remux"; } else if (type.match(/BD50|BD25/i)) { return "bluray"; } else if (type.match(/UHD50|UHD66|UHD100/i)) { return "uhdbluray"; } else if (type.match(/DVD5|DVD9/i)) { return "dvd"; } else if (type.match(/\d{3,4}p/i)) { return "encode"; } return type; }; // src/source/hdb.js var hdb_default = () => { var _a, _b; const torrentId = getUrlParam("id"); TORRENT_INFO.sourceSite = CURRENT_SITE_NAME; TORRENT_INFO.sourceSiteType = CURRENT_SITE_INFO.siteType; const editDom = $("#details tr").has("a:contains(Edit torrent)"); const descriptionDom = editDom.length > 0 ? editDom.prev() : $("#details tr").has(".js-tagcontent").prev(); let descriptionBBCode = getFilterBBCode(descriptionDom.find(">td")[0]); descriptionBBCode = (_b = (_a = descriptionBBCode.match(/\[quote\]((.|\n)+)\[\/quote\]/)) == null ? void 0 : _a[1]) != null ? _b : ""; TORRENT_INFO.description = descriptionBBCode; const {size, category, videoType} = getBasicInfo2(); const title = $("h1").eq(0).text(); TORRENT_INFO.title = formatTorrentTitle(title); const tags = getTagsFromSubtitle(title); const isMovieType = $(".contentlayout h1").length > 0; const IMDBLinkDom = isMovieType ? $(".contentlayout h1") : $("#details .showlinks li").eq(1); if (isMovieType) { const IMDBYear = IMDBLinkDom.prop("lastChild").nodeValue.replace(/\s|\(|\)/g, ""); const movieName = IMDBLinkDom.find("a").text(); TORRENT_INFO.movieName = movieName; if (!IMDBYear) { const matchYear = TORRENT_INFO.title.match(/\s([12][90]\d{2})/); TORRENT_INFO.year = matchYear ? matchYear[0] : ""; } else { TORRENT_INFO.year = IMDBYear; } } TORRENT_INFO.imdbUrl = IMDBLinkDom.find("a").attr("href"); TORRENT_INFO.category = getPreciseCategory(TORRENT_INFO, category); TORRENT_INFO.source = getSourceFromTitle(TORRENT_INFO.title); TORRENT_INFO.videoType = videoType; const isBluray = TORRENT_INFO.videoType.match(/bluray/i); const getInfoFunc = isBluray ? getInfoFromBDInfo : getInfoFromMediaInfo; const {bdinfo} = getBDInfoOrMediaInfo2(descriptionBBCode); if (!isBluray) { TORRENT_INFO.bdinfo = bdinfo; getMediaInfo(torrentId).then((data) => { if (data) { TORRENT_INFO.mediaInfo = data; descriptionBBCode += ` [quote]${data}[/quote]`; TORRENT_INFO.description = descriptionBBCode; const {videoCodec, audioCodec, resolution, mediaTags} = getInfoFunc(TORRENT_INFO.mediaInfo); TORRENT_INFO.videoCodec = videoCodec; TORRENT_INFO.audioCodec = audioCodec; TORRENT_INFO.resolution = resolution; TORRENT_INFO.tags = __assign(__assign({}, tags), mediaTags); } }); } else { TORRENT_INFO.mediaInfo = bdinfo; const {videoCodec, audioCodec, resolution, mediaTags} = getInfoFunc(bdinfo || descriptionBBCode); TORRENT_INFO.videoCodec = videoCodec; TORRENT_INFO.audioCodec = audioCodec; TORRENT_INFO.resolution = resolution; TORRENT_INFO.tags = __assign(__assign({}, tags), mediaTags); } TORRENT_INFO.size = size; TORRENT_INFO.screenshots = getImages2(); }; var getBasicInfo2 = () => { const videoTypeMap = { "Blu-ray/HD DVD": "bluray", Capture: "hdtv", Encode: "encode", Remux: "remux", "WEB-DL": "web" }; const info = $("th:contains(Category)").next().text(); const size = $("th:contains(Size)").eq(0).next().text(); const splitArray = info.split("("); const category = splitArray[0].trim().toLowerCase(); const videoCodec = splitArray[1].split(",")[0].toLowerCase().replace(/\./g, ""); const videoType = splitArray[1].split(",")[1].replace(/\)/g, "").trim(); return { size: getSize(size), category, videoCodec, videoType: videoTypeMap[videoType] }; }; var getMediaInfo = (torrentId) => { return new Promise((resolve, reject) => { GM_xmlhttpRequest({ method: "GET", url: `https://hdbits.org/details/mediainfo?id=${torrentId}`, onload(res) { const data = res.responseText; if (res.status !== 200 || !data) { reject(new Error($t("\u8BF7\u6C42\u5931\u8D25"))); } resolve(data); } }); }); }; var getImages2 = () => { var _a; const screenshots = (_a = TORRENT_INFO.description.match(/\[url=.+?\]\[img\].+?\[\/img\]\[\/url]/g)) != null ? _a : []; return screenshots; }; // src/source/ttg.js var ttg_default = () => { var _a, _b; TORRENT_INFO.sourceSite = CURRENT_SITE_NAME; TORRENT_INFO.sourceSiteType = CURRENT_SITE_INFO.siteType; const headTitle = $("#main_table h1").eq(0).text(); const title = (_a = headTitle.match(/[^[]+/)) == null ? void 0 : _a[0]; TORRENT_INFO.title = formatTorrentTitle(title); TORRENT_INFO.subtitle = headTitle.replace(title, "").replace(/\[|\]/g, ""); const tags = getTagsFromSubtitle(TORRENT_INFO.subtitle + TORRENT_INFO.title); const mediaTecInfo = getTorrentValueDom("\u7C7B\u578B").text(); const {category, area, videoType} = getCategoryAndArea(mediaTecInfo); TORRENT_INFO.area = area; TORRENT_INFO.videoType = getVideoType3(title, videoType); const year = TORRENT_INFO.title.match(/(18|19|20)\d{2}/g); TORRENT_INFO.year = year ? year.pop() : ""; TORRENT_INFO.imdbUrl = getTorrentValueDom("IMDB").find("a").attr("href"); TORRENT_INFO.source = getSourceFromTitle(TORRENT_INFO.title); const sizeStr = (_b = getTorrentValueDom("\u5C3A\u5BF8").text().match(/\(((\d|,)+)\s*字节\)/i)) == null ? void 0 : _b[1]; TORRENT_INFO.size = sizeStr.replace(/,/g, ""); const isBluray = TORRENT_INFO.videoType.match(/bluray/i); const getInfoFunc = isBluray ? getInfoFromBDInfo : getInfoFromMediaInfo; TORRENT_INFO.isForbidden = !!$("#kt_d").text().match(/禁转/); window.onload = () => { var _a2, _b2, _c, _d, _e, _f, _g; const descriptionDom = $("#kt_d"); let bbCodes = getFilterBBCode(descriptionDom[0]); const discountMatch = (_b2 = (_a2 = bbCodes.match(/\[color=\w+\]本种子.+?\[\/color\]/)) == null ? void 0 : _a2[0]) != null ? _b2 : ""; if (bbCodes.match) { bbCodes = bbCodes.replace(discountMatch, ""); } TORRENT_INFO.description = bbCodes; const doubanUrl = (_c = bbCodes.match(/https:\/\/(movie\.)?douban.com\/subject\/\d+/)) == null ? void 0 : _c[0]; if (doubanUrl) { TORRENT_INFO.doubanUrl = doubanUrl; } const areaMatch = (_d = bbCodes.match(/(产\s+地|国\s+家)\s+(.+)/)) == null ? void 0 : _d[2]; if (areaMatch) { TORRENT_INFO.area = getAreaCode(areaMatch); } if (!category) { TORRENT_INFO.category = getCategoryFromDesc(bbCodes); } else { TORRENT_INFO.category = getPreciseCategory(TORRENT_INFO, category); } const {bdinfo, mediaInfo} = getBDInfoOrMediaInfo(bbCodes); const mediaInfoOrBDInfo = isBluray ? bdinfo : mediaInfo; if (mediaInfoOrBDInfo) { TORRENT_INFO.mediaInfo = mediaInfoOrBDInfo; const {videoCodec, audioCodec, resolution, mediaTags} = getInfoFunc(mediaInfoOrBDInfo); TORRENT_INFO.videoCodec = videoCodec; TORRENT_INFO.audioCodec = audioCodec; TORRENT_INFO.resolution = resolution; TORRENT_INFO.tags = __assign(__assign({}, tags), mediaTags); } else { let resolution = (_e = TORRENT_INFO.title.match(/\d{3,4}(p|i)/i)) == null ? void 0 : _e[0]; if (!resolution && resolution.match(/4k|uhd/i)) { resolution = "2160p"; } TORRENT_INFO.resolution = resolution; TORRENT_INFO.audioCodec = getAudioCodecFromTitle(TORRENT_INFO.title); if (bbCodes.match(/VIDEO(\.| )*CODEC/i)) { const matchCodec = (_f = bbCodes.match(/VIDEO(\.| )*CODEC\.*:?\s*([^\s_:]+)?/i)) == null ? void 0 : _f[2]; if (matchCodec) { TORRENT_INFO.videoCodec = matchCodec.replace(/\.|-/g, "").toLowerCase(); } else { const {title: title2} = TORRENT_INFO; TORRENT_INFO.videoCodec = getVideoCodecFromTitle(title2); } } if (bbCodes.match(/AUDIO\s*CODEC/i)) { const matchCodec = (_g = bbCodes.match(/AUDIO\s*CODEC\.*:?\s*(.+)/i)) == null ? void 0 : _g[1]; if (matchCodec) { TORRENT_INFO.audioCodec = getAudioCodecFromTitle(matchCodec); } } } TORRENT_INFO.screenshots = getImages3(bbCodes); console.log(TORRENT_INFO); }; }; var getCategoryAndArea = (mediaInfo) => { let category = ""; let area = ""; let videoType = ""; if (mediaInfo.match(/电影/)) { category = "movie"; } else if (mediaInfo.match(/剧包/)) { category = "tvPack"; } else if (mediaInfo.match(/剧/)) { category = "tv"; } else if (mediaInfo.match(/纪录/)) { category = "documentary"; } else if (mediaInfo.match(/综艺/)) { category = "variety"; } else if (mediaInfo.match(/体育/)) { category = "sport"; } else if (mediaInfo.match(/演唱会/)) { category = "concert"; } else if (mediaInfo.match(/动漫/)) { category = "cartoon"; } if (mediaInfo.match(/韩/)) { area = "KR"; } else if (mediaInfo.match(/日/)) { area = "JP"; } else if (mediaInfo.match(/华/)) { area = "CN"; } else if (mediaInfo.match(/欧/)) { area = "US"; } if (mediaInfo.match(/UHD原盘/i)) { videoType = "uhdbluray"; } else if (mediaInfo.match(/bluray原盘/i)) { videoType = "bluray"; } else if (mediaInfo.match(/DVD/i)) { videoType = "dvd"; } return { category, area, videoType }; }; var getImages3 = (bbcode) => { var _a; if (bbcode.match(/More\.Screens/i)) { const moreScreen = (_a = bbcode.match(/\.More\.Screens\[\/u\]\[\/color\]\n((.|\n)+\[\/(url|img)\])/)) == null ? void 0 : _a[1]; return getScreenshotsFromBBCode(moreScreen); } else { return getScreenshotsFromBBCode(bbcode); } }; var getVideoType3 = (title, videoType) => { if (title.match(/HDTV/i)) { return "hdtv"; } else if (title.match(/web(-)*(dl|rip)/i)) { return "web"; } else if (title.match(/remux/i)) { return "remux"; } else if (title.match(/dvdrip/i)) { return "dvdrip"; } else if (title.match(/x264|x265/i)) { return "encode"; } return videoType; }; var getTorrentValueDom = (key) => { return $(`#main_table td.heading:contains(${key})`).next(); }; var getCategoryFromDesc = (desc) => { let category = "movie"; const {title, subtitle} = TORRENT_INFO; if (title.match(/s0?\d{1,2}/i) || desc.match(/集\s*数/)) { if (title.match(/s0?\d{1,2}e0\d{1,2}/i) || subtitle.match(/第[^\s]集/)) { category = "tv"; } else { category = "tvPack"; } } else if (desc.match(/动画/)) { category = "cartoon"; } else if (desc.match(/纪录/)) { category = "documentary"; } return category; }; // src/source/unit3d.js var unit3d_default = () => { var _a, _b, _c, _d, _e, _f; TORRENT_INFO.sourceSite = CURRENT_SITE_NAME; TORRENT_INFO.sourceSiteType = CURRENT_SITE_INFO.siteType; const {Category, Name, Type, Size, Resolution} = getBasicInfo3(); TORRENT_INFO.size = getSize(Size); let title = formatTorrentTitle(Name); const tags = getTagsFromSubtitle(TORRENT_INFO.title); const category = getCategory(Category); const videoType = getVideoType4(Type, Resolution); let IMDBYear = $(".movie-heading span:last").text(); const movieName = $(".movie-heading span:first").text(); if (CURRENT_SITE_NAME === "HDPOST") { const englishTitle = (_b = (_a = title.match(/[\s\W\d]+(.+)/)) == null ? void 0 : _a[1]) != null ? _b : ""; TORRENT_INFO.subtitle = (_c = title.replace(englishTitle, "")) == null ? void 0 : _c.trim(); title = englishTitle; } if (CURRENT_SITE_NAME === "ACM") { title = title.replace(/\/\s+\W+/, ""); } if (!IMDBYear) { const matchYear = TORRENT_INFO.title.match(/(19|20)\d{2}/g); IMDBYear = (_d = matchYear == null ? void 0 : matchYear.pop()) != null ? _d : ""; } else { IMDBYear = IMDBYear.replace(/\(|\)|\s/g, ""); } const imdbUrl = $(".movie-details a:contains(IMDB)").attr("href"); const resolution = (_e = Resolution.match(/\d+(i|p)/i)) == null ? void 0 : _e[0]; const descriptionDom = $(".fa-sticky-note").parents(".panel-heading").siblings(".table-responsive").find(".panel-body").clone(); descriptionDom.find("#collection_waypoint").remove(); let descriptionBBCode = getFilterBBCode(descriptionDom[0]); const mediaInfo = $(".decoda-code code").text(); const {bdinfo} = getBDInfoOrMediaInfo2(descriptionBBCode); if (mediaInfo) { descriptionBBCode += ` [quote]${mediaInfo}[/quote]`; } const isBluray = videoType.match(/bluray/i); const getInfoFunc = isBluray ? getInfoFromBDInfo : getInfoFromMediaInfo; const mediaInfoOrBDInfo = isBluray ? bdinfo : mediaInfo; const {videoCodec, audioCodec, mediaTags} = getInfoFunc(mediaInfoOrBDInfo); TORRENT_INFO.mediaInfo = mediaInfoOrBDInfo; TORRENT_INFO.videoCodec = videoCodec; TORRENT_INFO.audioCodec = audioCodec; TORRENT_INFO.tags = __assign(__assign({}, tags), mediaTags); TORRENT_INFO.screenshots = (_f = descriptionBBCode.match(/\[url=.+?\]\[img\].+?\[\/img\]\[\/url]/g)) != null ? _f : []; TORRENT_INFO.title = title; TORRENT_INFO.year = IMDBYear; TORRENT_INFO.movieName = CURRENT_SITE_NAME === "HDPOST" ? "" : movieName; TORRENT_INFO.resolution = resolution; TORRENT_INFO.imdbUrl = imdbUrl; TORRENT_INFO.poster = $(".movie-poster").attr("src"); TORRENT_INFO.category = getPreciseCategory(TORRENT_INFO, category); TORRENT_INFO.source = getSourceFromTitle(title); TORRENT_INFO.videoType = videoType.toLowerCase(); TORRENT_INFO.description = descriptionBBCode; return TORRENT_INFO; }; var getBasicInfo3 = () => { const basicInfo = {}; const keyMap = { Name: "Name", \u540D\u79F0: "Name", \u540D\u7A31: "Name", Size: "Size", \u4F53\u79EF: "Size", \u9AD4\u7A4D: "Size", Category: "Category", \u7C7B\u522B: "Category", \u985E\u5225: "Category", Type: "Type", \u89C4\u683C: "Type", \u898F\u683C: "Type", Resolution: "Resolution" }; $("#vue+.panel table tr").each((index, element) => { const key = $(element).find("td:first").text().replace(/\s|\n/g, ""); if (keyMap[key]) { const value = $(element).find("td:last").text(); basicInfo[keyMap[key]] = value.replace(/\n/g, "").trim(); } }); return basicInfo; }; var getCategory = (key) => { if (!key) { return ""; } if (key.match(/movie|电影/i)) { return "movie"; } else if (key.match(/tv|电视|剧集/i)) { return "tv"; } }; var getVideoType4 = (type, resolution) => { type = type.replace(/\s/g, ""); if (type.match(/FullDisc/)) { if (resolution.match(/2160p/i)) { return "uhdbluray"; } else if (resolution.match(/1080/)) { return "bluray"; } else { return "dvd"; } } else if (type.match(/Encode/i)) { return "encode"; } else if (type.match(/web/i)) { return "web"; } else if (type.match(/HDTV/i)) { return "hdtv"; } return type; }; // src/source/nexusphp.js var nexusphp_default = () => { var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w; let title = formatTorrentTitle((_b = (_a = $("#top").text().split(/\s{3,}/)) == null ? void 0 : _a[0]) == null ? void 0 : _b.trim()); let metaInfo = $("td.rowhead:contains('\u57FA\u672C\u4FE1\u606F'), td.rowhead:contains('\u57FA\u672C\u8CC7\u8A0A')").next().text().replace(/:/g, ":"); let subtitle = $("td.rowhead:contains('\u526F\u6807\u9898'), td.rowhead:contains('\u526F\u6A19\u984C')").next().text(); let siteImdbUrl = $("#kimdb>a").attr("href"); let descriptionBBCode = getFilterBBCode($("#kdescr")[0]); if (CURRENT_SITE_NAME === "MTeam") { descriptionBBCode = descriptionBBCode.replace(/https:\/\/\w+?\.m-team\.cc\/imagecache.php\?url=/g, "").replace(/(http(s)?)%3A/g, "$1:").replace(/%2F/g, "/"); } if (CURRENT_SITE_NAME === "HDArea") { title = (_d = (_c = $("h1#top").text().split(/\s{3,}/)) == null ? void 0 : _c[0]) == null ? void 0 : _d.trim(); } if (CURRENT_SITE_NAME === "TJUPT") { const matchArray = title.match(/\[[^\]]+(\.|\s)+[^\]]+\]/g) || []; const realTitle = (_f = (_e = matchArray.filter((item) => item.match(/\.| /))) == null ? void 0 : _e[0]) != null ? _f : ""; title = realTitle.replace(/\[|\]/g, ""); } if (CURRENT_SITE_NAME === "PTer") { if ($("#descrcopyandpaster")[0]) { descriptionBBCode = (_g = $("#descrcopyandpaster").val()) == null ? void 0 : _g.replace(/hide(=(MediaInfo|BDInfo))?\]/ig, "quote]"); } else { descriptionBBCode = getFilterBBCode($("#kdescr")[0]); } } if (CURRENT_SITE_NAME === "LemonHD") { descriptionBBCode = descriptionBBCode.replace(/\[b\]\[color=\w+\][^[]+?网上搜集[^[]+?\[\/color\]\[\/b\]/, ""); } if (CURRENT_SITE_NAME === "HDChina") { const meta = []; $("li:contains('\u57FA\u672C\u4FE1\u606F'):last").next("li").children("i").each(function() { meta.push($(this).text().replace("\uFF1A", ":")); }); metaInfo = meta.join("\xA0\xA0\xA0"); subtitle = $("#top").next("h3").text(); } if (CURRENT_SITE_NAME === "OurBits") { siteImdbUrl = $(".imdbnew2 a:first").attr("href"); TORRENT_INFO.doubanUrl = $("#doubaninfo .doubannew a").attr("href"); if (TORRENT_INFO.doubanUrl) { const doubanInfo = getFilterBBCode((_h = $(".doubannew2 .doubaninfo")) == null ? void 0 : _h[0]); const doubanPoster = `[img]${$("#doubaninfo .doubannew a img").attr("src")}[/img] `; TORRENT_INFO.doubanInfo = doubanPoster + doubanInfo; } } if (CURRENT_SITE_NAME === "KEEPFRDS") { [title, subtitle] = [subtitle, title]; siteImdbUrl = $("#kimdb .imdbwp__link").attr("href"); TORRENT_INFO.doubanUrl = $("#kdouban .imdbwp__link").attr("href"); const element = document.createElement("div"); $(element).html($("#outer td").has("#kdescr").html()); descriptionBBCode = getFilterBBCode(element); } if (CURRENT_SITE_NAME === "SSD") { TORRENT_INFO.doubanUrl = $(".douban_info a:contains('://movie.douban.com/subject/')").attr("href"); const doubanInfo = getFilterBBCode((_i = $(".douban-info artical")) == null ? void 0 : _i[0]); const postUrl = (_k = (_j = $("#kposter").find("img")) == null ? void 0 : _j.attr("src")) != null ? _k : ""; const doubanPoster = postUrl ? `[img]${postUrl} [/img] ` : ""; TORRENT_INFO.doubanInfo = doubanPoster + (doubanInfo == null ? void 0 : doubanInfo.replace(/\n{2,}/g, "\n")); if (descriptionBBCode === "" || descriptionBBCode === void 0) { let extraTextInfo = getFilterBBCode((_l = $(".torrent-extra-text-container .extra-text")) == null ? void 0 : _l[0]); extraTextInfo = extraTextInfo ? ` [quote]${extraTextInfo}[/quote] ` : ""; const extraScreenshotDom = $(".screenshot").find("img"); const imgs = []; if (extraScreenshotDom) { extraScreenshotDom.each((index, item) => { imgs.push(`[img]${$(item).attr("src").trim()}[/img]`); }); } const extraScreenshot = imgs.join(""); const mediaInfo2 = $("section[data-group='mediainfo'] .codemain").text(); const extraMediaInfo = ` [quote]${mediaInfo2}[/quote] `; TORRENT_INFO.mediaInfo = mediaInfo2; descriptionBBCode = extraTextInfo + extraMediaInfo + extraScreenshot; } siteImdbUrl = $(".douban_info a:contains('://www.imdb.com/title/')").attr("href"); } if (CURRENT_SITE_NAME === "LemonHD") { metaInfo += $("td.rowhead:contains('\u8BE6\u7EC6\u4FE1\u606F')").next().text().replace(/:/g, ":"); if (metaInfo.match(/分辨率:/) === null) { metaInfo = metaInfo.replace("\u5206\u8FA8\u7387", "\u5206\u8FA8\u7387:"); } } const year = title.match(/(19|20)\d{2}/g); const {category, videoType, videoCodec, audioCodec, resolution, processing, size} = getMetaInfo(metaInfo); TORRENT_INFO.sourceSite = CURRENT_SITE_NAME; TORRENT_INFO.sourceSiteType = CURRENT_SITE_INFO.siteType; const doubanUrl = (_m = descriptionBBCode.match(/https:\/\/((movie|book)\.)?douban.com\/subject\/\d+/)) == null ? void 0 : _m[0]; if (doubanUrl) { TORRENT_INFO.doubanUrl = doubanUrl; } const imdbUrl = (_n = descriptionBBCode.match(/http(s)?:\/\/www.imdb.com\/title\/tt\d+/)) == null ? void 0 : _n[0]; if (imdbUrl) { TORRENT_INFO.imdbUrl = imdbUrl; } else if (siteImdbUrl) { TORRENT_INFO.imdbUrl = siteImdbUrl.match(/www.imdb.com\/title/) ? siteImdbUrl : ""; } TORRENT_INFO.year = year ? year.pop() : ""; TORRENT_INFO.title = title; TORRENT_INFO.subtitle = subtitle; TORRENT_INFO.description = descriptionBBCode; const originalName = (_p = (_o = descriptionBBCode.match(/(片\s+名)\s+(.+)?/)) == null ? void 0 : _o[2]) != null ? _p : ""; const translateName = (_r = (_q = descriptionBBCode.match(/(译\s+名)\s+(.+)/)) == null ? void 0 : _q[2]) != null ? _r : ""; if (!originalName.match(/[\u4e00-\u9fa5]+/)) { TORRENT_INFO.movieName = originalName; } else { TORRENT_INFO.movieName = (_u = (_t = (_s = translateName.match(/(\w|\s){2,}/)) == null ? void 0 : _s[0]) == null ? void 0 : _t.trim()) != null ? _u : ""; } const fullInformation = $("#top").text() + subtitle + descriptionBBCode; const isForbidden = fullInformation.match(/独占|禁转|严禁转载|谢绝转载|exclusive/); TORRENT_INFO.isForbidden = !!isForbidden; if (!processing || processing.match(/raw|encode/)) { const areaMatch = (_v = descriptionBBCode.match(/(产\s+地|国\s+家)】?\s*(.+)/)) == null ? void 0 : _v[2]; if (areaMatch) { TORRENT_INFO.area = getAreaCode(areaMatch); } } else { TORRENT_INFO.area = getAreaCode(processing); } const specificCategory = getPreciseCategory(TORRENT_INFO, getCategory2(category || descriptionBBCode)); TORRENT_INFO.category = specificCategory; TORRENT_INFO.videoType = getVideoType5(videoType || TORRENT_INFO.title); TORRENT_INFO.source = getSourceFromTitle(TORRENT_INFO.title); TORRENT_INFO.size = size ? getSize(size) : ""; TORRENT_INFO.screenshots = getScreenshotsFromBBCode(descriptionBBCode); TORRENT_INFO.tags = getTagsFromSubtitle(TORRENT_INFO.subtitle); if (CURRENT_SITE_NAME.match(/beitai/i)) { if (descriptionBBCode.match(/VIDEO\s*(\.)?CODEC/i)) { const matchCodec = (_w = descriptionBBCode.match(/VIDEO\s*(\.)?CODEC\.*:?\s*([^\s_,]+)?/i)) == null ? void 0 : _w[2]; if (matchCodec) { let videoCodec2 = matchCodec.replace(/\.|-/g, "").toLowerCase(); videoCodec2 = videoCodec2.match(/hevc/i) ? "x265" : videoCodec2; videoCodec2 = videoCodec2.match(/mpeg4/i) ? "x264" : videoCodec2; TORRENT_INFO.videoCodec = videoCodec2; } } } else { TORRENT_INFO.videoCodec = getVideoCodecFromTitle(TORRENT_INFO.title || videoCodec, TORRENT_INFO.videoType); } TORRENT_INFO.resolution = getResolution2(resolution || TORRENT_INFO.title); TORRENT_INFO.audioCodec = getAudioCodecFromTitle(audioCodec || TORRENT_INFO.title); const isBluray = TORRENT_INFO.videoType.match(/bluray/i); const {bdinfo, mediaInfo} = getBDInfoOrMediaInfo2(descriptionBBCode); const mediaInfoOrBDInfo = isBluray ? bdinfo : TORRENT_INFO.mediaInfo || mediaInfo; if (mediaInfoOrBDInfo) { TORRENT_INFO.mediaInfo = mediaInfoOrBDInfo; const getInfoFunc = isBluray ? getInfoFromBDInfo : getInfoFromMediaInfo; const {videoCodec: videoCodec2, audioCodec: audioCodec2, resolution: resolution2, mediaTags} = getInfoFunc(mediaInfoOrBDInfo); if (videoCodec2 !== "" && audioCodec2 !== "" && resolution2 !== "") { TORRENT_INFO.videoCodec = videoCodec2; TORRENT_INFO.audioCodec = audioCodec2; TORRENT_INFO.resolution = resolution2; TORRENT_INFO.tags = __assign(__assign({}, TORRENT_INFO.tags), mediaTags); } } if (CURRENT_SITE_INFO === "TCCF") { TORRENT_INFO.format = getFormat2(videoType); } else { TORRENT_INFO.format = getFormat2($("#top").text() + subtitle); } }; var getMetaInfo = (metaInfo) => { let resolutionKey = "\u5206\u8FA8\u7387|\u89E3\u6790\u5EA6|\u683C\u5F0F"; let videoTypeKey = "\u5A92\u4ECB|\u6765\u6E90|\u8D28\u91CF"; if (CURRENT_SITE_NAME === "SSD") { resolutionKey = "\u5206\u8FA8\u7387|\u89E3\u6790\u5EA6"; videoTypeKey = "\u683C\u5F0F"; } if (CURRENT_SITE_NAME.match(/TLF|HDAI|HDHome/i)) { videoTypeKey = "\u5A92\u4ECB"; } const category = getMetaValue("\u7C7B\u578B|\u5206\u7C7B|\u985E\u5225", metaInfo); const videoType = getMetaValue(videoTypeKey, metaInfo); const videoCodec = getMetaValue("\u7F16\u7801|\u7DE8\u78BC", metaInfo); const audioCodec = getMetaValue("\u97F3\u9891|\u97F3\u9891\u7F16\u7801", metaInfo); const resolution = getMetaValue(resolutionKey, metaInfo); const processing = getMetaValue("\u5904\u7406|\u8655\u7406|\u5730\u533A", metaInfo); const size = getMetaValue("\u5927\u5C0F", metaInfo); console.log({ category, videoType, videoCodec, audioCodec, resolution, processing, size }); return { category, videoType, videoCodec, audioCodec, resolution, processing, size }; }; var getMetaValue = (key, metaInfo) => { var _a; let regStr = `(${key}):\\s?([^\u4E00-\u9FA5]+)?`; if (key.match(/大小/)) { regStr = `(${key}):\\s?((\\d|\\.)+\\s+(G|M|T|K)(i)?B)`; } if (CURRENT_SITE_NAME.match(/KEEPFRDS|TJUPT|PTSBAO|PTHome|HDTime|BTSCHOOL|TLF|HDAI|SoulVoice/) && key.match(/类型/)) { regStr = `(${key}):\\s?([^\\s]+)?`; } if (CURRENT_SITE_NAME === "PTer" && key.match(/类型|地区/)) { regStr = `(${key}):\\s?([^\\s]+)?`; } if (CURRENT_SITE_NAME === "HDSky" && key.match(/类型/)) { regStr = `(${key}):\\s?.+?/([^\\s]+)?`; } if (CURRENT_SITE_NAME === "TCCF" && key.match(/类型/)) { regStr = `(${key}):(.+?)\\s{2,}`; } const reg = new RegExp(regStr); const matchValue = (_a = metaInfo.match(reg, "i")) == null ? void 0 : _a[2]; if (matchValue) { return matchValue.replace(/\s/g, "").trim().toLowerCase(); } }; var getVideoType5 = (videoType) => { if (!videoType) { return ""; } videoType = videoType.replace(/[.-]/g, "").toLowerCase(); if (videoType.match(/encode|x264|x265|bdrip|hdrip/ig)) { return "encode"; } else if (videoType.match(/remux/ig)) { return "remux"; } else if (videoType.match(/uhd|ultra/ig)) { return "uhdbluray"; } else if (videoType.match(/blu/ig)) { return "bluray"; } else if (videoType.match(/webdl/ig)) { return "web"; } else if (videoType.match(/hdtv/ig)) { return "hdtv"; } else if (videoType.match(/dvdr/ig)) { return "dvdrip"; } else if (videoType.match(/dvd/ig)) { return "dvd"; } return ""; }; var getCategory2 = (category) => { if (!category) { return ""; } category = category.replace(/[.-]/g, "").toLowerCase(); if (category.match(/movie|bd|ultra|电影/ig)) { return "movie"; } else if (category.match(/综艺/ig)) { return "variety"; } else if (category.match(/tv|drama|剧集|电视/ig)) { return "tv"; } else if (category.match(/TVSeries/ig)) { return "tvPack"; } else if (category.match(/document|纪录|紀錄|Doc/ig)) { return "documentary"; } else if (category.match(/sport|体育/ig)) { return "sport"; } else if (category.match(/mv|演唱|concert/ig)) { return "concert"; } else if (category.match(/anim|动(画|漫)/ig)) { return "cartoon"; } else if (category.match(/App|软件|Software|軟體/ig)) { return "app"; } else if (category.match(/电子书|小说|Ebook/ig)) { return "ebook"; } else if (category.match(/有声书|AudioBook/ig)) { return "audiobook"; } else if (category.match(/杂志|magazine/ig)) { return "magazine"; } else if (category.match(/漫画|comics/ig)) { return "comics"; } else if (category.match(/公开课/ig)) { return "onlineCourse"; } else if (category.match(/资料/ig)) { return "ebook"; } return ""; }; var getResolution2 = (resolution) => { resolution = resolution === void 0 ? "" : resolution.toLowerCase(); if (resolution.match(/4k|2160|UHD/ig)) { return "2160p"; } else if (resolution.match(/1080(p)?/ig)) { return "1080p"; } else if (resolution.match(/1080i/ig)) { return "1080i"; } else if (resolution.match(/720(p)?/ig)) { return "720p"; } else if (resolution.match(/sd/ig)) { return "480p"; } return resolution; }; var getFormat2 = (data) => { if (data.match(/pdf/i)) { return "pdf"; } else if (data.match(/EPUB/i)) { return "epub"; } else if (data.match(/MOBI/i)) { return "mobi"; } else if (data.match(/mp3/i)) { return "mp3"; } else if (data.match(/mp4/i)) { return "mp4"; } else if (data.match(/txt/i)) { return "txt"; } else if (data.match(/azw3/i)) { return "azw3"; } else if (data.match(/镜像/i)) { return "iso"; } return "other"; }; // src/source/hdt.js var hdt_default = () => { var _a, _b, _c, _d, _e; const title = document.title.replace(/HD-Torrents.org\s*-/ig, "").trim(); const imdbInfoDom = $("#IMDBDetailsInfoHideShowTR .imdbnew2"); const imdbUlrDom = imdbInfoDom.find(">a"); const imdbUrl = imdbUlrDom.attr("href"); const movieName = imdbUlrDom.text(); const year = (_b = (_a = imdbInfoDom.text().match(/Year:\s*(\d{4})/)) == null ? void 0 : _a[1]) != null ? _b : ""; const country = (_d = (_c = imdbInfoDom.text().match(/Country:\s*([^\n]+)/)) == null ? void 0 : _c[1]) != null ? _d : ""; const {Category, Size, Genre} = getBasicInfo4(); let tags = getTagsFromSubtitle(title); let category = Category.toLowerCase().split(/\s|\//)[0]; category = Genre.match(/Animation/i) ? "cartoon" : category; const videoType = getVideoType6(Category, title); const source = getSourceFromTitle(title); let resolution = (_e = title.match(/\d{3,4}(p|i)/i)) == null ? void 0 : _e[0]; if (!resolution && resolution.match(/4k|uhd/i)) { resolution = "2160p"; } TORRENT_INFO.videoCodec = getVideoCodecFromTitle(title); TORRENT_INFO.audioCodec = getAudioCodecFromTitle(title); const descriptionDom = $("#technicalInfoHideShowTR"); let descriptionBBCode = getFilterBBCode(descriptionDom[0]); descriptionBBCode = descriptionBBCode.replace(/\[center\]((?:.|\n)+?)\[\/center\]/g, (match, p1) => { if (p1.match(/(keep seeding)|(spank your ass)/)) { return ""; } else { return match; } }); const isBluray = videoType.match(/bluray/i); const {bdinfo, mediaInfo} = getBDInfoOrMediaInfo2(descriptionBBCode); const mediaInfoOrBDInfo = isBluray ? bdinfo : TORRENT_INFO.mediaInfo || mediaInfo; if (mediaInfoOrBDInfo) { TORRENT_INFO.mediaInfo = mediaInfoOrBDInfo; const getInfoFunc = isBluray ? getInfoFromBDInfo : getInfoFromMediaInfo; const {videoCodec, audioCodec, resolution: mediaResolution, mediaTags} = getInfoFunc(mediaInfoOrBDInfo); if (videoCodec !== "" && audioCodec !== "" && resolution !== "") { TORRENT_INFO.videoCodec = videoCodec; TORRENT_INFO.audioCodec = audioCodec; resolution = mediaResolution; tags = __assign(__assign({}, tags), mediaTags); } } TORRENT_INFO.sourceSite = CURRENT_SITE_NAME; TORRENT_INFO.sourceSiteType = CURRENT_SITE_INFO.siteType; TORRENT_INFO.title = formatTorrentTitle(title); TORRENT_INFO.year = year; TORRENT_INFO.movieName = movieName; TORRENT_INFO.source = source; TORRENT_INFO.area = getAreaCode(country); TORRENT_INFO.size = getSize(Size); TORRENT_INFO.videoType = videoType; TORRENT_INFO.resolution = resolution; TORRENT_INFO.tags = tags; TORRENT_INFO.imdbUrl = imdbUrl; TORRENT_INFO.description = descriptionBBCode; TORRENT_INFO.category = getPreciseCategory(TORRENT_INFO, category); TORRENT_INFO.screenshots = getScreenshotsFromBBCode(descriptionBBCode); }; var getBasicInfo4 = () => { const basicInfo = {}; $(".detailsleft").each((index, element) => { const key = $(element).text().replace(/:/g, "").trim(); const value = $(element).next("td").text(); if (value) { basicInfo[key] = value.replace(/\n/g, "").trim(); } }); return basicInfo; }; var getVideoType6 = (type, title) => { if (type.match(/Remux/i)) { return "remux"; } else if (type.match(/UHD\/Blu-Ray/i)) { return "uhdbluray"; } else if (type.match(/Blu-Ray/i)) { return "bluray"; } if (title.match(/HDTV/i)) { return "hdtv"; } else if (title.match(/web(-)*(dl|rip)/i)) { return "web"; } else if (title.match(/dvdrip/i)) { return "dvdrip"; } else if (title.match(/x264|x265/i)) { return "encode"; } return ""; }; // src/source/kg.js var kg_default = () => { var _a, _b, _c, _d, _e, _f, _g, _h, _i; const {InternetLink, Year, Type, Genres, Source, Size, Filename = "", RipSpecs = "", Subtitles, "Language(s)": language} = getBasicInfo5(); const torrentFileDom = getBasicInfoDom("Download").find("a.index"); const torrentFileName = torrentFileDom.text().replace(/\.torrent$/, ""); const fileName = Filename.replace(/\.\w+$/, ""); const title = formatTorrentTitle(fileName || torrentFileName); const imdbUrl = InternetLink.match(/imdb/) ? InternetLink : ""; const [movieName, movieAkaName = ""] = (_a = $(".outer h1").text().split("- ")) == null ? void 0 : _a[1].replace(/\(\d+\)/, "").trim().split(/AKA/i); const country = $(".outer h1 img").attr("alt"); const year = Year; const size = (_b = Size.match(/\((.+?)\)/)) == null ? void 0 : _b[1].replace(/,|(bytes)/g, ""); let tags = getTagsFromSubtitle(title); if (Subtitles.match(/Chinese/i)) { tags.chineseSubtitle = true; } if (language.match(/Chinese|Mandarin/i)) { tags.chineseAudio = true; } if (language.match(/Cantonese/)) { tags.cantoneseAudio = true; } let category = Type.toLowerCase(); category = Genres.match(/Animation/i) ? "cartoon" : category; const mediaInfo = $("div.mediainfo").text(); let source = Source.replace(/-/g, "").toLowerCase(); if (source === "tv") { source = "hdtv"; } let genreVideoType = (_e = (_d = (_c = getBasicInfoDom("Genres").find("tr td>img").attr("src")) == null ? void 0 : _c.match(/genreimages\/(\w+)\.\w+/)) == null ? void 0 : _d[1]) != null ? _e : ""; genreVideoType = RipSpecs.match(/DVD\sFormat/) ? "dvdr" : genreVideoType; const videoType = getVideoType7(title, source, genreVideoType, !!mediaInfo); let resolution = (_g = (_f = title.match(/\d{3,4}(p|i)/i)) == null ? void 0 : _f[0]) != null ? _g : ""; if (!resolution && resolution.match(/4k|uhd/i)) { resolution = "2160p"; } TORRENT_INFO.videoCodec = getVideoCodecFromTitle(title); TORRENT_INFO.audioCodec = getAudioCodecFromTitle(title); if (genreVideoType === "dvdr" && RipSpecs) { TORRENT_INFO.videoCodec = "mpeg2"; const audioCodec = (_i = (_h = RipSpecs.match(/DVD\sAudio:(.+)/)) == null ? void 0 : _h[1]) != null ? _i : ""; TORRENT_INFO.audioCodec = getAudioCodecFromTitle(audioCodec); resolution = "480p"; } const descriptionDom = getBasicInfoDom("Description"); let descriptionBBCode = getFilterBBCode(descriptionDom.find("article")[0]); descriptionBBCode = descriptionBBCode.replace(/(.|\n)+?_{5,}/g, ""); const isBluray = videoType.match(/bluray/i); const {bdinfo} = getBDInfoOrMediaInfo2(descriptionBBCode); const mediaInfoOrBDInfo = isBluray ? bdinfo : mediaInfo; if (mediaInfoOrBDInfo) { TORRENT_INFO.mediaInfo = mediaInfoOrBDInfo; const getInfoFunc = isBluray ? getInfoFromBDInfo : getInfoFromMediaInfo; const {videoCodec, audioCodec, resolution: mediaResolution, mediaTags} = getInfoFunc(mediaInfoOrBDInfo); if (videoCodec !== "" && audioCodec !== "" && mediaResolution !== "") { TORRENT_INFO.videoCodec = videoCodec; TORRENT_INFO.audioCodec = audioCodec; resolution = mediaResolution; tags = __assign(__assign({}, tags), mediaTags); } } TORRENT_INFO.sourceSite = CURRENT_SITE_NAME; TORRENT_INFO.sourceSiteType = CURRENT_SITE_INFO.siteType; TORRENT_INFO.title = formatTorrentTitle(title); TORRENT_INFO.year = year; TORRENT_INFO.movieName = movieName.trim(); TORRENT_INFO.movieAkaName = movieAkaName.trim(); TORRENT_INFO.source = source; TORRENT_INFO.size = size; TORRENT_INFO.videoType = videoType; TORRENT_INFO.resolution = resolution; TORRENT_INFO.tags = tags; TORRENT_INFO.imdbUrl = imdbUrl; TORRENT_INFO.area = getAreaCode(country); TORRENT_INFO.description = descriptionBBCode; TORRENT_INFO.category = getPreciseCategory(TORRENT_INFO, category); TORRENT_INFO.screenshots = getScreenshotsFromBBCode(descriptionBBCode); }; var getBasicInfo5 = () => { const basicInfo = {}; $(".outer h1~table:first>tbody>tr").each((index, element) => { const key = $(element).find("td.heading").text().replace(/\s/g, ""); const value = $(element).find("td.heading").next("td").text(); if (value) { basicInfo[key] = value.replace(/\n/g, "").trim(); } }); return basicInfo; }; var getVideoType7 = (title, source, genreVideoType, hasMediainfo) => { if (source) { if (source === "bluray") { const blurayFlag = genreVideoType === "bluray" || !hasMediainfo; return blurayFlag ? "bluray" : "encode"; } else if (source === "dvd") { const dvdFlag = genreVideoType === "dvdr" || !hasMediainfo; return dvdFlag ? "dvd" : "dvdrip"; } else { return source; } } if (title.match(/UHD/i) && title.match(/Blu-Ray/i)) { return "uhdbluray"; } else if (title.match(/Blu-Ray/i)) { return "bluray"; } else if (title.match(/HDTV/i)) { return "hdtv"; } else if (title.match(/web(-)*(dl|rip)/i)) { return "web"; } else if (title.match(/dvdrip/i)) { return "dvdrip"; } else if (title.match(/x264|x265/i)) { return "encode"; } return ""; }; var getBasicInfoDom = (key) => { return $(`.outer h1~table:first>tbody>tr td:contains(${key})`).next("td"); }; // src/source/uhd.js var uhd_default = () => { var _a, _b, _c, _d, _e, _f; const torrentId = getUrlParam("torrentid"); if (!torrentId) { return false; } const torrentFilePathDom = $(`#files_${torrentId} .filelist_path`); const torrentFileDom = $(`#files_${torrentId} .filelist_table>tbody>tr:nth-child(2) td`).eq(0); const torrentFileName = ((_a = torrentFilePathDom.text()) == null ? void 0 : _a.replace(/\//g, "")) || ((_b = torrentFileDom.text()) == null ? void 0 : _b.replace(/\.(mkv|mp4|avi|mpg|ts|iso)$/i, "")); const title = formatTorrentTitle(torrentFileName); const imdbUrl = $(".imovie_title .tooltip.imdb_icon").attr("href"); const poster = $(".imdb_block.poster_box .imgbox img").attr("src"); const titleText = $("#scontent h2").text(); const [movieName = "", movieAkaName = ""] = (_d = (_c = titleText.match(/(.+?)\[/)) == null ? void 0 : _c[1].split("/")) != null ? _d : []; const year = (_f = (_e = titleText.match(/\[(\d+)\]/)) == null ? void 0 : _e[1]) != null ? _f : ""; let tags = getTagsFromSubtitle(title); const source = getSourceFromTitle(title); const category = title.match(/Season\s+\d+/) ? "tv" : "movie"; const size = getSize($(`#torrent${torrentId} td`).eq(1).text()); const infoArray = $(`#torrent${torrentId} td:first-child>a`).text().replace(/\s/g, "").split("/"); let [resolution, videoType] = infoArray; videoType = getVideoType8(videoType, resolution); TORRENT_INFO.videoCodec = getVideoCodecFromTitle(title); TORRENT_INFO.audioCodec = getAudioCodecFromTitle(title); const descriptionDom = $(`#torrent_${torrentId} #description`); let descriptionBBCode = getFilterBBCode(descriptionDom[0]); getMediaInfo2(torrentId).then((data) => { if (data) { TORRENT_INFO.mediaInfo = data; descriptionBBCode += ` [quote]${data}[/quote]`; TORRENT_INFO.description = descriptionBBCode; TORRENT_INFO.screenshots = getScreenshotsFromBBCode(descriptionBBCode); TORRENT_INFO.category = getPreciseCategory(TORRENT_INFO, category); const isBluray = videoType.match(/bluray/i); const getInfoFunc = isBluray ? getInfoFromBDInfo : getInfoFromMediaInfo; const {videoCodec, audioCodec, mediaTags, resolution: mediaResolution} = getInfoFunc(data); if (resolution === "mHD" && mediaResolution) { resolution = mediaResolution; } if (videoCodec !== "" && audioCodec !== "") { TORRENT_INFO.videoCodec = videoCodec; TORRENT_INFO.audioCodec = audioCodec; tags = __assign(__assign({}, tags), mediaTags); } } TORRENT_INFO.tags = tags; TORRENT_INFO.resolution = resolution; console.log(TORRENT_INFO); }); TORRENT_INFO.sourceSite = CURRENT_SITE_NAME; TORRENT_INFO.sourceSiteType = CURRENT_SITE_INFO.siteType; TORRENT_INFO.title = title; TORRENT_INFO.year = year; TORRENT_INFO.poster = poster; TORRENT_INFO.movieName = movieName.trim(); TORRENT_INFO.movieAkaName = movieAkaName.trim(); TORRENT_INFO.source = source; TORRENT_INFO.size = size; TORRENT_INFO.imdbUrl = imdbUrl; TORRENT_INFO.videoType = videoType; }; var getMediaInfo2 = (torrentId) => { return new Promise((resolve, reject) => { GM_xmlhttpRequest({ method: "GET", url: `https://uhdbits.org/torrents.php?action=mediainfo&id=${torrentId}`, onload(res) { const data = res.responseText; if (res.status !== 200 || !data) { reject(new Error($t("\u8BF7\u6C42\u5931\u8D25"))); } resolve(data.replace(/\r\n/g, "\n")); } }); }); }; var getVideoType8 = (videoType, resolution) => { videoType = videoType.replace("-", "").toLowerCase(); if (videoType.match(/bluray/)) { if (resolution === "2160p") { return "uhdbluray"; } } else if (videoType.match(/web/)) { return "web"; } else if (videoType.match(/x264|x265/)) { return "encode"; } else if (videoType.match(/x264|x265/)) { return "encode"; } else if (videoType.match(/WEB/i)) { return "web"; } return videoType; }; // src/source/index.js var getTorrentInfo = void 0; if (CURRENT_SITE_INFO.siteType === "NexusPHP") { getTorrentInfo = nexusphp_default; } else if (CURRENT_SITE_NAME === "BeyondHD") { getTorrentInfo = bhd_default; } else if (CURRENT_SITE_NAME === "HDBits") { getTorrentInfo = hdb_default; } else if (CURRENT_SITE_NAME === "TTG") { getTorrentInfo = ttg_default; } else if (CURRENT_SITE_INFO.siteType === "UNIT3D") { getTorrentInfo = unit3d_default; } else if (CURRENT_SITE_NAME === "HDT") { getTorrentInfo = hdt_default; } else if (CURRENT_SITE_NAME === "KG") { getTorrentInfo = kg_default; } else if (CURRENT_SITE_NAME === "UHDBits") { getTorrentInfo = uhd_default; } else if (CURRENT_SITE_NAME === "PTP") { getTorrentInfo = ptp_default; } var source_default = getTorrentInfo; // src/site-dom/main.js var getSearchList = () => { const searchSitesEnabled = GM_getValue("easy-seed.enabled-search-site-list") === void 0 ? [] : JSON.parse(GM_getValue("easy-seed.enabled-search-site-list")); const siteFaviconClosed = GM_getValue("easy-seed.site-favicon-closed") === void 0 ? "" : GM_getValue("easy-seed.site-favicon-closed"); const searchList = SORTED_SITE_KEYS.map((siteName) => { const siteInfo = PT_SITE[siteName]; if (siteInfo.search) { const searchConfig = siteInfo.search; const {params = {}, imdbOptionKey, nameOptionKey, path, replaceKey} = searchConfig; let imdbId = getIMDBIdByUrl(TORRENT_INFO.imdbUrl); let searchKeyWord = ""; const {movieAkaName, movieName, title} = TORRENT_INFO; if (imdbId && !siteName.match(/nzb|HDF|bB|TMDB|豆瓣读书/)) { if (replaceKey) { searchKeyWord = imdbId.replace(replaceKey[0], replaceKey[1]); } else { searchKeyWord = imdbId; } } else { searchKeyWord = movieAkaName || movieName || title; imdbId = ""; } let searchParams = Object.keys(params).map((key) => { return `${key}=${params[key]}`; }).join("&"); if (imdbId) { searchParams = searchParams.replace(/\w+={name}&{0,1}?/, "").replace(/{imdb}/, searchKeyWord).replace(/{optionKey}/, imdbOptionKey); } else { if (searchParams.match(/{name}/)) { searchParams = searchParams.replace(/\w+={imdb}&{0,1}?/, "").replace(/{name}/, searchKeyWord); } else { searchParams = searchParams.replace(/{imdb}/, searchKeyWord); } searchParams = searchParams.replace(/{optionKey}/, nameOptionKey); } if (searchSitesEnabled.length === 0 || searchSitesEnabled.includes(siteName)) { let url = `${siteInfo.url + path}${searchParams ? `?${searchParams}` : ""}`; if (siteName.match(/nzb|TMDB|豆瓣读书/)) { url = url.replace(/{name}/, searchKeyWord); } const favIcon = siteFaviconClosed === "" && PT_SITE[siteName].icon ? PT_SITE[siteName].icon : ""; return `
  • ${favIcon} ${siteName} |
  • `; } } return ""; }); return searchList; }; var getFunctionItems = () => { const doubanSearchDom = CURRENT_SITE_INFO.needDoubanBookInfo || CURRENT_SITE_INFO.needDoubanInfo ? `
    ` : ""; const transferImgClosed = GM_getValue("easy-seed.transfer-img-closed") === void 0 ? "" : GM_getValue("easy-seed.transfer-img-closed"); const doubanDom = CURRENT_SITE_INFO.needDoubanInfo ? `${doubanSearchDom}
    ` : ""; const doubanBookDom = CURRENT_SITE_INFO.needDoubanBookInfo ? `${doubanSearchDom}
    ` : ""; const transferDom = transferImgClosed ? "" : `
    `; return doubanDom || transferDom || doubanSearchDom ? `
    ${doubanDom} ${doubanBookDom} ${transferDom}
    ` : ""; }; var createSeedDom = (torrentDom, titleDom = "", searchListDom = "") => { var _a, _b; const targetSitesEnabled = GM_getValue("easy-seed.enabled-target-sites") === void 0 ? [] : JSON.parse(GM_getValue("easy-seed.enabled-target-sites")); const siteFaviconClosed = GM_getValue("easy-seed.site-favicon-closed") === void 0 ? "" : GM_getValue("easy-seed.site-favicon-closed"); const siteList = SORTED_SITE_KEYS.map((siteName, index) => { const {url, uploadPath} = PT_SITE[siteName]; const favIcon = siteFaviconClosed === "" && PT_SITE[siteName].icon ? PT_SITE[siteName].icon : ""; if (PT_SITE[siteName].asTarget) { if (targetSitesEnabled.length === 0 || targetSitesEnabled.includes(siteName)) { return `
  • ${favIcon} ${siteName} |
  • `; } } return ""; }); const gazelleSearchListDom = (_b = (_a = searchListDom.match(//)) == null ? void 0 : _a[0]) == null ? void 0 : _b.replace(/()/, `$1

    ${$t("\u5FEB\u901F\u68C0\u7D22")}

    `); const seedDom = `
      ${CURRENT_SITE_INFO.siteType === "gazelle" ? titleDom : ""}
      ${siteList.join("")}
    ${CURRENT_SITE_INFO.siteType === "gazelle" ? `${getFunctionItems()}
    ${gazelleSearchListDom}
    ` : ""}
    `; torrentDom.prepend(seedDom); }; var insertTorrentPage = () => { let torrentInsertDom = $(CURRENT_SITE_INFO.seedDomSelector); const searchList = getSearchList(); const searchListDom = `

    ${$t("\u5FEB\u901F\u68C0\u7D22")}

      ${searchList.join("")}
    `; const functionItems = getFunctionItems(); const functionDom = functionItems ? `

    ${$t("\u5FEB\u6377\u64CD\u4F5C")}

    ${functionItems} ` : ""; const easySeedTitleDom = `

    ${$t("\u4E00\u952E\u8F6C\u79CD")}

    `; if (CURRENT_SITE_INFO.siteType === "NexusPHP" || CURRENT_SITE_NAME.match(/BeyondHD|TTG|Blutopia|HDPOST|Aither|ACM|KG|iTS/)) { const trDom = ` ${easySeedTitleDom} ${functionDom} ${searchListDom} `; torrentInsertDom.after(trDom); torrentInsertDom = $(".easy-seed-td"); } else if (CURRENT_SITE_NAME === "HDT") { const trDom = ` ${easySeedTitleDom} ${functionDom} ${searchListDom} `; torrentInsertDom.after(trDom); torrentInsertDom = $(".easy-seed-td"); } else if (CURRENT_SITE_NAME === "HDBits") { const trDom = ` ${easySeedTitleDom} ${functionDom.replace(/<\/?tr>/g, "")} ${searchListDom} `; torrentInsertDom.after(trDom); torrentInsertDom = $(".easy-seed-td"); } else if (CURRENT_SITE_NAME === "PTP") { const torrentId = getUrlParam("torrentid"); torrentInsertDom = $(`#torrent_${torrentId} >td`); } else if (CURRENT_SITE_NAME === "UHDBits") { const torrentId = getUrlParam("torrentid"); $(`#torrent_${torrentId} >td`).prepend(document.createElement("blockquote")); torrentInsertDom = $(`#torrent_${torrentId} >td blockquote:first`); } createSeedDom(torrentInsertDom, easySeedTitleDom, searchListDom); }; // src/site-dom/quick-search.js var filterBluTorrent = (imdb = "", name = "") => { if (imdb) { $("#imdb").val(imdb); } else if (name) { $("#search").val(name); } const token = $('meta[name="csrf_token"]').attr("content"); GM_xmlhttpRequest({ method: "GET", url: `${CURRENT_SITE_INFO.url}/torrents/filter?search=${name}&imdb=${imdb}&_token=${token}&sorting=size&direction=desc`, onload(res) { $("#facetedSearch").html(res.responseText); } }); }; var fillSearchImdb = () => { const imdbParam = getUrlParam("imdb"); const nameParam = getUrlParam("name"); const searchType = getUrlParam("search_area"); if (imdbParam || nameParam) { if (CURRENT_SITE_INFO.siteType === "UNIT3D") { filterBluTorrent(imdbParam, nameParam); } else if (CURRENT_SITE_NAME === "Bdc") { $("#tsstac").val(imdbParam); $("#search_type").val(searchType); } else if (CURRENT_SITE_NAME === "HDAI") { $('input[name="keyword"]').val(imdbParam || nameParam); $('select[name="keyword_area"]').val(searchType); } } }; // src/site-dom/setting-panel.js var openSettingPanel = () => { const targetSitesEnabled = GM_getValue("easy-seed.enabled-target-sites") === void 0 ? [] : JSON.parse(GM_getValue("easy-seed.enabled-target-sites")); const batchSeedSiteEnabled = GM_getValue("easy-seed.enabled-batch-seed-sites") === void 0 ? [] : JSON.parse(GM_getValue("easy-seed.enabled-batch-seed-sites")); const searchSitesEnabled = GM_getValue("easy-seed.enabled-search-site-list") === void 0 ? [] : JSON.parse(GM_getValue("easy-seed.enabled-search-site-list")); const transferImgClosed = GM_getValue("easy-seed.transfer-img-closed") === void 0 ? "" : GM_getValue("easy-seed.transfer-img-closed"); const siteFaviconClosed = GM_getValue("easy-seed.site-favicon-closed") === void 0 ? "" : GM_getValue("easy-seed.site-favicon-closed"); const ptpImgApiKey = GM_getValue("easy-seed.ptp-img-api-key") === void 0 ? "" : GM_getValue("easy-seed.ptp-img-api-key"); const targetSiteList = SORTED_SITE_KEYS.map((siteName, index) => { if (PT_SITE[siteName].asTarget) { const checked = targetSitesEnabled.includes(siteName) ? "checked" : ""; return `
  • `; } return ""; }); const batchSeedSiteList = SORTED_SITE_KEYS.map((siteName, index) => { if (PT_SITE[siteName].asTarget) { const checked = batchSeedSiteEnabled.includes(siteName) ? "checked" : ""; return `
  • `; } return ""; }); const searchSiteList = SORTED_SITE_KEYS.map((siteName) => { const checked = searchSitesEnabled.includes(siteName) ? "checked" : ""; return `
  • `; }); const panelHtml = `

    ${$t("\u8F6C\u79CD\u7AD9\u70B9\u542F\u7528")}

      ${targetSiteList.join("")}

    ${$t("\u6279\u91CF\u8F6C\u79CD\u542F\u7528")}

    ${$t("\u4E00\u952E\u6279\u91CF\u8F6C\u53D1\u5230\u4EE5\u4E0B\u9009\u4E2D\u7684\u7AD9\u70B9")}
      ${batchSeedSiteList.join("")}

    ${$t("\u7AD9\u70B9\u641C\u7D22\u542F\u7528")}

      ${searchSiteList.join("")}

    ${$t("\u56FE\u5E8A\u914D\u7F6E")}

    ${$t("\u989D\u5916\u529F\u80FD\u5173\u95ED")}

    `; $("body").append(panelHtml); $("#easy-seed-setting-panel").on("click", "#save-setting-btn", () => { saveSetting(); }); $("#easy-seed-setting-panel").on("click", "#cancel-setting-btn", () => { $("#easy-seed-setting-panel").remove(); }); }; var saveSetting = () => { const targetSitesEnabled = []; const searchSitesEnabled = []; const batchSeedSiteEnabled = []; const transferImgEnabled = $("input[name='transfer-img-closed']").attr("checked") || ""; const siteFaviconEnabled = $("input[name='site-favicon-closed']").attr("checked") || ""; const ptpImgApiKey = $("input[name='ptp-img-api-key']").val(); $("input[name='target-site-enabled']:checked").each(function() { targetSitesEnabled.push($(this).val()); }); $("input[name='search-site-enabled']:checked").each(function() { searchSitesEnabled.push($(this).val()); }); $("input[name='batch-seed-site-enabled']:checked").each(function() { batchSeedSiteEnabled.push($(this).val()); }); console.log(targetSitesEnabled); try { GM_setValue("easy-seed.enabled-target-sites", JSON.stringify(targetSitesEnabled)); GM_setValue("easy-seed.enabled-search-site-list", JSON.stringify(searchSitesEnabled)); GM_setValue("easy-seed.enabled-batch-seed-sites", JSON.stringify(batchSeedSiteEnabled)); GM_setValue("easy-seed.transfer-img-closed", transferImgEnabled); GM_setValue("easy-seed.site-favicon-closed", siteFaviconEnabled); GM_setValue("easy-seed.ptp-img-api-key", ptpImgApiKey); $("#easy-seed-setting-panel").remove(); window.location.reload(); } catch (error) { showNotice({title: $t("\u9519\u8BEF"), text: $t("\u4FDD\u5B58\u672C\u5730\u7AD9\u70B9\u8BBE\u7F6E\u5931\u8D25")}); } }; var openBatchSeedTabs = () => { const batchSeedSiteEnabled = GM_getValue("easy-seed.enabled-batch-seed-sites") === void 0 ? [] : JSON.parse(GM_getValue("easy-seed.enabled-batch-seed-sites")); if (batchSeedSiteEnabled.length === 0) { showNotice({title: $t("\u9519\u8BEF"), text: $t("\u8BF7\u5148\u8BBE\u7F6E\u7FA4\u8F6C\u5217\u8868")}); return false; } const torrentInfo = encodeURIComponent(JSON.stringify(TORRENT_INFO)); SORTED_SITE_KEYS.forEach((siteName, index) => { const {url, uploadPath} = PT_SITE[siteName]; if (PT_SITE[siteName].asTarget) { if (batchSeedSiteEnabled.includes(siteName)) { GM_openInTab(url + uploadPath + "#torrentInfo=" + torrentInfo); } } }); showNotice({title: $t("\u6210\u529F"), text: $t("\u8F6C\u79CD\u9875\u9762\u5DF2\u6253\u5F00\uFF0C\u8BF7\u524D\u5F80\u5BF9\u5E94\u9875\u9762\u64CD\u4F5C")}); }; // src/site-dom/button-function.js var getThumbnailImgs = () => { const allImgs = TORRENT_INFO.screenshots.concat(TORRENT_INFO.comparisonImgs); const imgList = [...new Set(allImgs)]; if (imgList.length < 1) { throw new Error($t("\u83B7\u53D6\u56FE\u7247\u5217\u8868\u5931\u8D25")); } $("#img-transfer").text($t("\u8F6C\u6362\u4E2D...")).attr("disabled", true).addClass("is-disabled"); transferImgs(imgList.join("\n")).then((data) => { if (data.length) { const thumbnailImgs = data.map((imgData) => { return `[url=${imgData.show_url}][img]${imgData.th_url}[/img][/url]`; }); TORRENT_INFO.screenshots = thumbnailImgs.slice(0, TORRENT_INFO.screenshots.length); let {description} = TORRENT_INFO; imgList.forEach((img, index) => { if (description.includes(img)) { description = description.replace(new RegExp(`\\[img\\]${img}\\[\\/img\\]`, "ig"), thumbnailImgs[index] || ""); } }); TORRENT_INFO.description = description; showNotice({ title: $t("\u6210\u529F"), text: $t("\u8F6C\u6362\u6210\u529F\uFF01") }); } }).catch((error) => { showNotice({ title: $t("\u9519\u8BEF"), text: error.message }); }).finally(() => { $("#img-transfer").text($t("\u8F6C\u7F29\u7565\u56FE")).removeAttr("disabled").removeClass("is-disabled"); }); }; var getDoubanLink = () => { $("#douban-info").text($t("\u83B7\u53D6\u4E2D...")).attr("disabled", true).addClass("is-disabled"); const scriptDoubanLink = $(".douban-dom").attr("douban-link"); const doubanLink = $(".page__title>a").attr("href") || scriptDoubanLink || TORRENT_INFO.doubanUrl || $("#douban-link").val(); if (doubanLink && doubanLink.match("movie.douban.com")) { TORRENT_INFO.doubanUrl = doubanLink; if (doubanLink) { $("#douban-link").val(doubanLink); } getDoubanData(); return false; } const {imdbUrl, movieName} = TORRENT_INFO; getDoubanLinkByIMDB(imdbUrl, movieName).then((doubanUrl) => { TORRENT_INFO.doubanUrl = doubanUrl; $("#douban-link").val(doubanUrl); getDoubanData(); }).catch((error) => { showNotice({ title: $t("\u9519\u8BEF"), text: error.message }); $("#douban-info").text($t("\u83B7\u53D6\u8C46\u74E3\u7B80\u4ECB")).removeAttr("disabled").removeClass("is-disabled"); }); }; var getDoubanData = () => { const {doubanUrl} = TORRENT_INFO; if (doubanUrl) { getDoubanInfo(doubanUrl).then((data) => { updateTorrentInfo(data); showNotice({ title: $t("\u6210\u529F"), text: $t("\u83B7\u53D6\u6210\u529F") }); }).catch((error) => { showNotice({ title: $t("\u9519\u8BEF"), text: error.message }); }).finally(() => { $("#douban-info").text($t("\u83B7\u53D6\u8C46\u74E3\u7B80\u4ECB")).removeAttr("disabled").removeClass("is-disabled"); }); } }; var getDoubanBookInfo = () => { let {doubanUrl} = TORRENT_INFO; if (!doubanUrl) { doubanUrl = $("#douban-link").val(); } else { $("#douban-link").val(doubanUrl); } if (doubanUrl) { $("#douban-book-info").text($t("\u83B7\u53D6\u4E2D...")).attr("disabled", true).addClass("is-disabled"); getDoubanInfo(doubanUrl).then((data) => { TORRENT_INFO.title = data.chinese_title || data.origin_title; TORRENT_INFO.image = data.poster; TORRENT_INFO.description = data.book_intro; TORRENT_INFO.doubanBookInfo = data; showNotice({ title: $t("\u6210\u529F"), text: $t("\u83B7\u53D6\u6210\u529F") }); }).catch((error) => { showNotice({ title: $t("\u9519\u8BEF"), text: error.message }); }).finally(() => { $("#douban-book-info").text($t("\u83B7\u53D6\u8C46\u74E3\u8BFB\u4E66\u7B80\u4ECB")).removeAttr("disabled").removeClass("is-disabled"); }); } else { showNotice({ title: $t("\u9519\u8BEF"), text: $t("\u7F3A\u5C11\u8C46\u74E3\u94FE\u63A5") }); } }; var updateTorrentInfo = (data) => { var _a; const desc = data.format; TORRENT_INFO.doubanInfo = data.format; TORRENT_INFO.subtitle = getSubTitle(data); const areaMatch = (_a = desc.match(/(产\s+地|国\s+家)\s+(.+)/)) == null ? void 0 : _a[2]; if (areaMatch) { TORRENT_INFO.area = getAreaCode(areaMatch); } const category = TORRENT_INFO.category; TORRENT_INFO.category = getPreciseCategory(TORRENT_INFO, category); }; // src/site-dom/click-event.js var click_event_default = () => { if ($("#easy-seed-setting")[0]) { $("#easy-seed-setting").on("click", () => { openSettingPanel(); }); } if ($("#batch-seed-btn")[0]) { $("#batch-seed-btn").on("click", () => { openBatchSeedTabs(); }); } if ($("#img-transfer")[0]) { $("#img-transfer").click(() => { getThumbnailImgs(); }); } if ($("#douban-info")[0]) { $("#douban-info").click(() => { getDoubanLink(); }); } if ($("#douban-book-info")[0]) { $("#douban-book-info").click(() => { getDoubanBookInfo(); }); } handleSiteClickEvent(); }; var handleSiteClickEvent = () => { $(".site-list li>a").click(async function() { let url = $(this).data("link"); if (url.match(/lemonhd/)) { const catMap = { movie: "movie", tv: "tv", tvPack: "tv", variety: "tv", documentary: "doc", concert: "mv" }; const path = catMap[TORRENT_INFO.category] || "movie"; url = url.replace("upload_movie", `upload_${path}`); } if (url.match(/hdpost|blutopia|asiancinema|aither/)) { const catMap = { movie: "1", tv: "2", tvPack: "2", documentary: "1", concert: "3", sport: "9", cartoon: "405", app: "10", ebook: "11", magazine: "11", audioBook: "14" }; const path = catMap[TORRENT_INFO.category] || "1"; url = url.replace("1", path); } if (url.match(/bibliotik/)) { const catMap = { ebook: "ebooks", magazine: "magazines", audioBook: "audiobooks" }; url = url.replace("/upload", `/upload/${catMap[TORRENT_INFO.category] || "ebooks"}`); } if (url.match(/baconbits/)) { const catMap = { movie: "Movies", tv: "TV", tvPack: "TV", documentary: "Movies", cartoon: "Anime", app: "Applications", ebook: "E-Books", magazine: "Magazines", audioBook: "Audiobooks", comics: "Comics" }; const formDom = await new Promise((resolve, reject) => { GM_xmlhttpRequest({ method: "GET", url: `https://baconbits.org/ajax.php?action=upload_section§ion=${catMap[TORRENT_INFO.category]}`, onload(res) { resolve(res.responseText); } }); }); TORRENT_INFO.formDom = formDom; } if (TORRENT_INFO.isForbidden) { const result = window.confirm($t("\u672C\u79CD\u5B50\u7981\u6B62\u8F6C\u8F7D\uFF0C\u786E\u5B9A\u8981\u7EE7\u7EED\u8F6C\u8F7D\u4E48\uFF1F")); if (!result) { return; } } if (CURRENT_SITE_NAME === "TTG" && !TORRENT_INFO.description) { showNotice({ text: $t("\u8BF7\u7B49\u5F85\u9875\u9762\u52A0\u8F7D\u5B8C\u6210") }); return; } const torrentInfo = encodeURIComponent(JSON.stringify(TORRENT_INFO)); url = url.replace(/(#torrentInfo=)(.+)/, `$1${torrentInfo}`); window.open(url); }); }; // src/site-dom/ptpimg.js if (location.host === "ptpimg.me") { const ptpImgApiKey = GM_getValue("easy-seed.ptp-img-api-key") || ""; if (!ptpImgApiKey) { $("#form_file_upload").after(`
    `); $(".ptp-api-key-btn button").click(() => { const apiKey = $("#api_key").val(); GM_setValue("easy-seed.ptp-img-api-key", apiKey); showNotice({ title: "Success!", text: "Saved to EasySeed." }); }); } } // src/style.js var style_default = GM_addStyle(` td.title-td{ min-width: 80px; vertical-align: middle !important; } td.title-td h4{ text-align: right; margin: 0; font-size: 13px; font-weight: 500; height: 100%; display: flex; align-items: center; justify-content: flex-end; } .ptp-seed-title { display: flex; align-items: center; } .ptp-seed-title h4{ margin: 0 !important; margin-right: 10px !important; display: flex; align-items: center; } .seed-dom button{ line-height: 1; white-space: nowrap; cursor: pointer; background: #fff; border: 1px solid #dcdfe6; color: #606266; -webkit-appearance: none; text-align: center; box-sizing: border-box; outline: none; transition: .1s; font-weight: 500; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; padding: 6px 16px; font-size: 13px; border-radius: 4px; margin:0; margin-right: 5px; } .seed-dom button:hover { background: #fff; border-color: #409eff; color: #409eff } .seed-dom button.is-disabled, .seed-dom button.is-disabled:hover { color: #c0c4cc; cursor: not-allowed; background-image: none; background-color: #fff; border-color: #ebeef5; } .site-list,.search-list{ margin: 0; padding: 0; list-style: none; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; } .ptp-search-list{ display: flex; align-items: center; padding-top:10px; justify-content: center; } .ptp-search-list h4{ margin: 0; min-width: 60px; margin-right: 15px; } .seed-dom li,.search-list li { margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 5px; line-height: 24px; font-weight: 600; } .seed-dom li:last-child span{ display: none; } .search-list li:last-child span{ display: none; } .seed-dom li a{ font-weight: 600; } .easy-seed-function-list{ display: flex; justify-content: space-around; padding: 6px 20px; } .easy-seed-function-list button{ line-height: 1; white-space: nowrap; cursor: pointer; background: #fff; border: 1px solid #dcdfe6; color: #606266; -webkit-appearance: none; text-align: center; box-sizing: border-box; outline: none; transition: .1s; font-weight: 500; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; padding: 8px 20px; font-size: 14px; border-radius: 4px; margin:0; margin-right: 5px; } .easy-seed-function-list button:hover { background: #fff; border-color: #409eff; color: #409eff } .easy-seed-function-list button.is-disabled, .easy-seed-function-list button.is-disabled:hover { color: #c0c4cc; cursor: not-allowed; background-image: none; background-color: #fff; border-color: #ebeef5; } .function-list-item{ display: flex; align-items: center; justify-content: space-between; } .function-list-item input{ -webkit-appearance: none; background-color: #fff; background-image: none; border-radius: 4px; border: 1px solid #dcdfe6; box-sizing: border-box; color: #606266; display: inline-block; font-size: inherit; height: 34px; line-height: 40px; outline: none; width: 200px; padding: 0 12px; transition: border-color .2s cubic-bezier(.645,.045,.355,1); } .function-list-item input::placeholder { color: #c0c4cc } .function-list-item input:hover { border-color: #c0c4cc } .function-list-item input:focus { outline: none; border-color: #409eff } .hdb-tr{ display: flex; } .hdb-tr td:last-child{ flex: 1; } .hdb-tr td:first-child>h4{ width:100px; } .function-list-item h4{ margin: 0; padding: 0; margin-right: 10px; font-weight: 600; font-size: 14px; } .upload-section,.douban-section,.douban-book-section{ display: flex; justify-content: center; align-items: center; } .upload-section #nsfw{ margin-left: 0; position: static; } .upload-section label{ padding-left: 0; } #kdescr img{ max-width: 100%; } .easy-seed-setting-btn{ cursor: pointer; display: inline-flex; align-items: center; margin-left: 3px; } .easy-seed-setting-btn svg{ height: 20px; width: 20px; animation: 3s linear rotate infinite; } @keyframes rotate { from {transform: rotate(0deg)} to {transform: rotate(360deg) } } .easy-seed-setting-panel{ position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 2000; background: rgba(0,0,0,0.5); color: #000; } #batch-seed-btn{ border-color: transparent; color: #409eff; background: transparent; padding-left: 0; padding-right: 0; font-weight: 600; } #batch-seed-btn:hover { color: #66b1ff; border-color: transparent; background-color: transparent } #batch-seed-btn:active { color: #3a8ee6; background-color: transparent } .easy-seed-setting-panel *{ padding: 0; margin: 0; } .easy-seed-setting-panel input[type="text"]{ -webkit-appearance: none; background-color: #fff; background-image: none; border-radius: 4px; border: 1px solid #dcdfe6; box-sizing: border-box; color: #606266; display: inline-block; font-size: inherit; height: 34px; line-height: 40px; outline: none; width: 200px; padding: 0 12px; transition: border-color .2s cubic-bezier(.645,.045,.355,1); } .easy-seed-setting-panel input[type="text"]::placeholder { color: #c0c4cc } .easy-seed-setting-panel input[type="text"]:hover { border-color: #c0c4cc } .easy-seed-setting-panel input[type="text"]:focus { outline: none; border-color: #409eff } .easy-seed-setting-panel h3,.easy-seed-setting-panel h1{ color: #000; margin-bottom: 15px; } .easy-seed-setting-panel .panel-content-wrap{ margin-top: 200px; max-width: 800px; box-sizing: border-box; margin: 50px auto; border-radius: 8px; background: #fff; position: relative; text-align:center; box-shadow: 0 1px 3px rgb(0 0 0 / 30%); padding: 20px 10px 10px 20px; } .easy-seed-setting-panel .panel-content{ height: 500px; overflow-y: auto; } .easy-seed-setting-panel .panel-content ul{ list-style: none; display: flex; flex-direction:row; flex-wrap: wrap; margin: 0 auto; padding: 0 10px; } .easy-seed-setting-panel .panel-content li{ width: 90px; text-align: left; margin-bottom: 10px; } .easy-seed-setting-panel .panel-content label{ cursor: pointer; color: #000 !important; font-size: 12px; display: flex; align-items: center; } .easy-seed-setting-panel .panel-content label input{ margin: 0; margin-right: 3px; padding:0; } .transfer-img-closed label { justify-content: center; } .easy-seed-setting-panel .site-enable-setting{ padding-top: 5px; margin-bottom: 8px; } .easy-seed-setting-panel button{ line-height: 1; white-space: nowrap; cursor: pointer; background: #fff; border: 1px solid #dcdfe6; color: #606266; -webkit-appearance: none; text-align: center; box-sizing: border-box; outline: none; transition: .1s; font-weight: 500; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; padding: 8px 20px; font-size: 14px; border-radius: 4px; margin:0; margin-right: 5px; margin-bottom: 10px; } .easy-seed-setting-panel button:hover { background: #fff; border-color: #409eff; color: #409eff } .easy-seed-setting-panel .confirm-btns { padding-top: 15px; } .easy-seed-setting-panel .img-upload-setting label{ justify-content: center; } .easy-seed-setting-panel .img-upload-setting label input{ margin-left: 8px; margin-right: 8px; } .easy-seed-setting-panel .img-upload-setting label a{ color: #000; font-weight: 500; } .easy-seed-setting-panel .img-upload-setting label a:hover{ color: #f7d584; } #save-setting-btn{ background-color: #007bff; border-color: #007bff; color:#fff; } #save-setting-btn:hover{ background: #66b1ff; border-color: #66b1ff; color: #fff } .ptp-api-key-btn{ text-align: center; } .easy-notification{ display: flex; width: 330px; padding: 14px 26px 14px 13px; border-radius: 8px; box-sizing: border-box; border: 1px solid #ebeef5; position: fixed; background-color: #fff; box-shadow: 0 2px 12px 0 rgba(0,0,0,.1); transition: opacity .3s,transform .3s,left .3s,right .3s,top .4s,bottom .3s; overflow: hidden; right:0; transform: translateX(100%); } .easy-notification-enter{ right: 16px; transform: translateX(0); } .notification-wrapper { margin-left: 13px; margin-right: 8px } .notification-title { font-weight: 700; font-size: 16px; color: #303133; margin: 0; background: transparent; box-shadow: none; border: none; } .notification-content { font-size: 14px; line-height: 21px; margin: 6px 0 0; color: #606266; text-align: justify } .notification-content p { margin: 0 } .notification-close-btn svg { height: 22px; width: 22px; font-size: 22px } .notification-close-btn { position: absolute; top: 18px; right: 15px; cursor: pointer; color: #909399; font-size: 16px } .notification-close-btn:hover { color: #606266 } `); // src/index.js var paramsMatchArray = location.hash && location.hash.match(/(^|#)torrentInfo=([^#]*)(#|$)/); var torrentParams = paramsMatchArray && paramsMatchArray.length > 0 ? paramsMatchArray[2] : null; if (CURRENT_SITE_NAME) { fillSearchImdb(); if (torrentParams && CURRENT_SITE_INFO.asTarget) { torrentParams = JSON.parse(decodeURIComponent(torrentParams)); fillTargetForm(torrentParams); } if (CURRENT_SITE_INFO.asSource && !location.pathname.match(/upload/ig) && !(location.pathname.match(CURRENT_SITE_INFO.search.path) && (getUrlParam("imdb") || getUrlParam("name")))) { source_default(); console.log(TORRENT_INFO); insertTorrentPage(); click_event_default(); } } })();