// ==UserScript==
// @name easy-seed PT一键转种
// @namespace https://github.com/techmovie/easy-seed
// @version 1.0.9
// @description easy seeding for different trackers
// @author birdplane
// @require https://cdn.bootcss.com/jquery/1.7.1/jquery.min.js
// @match https://passthepopcorn.me/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?imdb=*
// @match https://blutopia.xyz/upload/*
// @match https://pt.hdpost.top/torrents/*
// @match https://*/upload*
// @match http://*/upload*
// @match http://www.hd.ai/Torrents.upload
// @match https://broadcity.in/browse.php?imdb=*
// @grant GM_addStyle
// @grant GM_xmlhttpRequest
// ==/UserScript==
(()=>{var M={SoulVoice:{url:"https://pt.soulvoice.club",host:"soulvoice.club",siteType:"NexusPHP",asSource:!1,asTarget:!0,uploadPath:"/upload.php",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"}}},HDRoute:{url:"http://hdroute.org",host:"hdroute.org",siteType:"NexusPHP",asSource:!1,asTarget:!0,uploadPath:"/upload.php",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"}}},Bdc:{url:"https://broadcity.in",host:"broadcity.in",siteType:"Bdc",asSource:!1,asTarget:!1,uploadPath:"/upload.php"},HDPOST:{url:"https://pt.hdpost.top",host:"hdpost.top",siteType:"UNIT3D",asSource:!0,asTarget:!0,uploadPath:"/upload/1",searchPath:"/torrents",needDoubanInfo:!0,seedDomSelector:"#vue+.panel table>tbody>tr:last",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"}}},HDBits:{url:"https://hdbits.org",host:"hdbits.org",siteType:"HDB",asSource:!0,asTarget:!0,needDoubanInfo:!0,uploadPath:"/upload.php",seedDomSelector:"#details >tbody >tr:contains(Last seeded)",searchPath:"/browse.php",searchKey:"search",searchParam:{sort:"size",d:"DESC"},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"}}},MTeam:{url:"https://kp.m-team.cc",host:"m-team.cc",siteType:"NexusPHP",asSource:!0,asTarget:!0,uploadPath:"/upload.php",seedDomSelector:"#top+table>tbody>tr:nth-child(7)",searchPath:"/browse.php",searchKey:"search",searchParam:{search_area:"{key}",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","402","439","435","438"],tvPack:["403","402","435","402","439","435","438"],documentary:"404",concert:"406",sport:"407",cartoon:"405"}},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"}}},CHDBits:{url:"https://chdbits.co",host:"chdbits.co",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(6)",uploadPath:"/upload.php",searchPath:"/browse.php",searchKey:"search",searchParam:{search_area:"{key}",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"}}},TTG:{url:"https://totheglory.im",host:"totheglory.im",siteType:"TTG",asSource:!0,asTarget:!0,seedDomSelector:"#main_table h1+table>tbody>tr:nth-child(2)",uploadPath:"/upload.php",searchPath:"/browse.php",searchKey:"search_field",searchParam:{sort:"5",type:"desc"},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:""}}},SSD:{url:"https://springsunday.net",host:"springsunday.net",siteType:"NexusPHP",asSource:!0,asTarget:!0,uploadPath:"/upload.new.php",searchPath:"/torrents.php",seedDomSelector:"#top+table>tbody>tr:nth-child(3)",searchKey:"search",searchParam:{search_area:"{key}",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"}}},HDHome:{url:"https://hdhome.org",host:"hdhome.org",siteType:"NexusPHP",asSource:!0,asTarget:!0,uploadPath:"/upload.php",searchPath:"/torrents.php",seedDomSelector:"#top+font>table:nth-child(1)>tbody>tr:nth-child(4)",searchKey:"search",searchParam:{search_area:"{key}",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:["5","412","418","426","433","445"],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"}}},OurBits:{url:"https://ourbits.club",host:"ourbits.club",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(3)",uploadPath:"/upload.php",searchPath:"/browse.php",searchKey:"search",searchParam:{search_area:"{key}",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"}}},HDSky:{url:"https://hdsky.me",host:"hdsky.me",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+div+table>tbody>tr:nth-child(4)",uploadPath:"/upload.php",searchPath:"/browse.php",searchKey:"search",searchParam:{search_area:"{key}",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"}}},HDChina:{url:"https://hdchina.org",host:"hdchina.org",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:".table_details>tbody>tr:nth-child(1)",uploadPath:"/upload.php",searchPath:"/browse.php",searchKey:"search",searchParam:{search_area:"{key}",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"}}},KEEPFRDS:{url:"https://pt.keepfrds.com",host:"keepfrds.com",siteType:"NexusPHP",asSource:!0,asTarget:!1,seedDomSelector:"#top+table>tbody>tr:nth-child(3)",uploadPath:"/upload.php",searchPath:"/browse.php",searchKey:"search",searchParam:{search_area:"{key}",sort:"5",type:"desc"}},PTSBAO:{url:"https://ptsbao.club",host:"ptsbao.club",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+font+table>tbody>tr:nth-child(5)",uploadPath:"/upload.php",searchPath:"/browse.php",searchKey:"search",searchParam:{search_area:"{key}",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"}}},BeiTai:{url:"https://www.beitai.pt",host:"beitai.pt",siteType:"NexusPHP",asSource:!0,asTarget:!1,seedDomSelector:"#top+table>tbody>tr:nth-child(3)",uploadPath:"/upload.php",searchPath:"/browse.php",searchKey:"search",searchParam:{search_area:"{key}",sort:"5",type:"desc"}},LemonHD:{url:"https://lemonhd.org",host:"lemonhd.org",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#outer>table>tbody>tr:nth-child(5)",uploadPath:"/upload_movie.php",searchPath:"/browse.php",searchKey:"search",searchParam:{search_area:"{key}",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"}}},PTP:{url:"https://passthepopcorn.me",host:"passthepopcorn.me",siteType:"gazelle",asSource:!0,asTarget:!1,needDoubanInfo:!0,uploadPath:"/upload.php",searchPath:"/torrents.php",searchKey:"search",searchParam:{action:"advanced"},seedDomSelector:""},BeyondHD:{url:"https://beyond-hd.me",host:"beyond-hd.me",siteType:"F3NIX",asSource:!0,asTarget:!0,seedDomSelector:".table-details tr:last",needDoubanInfo:!0,uploadPath:"/upload",searchPath:"/torrents/all",searchKey:"imdb",searchParam:{doSearch:"Search",sorting:"size",direction:"desc"},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"}},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"]}}},PTer:{url:"https://pterclub.com",host:"pterclub.com",siteType:"NexusPHP",asSource:!0,asTarget:!0,uploadPath:"/upload.php",searchPath:"/torrents.php",seedDomSelector:"#top+table>tbody>tr:nth-child(3)",searchKey:"search",searchParam:{search_area:"{key}",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"}}},HD4FANS:{url:"https://pt.hd4fans.org",host:"hd4fans.org",siteType:"NexusPHP",asSource:!0,asTarget:!0,uploadPath:"/upload.php",searchPath:"/torrents.php",seedDomSelector:"#top+table>tbody>tr:nth-child(3)",searchKey:"search",searchParam:{search_area:"{key}",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"}}},TJUPT:{url:"https://www.tjupt.org",host:"tjupt.org",siteType:"NexusPHP",asSource:!0,asTarget:!0,uploadPath:"/upload.php",searchPath:"/torrents.php",seedDomSelector:"#top+table>tbody>tr:nth-child(5)",searchKey:"search",searchParam:{search_area:"{key}",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"}}},NYPT:{url:"https://nanyangpt.com",host:"nanyangpt.com",siteType:"NexusPHP",asSource:!0,asTarget:!0,uploadPath:"/upload.php",searchPath:"/torrents.php",seedDomSelector:"#top+table>tbody>tr:nth-child(5)",searchKey:"search",searchParam:{search_area:"{key}",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"}}},Blutopia:{url:"https://blutopia.xyz",host:"blutopia.xyz",siteType:"UNIT3D",asSource:!0,asTarget:!0,uploadPath:"/upload/1",searchPath:"/torrents",needDoubanInfo:!0,seedDomSelector:"#vue+.panel table tr:last",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"}}},PTHome:{url:"https://www.pthome.net",host:"pthome.net",siteType:"NexusPHP",asSource:!0,asTarget:!0,uploadPath:"/upload.php",searchPath:"/torrents.php",seedDomSelector:"#top+table>tbody>tr:nth-child(3)",searchKey:"search",searchParam:{search_area:"{key}",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"}}},TCCF:{url:"https://et8.org",host:"et8.org",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(3)",uploadPath:"/upload.php",searchPath:"/torrents.php",searchKey:"search",searchParam:{search_area:"{key}",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"}},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"}}},HDDolby:{url:"https://www.hddolby.com",host:"hddolby.com",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(3)",uploadPath:"/upload.php",searchPath:"/torrents.php",searchKey:"search",searchParam:{search_area:"{key}",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"}}},HDArea:{url:"https://www.hdarea.co",host:"hdarea.co",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(3)",uploadPath:"/upload.php",searchPath:"/torrents.php",searchKey:"search",searchParam:{search_area:"{key}",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"}}},BTSCHOOL:{url:"https://pt.btschool.club",host:"btschool.club",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(3)",uploadPath:"/upload.php",searchPath:"/torrents.php",searchKey:"search",searchParam:{search_area:"{key}",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"}}},HDU:{url:"https://pt.hdupt.com",host:"hdupt.com",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(3)",uploadPath:"/upload.php",searchPath:"/torrents.php",searchKey:"search",searchParam:{search_area:"{key}",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"}}},HDAtmos:{url:"https://hdatmos.club",host:"hdatmos.club",siteType:"NexusPHP",asSource:!1,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(3)",uploadPath:"/upload.php",searchPath:"/torrents.php",searchKey:"search",searchParam:{search_area:"{key}",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"}}},TLF:{url:"https://pt.eastgame.org",host:"eastgame.org",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(3)",uploadPath:"/upload.php",searchPath:"/torrents.php",searchKey:"search",searchParam:{search_area:"{key}",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"}}},DISCFAN:{url:"https://discfan.net",host:"discfan.net",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(3)",uploadPath:"/upload.php",searchPath:"/torrents.php",searchKey:"search",searchParam:{search_area:"{key}",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"}}},HDAI:{url:"http://www.hd.ai",host:"hd.ai",siteType:"NexusPHP",asSource:!0,asTarget:!0,uploadPath:"/Torrents.upload",searchPath:"/torrents.php",seedDomSelector:"#top+table>tbody>tr:nth-child(3)",searchKey:"search",searchParam:{search_area:"{key}",sort:"5",type:"desc"},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"}}}};var a={title:"",subtitle:"",description:"",year:"",category:"",videoType:"",source:"",videoCodec:"",audioCodec:"",resolution:"",area:"",doubanUrl:"",doubanInfo:"",imdbUrl:"",tags:{DIY:!1,chineseAudio:!1,cantoneseAudio:!1,chineseSubtitle:!1,atoms:!1,dtsx:!1,HDR:!1,DolbyVision:!1},mediaInfo:"",screenshots:[],comparisonImgs:[],movieAkaName:"",movieName:"",sourceSite:"",sourceSiteType:"",size:""},X={HDB:"https://hdbits.org/browse.php?search={imdbid}&sort=size&h=8&d=DESC",PTP:"https://passthepopcorn.me/torrents.php?action=advanced&searchstr={imdbid}",MTeam:"https://kp.m-team.cc/torrents.php?incldead=0&spstate=0&inclbookmarked=0&search={imdbid}&search_area={searchArea}&search_mode=0",TTG:"https://totheglory.im/browse.php?search_field={imdbid}&c=M&sort=5&type=desc",CHD:"https://chdbits.co/torrents.php?incldead=0&spstate=0&inclbookmarked=0&search={imdbid}&search_area=4&search_mode=0",BHD:"https://beyond-hd.me/torrents/all?doSearch=Search&imdb={imdbid}&sorting=size&direction=desc",BLU:"https://blutopia.xyz/torrents?imdb={imdbid}",SSD:"https://springsunday.net/torrents.php?incldead=0&spstate=0&inclbookmarked=0&search={imdbid}&search_area={searchArea}&search_mode=0",HDT:"https://hd-torrents.org/torrents.php?search={imdbid}&active=0&options=2&order=size&by=DESC",KG:"https://karagarga.in/browse.php?search={imdbid}&search_type=imdb",FL:"https://filelist.io/browse.php?search={imdbid}&cat=0&searchin=3&sort=3","nzb.in":"https://nzbs.in/search/{imdbid}?t=-1&ob=size_desc",Bdc:"https://broadcity.in/browse.php?imdb={imdbid}"},se="https://omit.mkrobot.org/movie/infos",ce="https://media.pttool.workers.dev",ie="https://api.tmdb.org",ne="3d62cb1443c6b34b61262ab332aaf78c",ke=e=>{let t="";try{return Object.keys(M).forEach(o=>{let s=M[o].host,r=new RegExp(s,"i");s&&e.match(r)&&(t=o)}),t}catch(o){o.message!=="end loop"&&console.log(o)}};var le=["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"],m=ke(location.host),h=M[m],de=["Chotab","CRiSC","CtrlHD","DON","EA","EbP","Geek","LolHD","NTb","RightSiZE","SA89","SbR","TayTo","VietHD"];var N=e=>e.replace(/(?<!(([^\d]+\d{1})|([^\w]+H)))(\.)/ig," ").replace(/\.(?!(\d+))/," ").trim(),me=e=>new Promise((t,o)=>{try{if(e)GM_xmlhttpRequest({method:"GET",url:`${ce}?url=${e}`,onload(s){let r=JSON.parse(s.responseText);if(r&&r.success)t(r);else throw new Error("\u83B7\u53D6\u8C46\u74E3\u4FE1\u606F\u5931\u8D25")}});else throw new Error("\u65E0\u6CD5\u83B7\u53D6\u8C46\u74E3\u4FE1\u606F")}catch(s){o(s.message)}}),ue=(e,t)=>new Promise((o,s)=>{try{let r=" https://movie.douban.com/subject/",n=W(e);n&&GM_xmlhttpRequest({method:"GET",url:`${se}/${n}`,onload(l){let i=JSON.parse(l.responseText);if(i&&i.data)o(r+i.data.id);else throw new Error("\u83B7\u53D6\u5931\u8D25")}})}catch(r){s(r.message)}}),pe=(e,t)=>new Promise((o,s)=>{let r=encodeURI(`imgs=${e}&content_type=${t?1:0}&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:r,onload(n){let l=n.responseText.match(/(upload_results = )({.*})(;)/);l||s(new Error("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"));let i=[];if(l&&l.length){if(i=JSON.parse(l[2]).images,i.length.length<1)throw new Error(new Error("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"));o(i)}else throw new Error("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")}})}catch(n){s(n.message)}}),R=(e,t)=>{let{description:o,title:s,subtitle:r}=e;return t==="movie"?o.match(/动画/)?t="cartoon":o.match(/纪录/)&&(t="documentary"):t?.match(/tv/)&&(s.match(/(s0?\d{1,2})?e(p)?\d{1,2}/i)||r.match(/第[^\s]集/)?t="tv":t="tvPack"),t},z=e=>{let t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),o=location.search.substr(1).match(t);return o?unescape(o[2]):""},q=e=>e?(e=e.replace(/:|-|\s/g,""),e.match(/atoms/i)?"atoms":e.match(/dtshdma/i)?"dtshdma":e.match(/dtsx/i)?"dtsx":e.match(/dts/i)?"dts":e.match(/truehd/i)?"truehd":e.match(/lpcm/i)?"lpcm":e.match(/flac/i)?"flac":e.match(/aac/i)?"aac":e.match(/DD\+|DDP|DolbyDigitalPlus/i)?"dd+":e.match(/DD|DolbyDigital/i)?"dd":e.match(/ac3/i)?"ac3":""):"",Q=e=>(e=e.replace(/\.|-/g,""),e.match(/x264/i)?"x264":e.match(/h264|AVC/i)?"h264":e.match(/x265/i)?"x265":e.match(/hevc|h265/i)?"hevc":e.match(/vc-?1/i)?"vc1":e.match(/mpeg-?2/i)?"mpeg2":e.match(/mpeg-?4/i)?"mpeg4":""),Y=e=>{let t=e.match(/(\[url=(http(s)*:\/{2}.+?(\.(png|jpg)))\])?\[img\](.*?\.(png|jpg|gif))\[\/img](\[url\])?/g);if(t&&t.length>0)return t=t.filter(o=>!o.match(/MoreScreens|Ourbits_info|GDJT|douban|logo|(2019\/03\/28\/5c9cb8f8216d7\.png)|_front|(info_01\.png)|(screens\.png)|(04\/6b\/Ggp5ReQb_o)|(ce\/e7\/KCmGFMOB_o)/)),t.map(o=>{let s="";return o.match(/\[url=http(s)*:.+/)?s=o.match(/=(([^\]])+)/)?.[1]:s=o.match(/img\](([^[])+)/)?.[1],s})},O=e=>e.match(/(uhd|2160|4k).*(blu(-)?ray|remux)/i)?"uhdbluray":e.match(/blu(-)?ray|remux/i)?"bluray":e.match(/hdtv/i)?"hdtv":e.match(/web(-(rip|dl))+/i)?"web":e.match(/hddvd/i)?"hddvd":e.match(/dvd/i)?"dvd":e.match(/vhs/i)?"vhs":"other",he=e=>{let{chinese_title:t,this_title:o,trans_title:s}=e,r="";t.match(/[\u4e00-\u9fa5]+/)&&(r+=t);let n=o.concat(s).filter(l=>r!==l);return`${r}${n.length>0?"/":""}${n.join("/")}`};var H=e=>{let t=le;if(e){if(e.match(/USA|US|Canada|CA|美国|加拿大/i))return"US";if(t.includes(e)||e.match(/欧|英|法|德|俄|意|苏联|EU/i))return"EU";if(e.match(/Japan|日本|JP/i))return"JP";if(e.match(/Korea|韩国|KR/i))return"KR";if(e.match(/Taiwan|台湾|TW/i))return"TW";if(e.match(/Hong\s?Kong|香港|HK/i))return"HK";if(e.match(/CN|China|大陆|中|内地|Mainland/i))return"CN"}return"OT"},ge=e=>{let t=e/1e9;if(t<25)return"BD25";if(t<50)return"BD50";if(t<66)return"BD66";if(t<100)return"BD100"},fe=e=>{try{return new Promise((t,o)=>{GM_xmlhttpRequest({method:"GET",url:`${ie}/3/find/${e}?api_key=${ne}&language=en&external_source=imdb_id`,onload(s){let r=JSON.parse(s.responseText),n=r.movie_results&&r.movie_results.length>0,l=!r.tv_results&&r.tv_results.length>0;s.status!==200&&!n&&!l&&o(new Error("\u8BF7\u6C42\u5931\u8D25"));let i=n?r.movie_results[0].id:r.tv_results[0]?.id;t(i)}})})}catch(t){console.log(t)}},W=e=>{let t=/tt\d+/.exec(e);return t&&t[0]?t[0]:""},F=e=>e?e.match(/T/i)?parseFloat(e)*1024*1024*1024*1024||0:e.match(/G/i)?parseFloat(e)*1024*1024*1024||0:e.match(/M/i)?parseFloat(e)*1024*1024||0:e.match(/K/i)?parseFloat(e)*1024||0:"":"",w=e=>{if(!e)return!1;let t=e.split(/\n\s*\n/),[o,s]=t,r=t.filter(T=>T.startsWith("Video #2")),[n,...l]=t.filter(T=>T.startsWith("Audio")),i=t.filter(T=>T.startsWith("Text")),p=C("Complete name",o).replace(/\.avi|\.mkv|\.mp4|\.ts/i,""),b=F(C("File size",o)),{videoCodec:u,isHdr:c,isDV:d}=Ne(s,o,r),{audioCodec:f,channelName:y,languageArray:g}=He(n,l),D=i.map(T=>C("Language",T)),P=be(f,y,g,D,c,d),_=Ee(s);return{fileName:p,fileSize:b,videoCodec:u,audioCodec:f,resolution:_,mediaTags:P}},C=(e,t)=>{if(!t)return"";let o=e.replace(/\s/,"\\s*").replace(/(\(|\))/g,"\\$1"),s=new RegExp(`${o}\\s*:\\s([^
]+)`,"i");return t.match(s)?t.match(s)[1]:""},Ee=e=>{let t=parseInt(C("Height",e).replace(/\s/g,"")),o=parseInt(C("Width",e).replace(/\s/g,"")),s=C("Scan type",e);return t>1080?"2160p":t>720&&s==="Progressive"?"1080p":t>720&&s!=="Progressive"?"1080i":t>576||o>1024?"720p":t>480||o===1024?"576p":o>=840||t===480?"480p":""},be=(e,t,o,s,r,n)=>{let l=o.includes("Chinese"),i=s.includes("Chinese"),p={};return l&&(p.chineseAudio=!0),o.includes("Cantonese")&&(p.cantoneseAudio=!0),i&&(p.chineseSubtitle=!0),r&&(r.match(/HDR10\+/i)?p["HDR10+"]=!0:p.HDR=!0),n&&(p.DolbyVision=!0),e.match(/dtsx|atmos/ig)&&(p[e]=!0),p},Ne=(e,t,o)=>{let s=C("Format",t),r=C("Format",e),n=C("Format version",e),l=C("Codec ID",e),i=C("HDR format",e),p=o.length>0&&C("HDR format",o[0]).includes("Dolby Vision"),b=!!C("Encoding settings",e),u="";return s==="DVD Video"?u="DVD":s==="MPEG-4"?u="mpeg4":r==="MPEG Video"&&n==="Version 2"?u="mpeg2":l.match(/xvid/i)?u="xvid":r.match(/HEVC/i)&&!b?u="hevc":r.match(/HEVC/i)&&b?u="x265":r.match(/AVC/i)&&b?u="x264":r.match(/AVC/i)&&!b?u="h264":r.match(/VC-1/i)&&(u="vc1"),{videoCodec:u,hdrFormat:i,isDV:p}},He=(e,t=[])=>{let o=C("Format",e),s=C("Channel(s)",e),r=C("Commercial name",e),n=[e,...t].map(b=>C("Language",b)),l="",i="",p=parseInt(s);return p&&p>=6?l=`${p-1}.1`:l=`${p}.0`,o.match(/MLP FBA/i)&&r.match(/Dolby Atmos/i)?i="atmos":o.match(/MLP FBA/i)&&!r.match(/Dolby Atmos/i)?i="truehd":o.match(/AC-3/i)&&r.match(/Dolby Digital Plus/i)?i="dd+":o.match(/AC-3/i)&&r.match(/Dolby Digital/i)?i="dd":o.match(/AC-3/i)?i="ac3":o.match(/DTS XLL X/i)?i="dtsx":o.match(/DTS/i)&&r.match(/DTS-HD Master Audio/i)?i="dtshdma":o.match(/DTS/i)?i="dts":o.match(/FLAC/i)?i="flac":o.match(/AAC/i)?i="aac":o.match(/LPCM/i)&&(i="lpcm"),{audioCodec:i,channelName:l,languageArray:n}},B=e=>{if(!e)return"";let t=e.split("Disc Title");t.length>2&&(e=t[1]);let o=e.match(/VIDEO:(\s|Codec|Bitrate|Description|Language|-)*((.|\n)*)AUDIO:/i),s=e.match(/FILES:/i),r=new RegExp(`SUBTITLE(S)*:(\\s|Codec|Bitrate|Description|Language|-)*((.|\\n)*)${s?"FILES:":""}`,"i"),n=e.match(r),l=new RegExp(`AUDIO:(\\s|Codec|Bitrate|Description|Language|-)*((.|\\n)*)${n?"(SUBTITLE(S)?)":s?"FILES:":""}`,"i"),i=e.match(l),p=e.match(/Disc\s*Size:\s*((\d|,| )+)bytes/)?.[1]?.replaceAll(",",""),b=!e.match(/PLAYLIST REPORT/i),u=ee(o,2),[c="",d=""]=u,f=c.match(/2160/)?"hevc":"h264",y=c.match(/\/\s*HDR(\d)*(\+)*\s*\//i)?.[0],g=!!d.match(/\/\s*Dolby\s*Vision\s*/i),D=ee(i,2),P=ee(n,3),_=c.match(/\d{3,4}(p|i)/)?.[0],{audioCodec:T="",channelName:v="",languageArray:x=[]}=Re(D,b),I=P.map(E=>{let K=E.match(/(\w+)\s*\//)?.[1],L=E.match(/Graphics\s*(\w+)\s*(\d|\.)+\s*kbps/i)?.[1];return b?K:L}),k=be(T,v,x,I,y,g);return{fileSize:p,videoCodec:f,audioCodec:T,resolution:_,mediaTags:k}},ee=(e,t)=>e?.[t]?.split(`
`).filter(o=>!!o)??[],Re=(e,t)=>{if(e.length<1)return{};let o=e.sort((u,c)=>{let d=parseInt(u.match(/\/\s*(\d+)\s*kbps/i)?.[1]);return parseInt(c.match(/\/\s*(\d+)\s*kbps/i)?.[1])-d}),[s,r]=o,n=q(s),l=q(r),i=n,p=s.match(/\d\.\d/)?.[0];n==="lpcm"&&l==="dtshdma"&&(i=l,p=s.match(/\d\.\d/)?.[0]);let b=o.map(u=>{let c=u.match(/(\w+)\s*\//)?.[1],d=u.match(/Audio\s*(\w+)\s*\d+\s*kbps/)?.[1];return t?c:d});return{audioCodec:i,channelName:p,languageArray:b}},Ae=({pre:e,post:t,tracker:o},s,r)=>{let n=typeof e!="undefined"&&e!==null,l=typeof t!="undefined"&&t!==null;n&&e.unshift(s),l&&t.push(r)},S=e=>{if(e)return ye(e).replace(/\[quote\]((.|\n)*?)\[\/quote\]/g,function(o,s){return s&&s.match(/温馨提示|郑重|PT站|网上搜集|本种子|商业盈利|带宽|寬帶|法律责任|Quote:|正版|商用|转载|注明|后果|负责/)?"":o})},Ue=e=>(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),e&&e.length===4?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""),ve=e=>/rgba?/.test(e)?Ue(e):e,ye=e=>{let t=[],o=[],s=[],r=Ae.bind(null,{pre:o,post:s});switch(e.nodeType){case 1:{switch(e.tagName.toUpperCase()){case"UL":{r(null,null);break}case"OL":{r("[list=1]","[/list]");break}case"LI":{let{className:u}=e;if(h.siteType==="UNIT3D"&&u){r("[quote]","[/quote]");break}else{r("[*]",`
`);break}}case"B":{r("[b]","[/b]");break}case"U":{r("[u]","[/u]");break}case"I":{r("[i]","[/i]");break}case"DIV":if(e.className==="codemain"){r(`
[quote]`,"[/quote]");break}else{r(`
`,`
`);break}case"P":{r(`
`);break}case"BR":{h.siteType==="NexusPHP"&&m!=="OurBits"?r(""):r(`
`);break}case"SPAN":{r(null,null);break}case"BLOCKQUOTE":case"PRE":case"FIELDSET":{let{tagName:u,className:c,lastElementChild:d}=e;if(u==="BLOCKQUOTE"&&m==="PTP"&&c.match(/spoiler/))return d.tagName==="BLOCKQUOTE"?`[quote]${d.textContent}[/quote]`:`[quote]${e.textContent}[/quote]`;r("[quote]","[/quote]");break}case"TD":if(m.match(/TTG|HDBits/)){r("[quote]","[/quote]");break}else return"";case"IMG":{let u="",{src:c}=e,d=e.getAttribute("data-src")||e.getAttribute("data-echo");if(d)u=d.match(/(http(s)?:)?\/\//)?d:location.origin+"/"+d;else if(c&&!c.match(/ico_\w+.gif|jinzhuan/))u=c;else return"";return`[img]${u}[/img]`}case"FONT":{let{color:u}=e;u&&r(`[color=${ve(u)}]`,"[/color]");break}case"A":{let{href:u,textContent:c}=e;if(u&&u.length>0){if(u.match(/javascript:void/))return"";if(m==="PTP"&&c.match(/Show comparison/))return"";r(`[url=${u}]`,"[/url]")}break}case"H1":{r('[b][size="7"]',`[/size][/b]
`);break}case"H2":{r('[b][size="6"]',`[/size][/b]
`);break}case"H3":{r('[b][size="5"]',`[/size][/b]
`);break}case"H4":{r('[b][size="4"]',`[/size][/b]
`);break}}let{textAlign:n,fontWeight:l,fontStyle:i,textDecoration:p,color:b}=e.style;if(n)switch(n.toUpperCase()){case"LEFT":{r("[left]","[/left]");break}case"RIGHT":{r("[right]","[/right]");break}case"CENTER":{r("[center]","[/center]");break}}(l==="bold"||~~l>=600)&&r("[b]","[/b]"),i==="italic"&&r("[i]","[/i]"),p==="underline"&&r("[u]","[/u]"),b&&b.trim()!==""&&r(`[color=${ve(b)}]`,"[/color]");break}case 3:return e.textContent.match(/引用|Quote|代码|代碼|Show|Hide|Hidden text|\[show\]|Spoiler/)?"":e.textContent;default:return null}return e.childNodes.forEach((n,l)=>{let i=ye(n);i&&t.push(i)}),o.concat(t).concat(s).join("")},A=e=>{let t={};return e.match(/diy/i)&&(t.DIY=!0),e.match(/国配|国语/i)&&(t.chineseAudio=!0),e.match(/Atoms|杜比全景声/i)&&(t.atoms=!0),e.match(/HDR/i)&&(e.match(/HDR10\+/i)?t["HDR10+"]=!0:t.HDR=!0),e.match(/DoVi|(Dolby\s*Vision)|杜比视界/i)&&(t.DolbyVision=!0),e.match(/粤/i)&&(t.cantoneseAudio=!0),e.match(/简|繁|中字/i)&&(t.chineseSubtitle=!0),e.match(/Criterion|CC标准/i)&&(t.CC=!0),t},U=e=>{if(!e)return"";let t=e.match(/\[quote(=\w+)?\](.|\n)+?\[\/quote\]/g),o="";return t&&t.length>0&&t.forEach(s=>{s.match(/Disc\s*Size/i)&&(o+=s.replace(/\[(\/)?(quote|font)(=(\w| )+)?\]/gi,"").trim()+`
`)}),o||(o=e.match(/Disc\s+(Title|Label)[^[]+/i)?.[0]??""),o};var De=e=>{console.log(e),m==="PTSBAO"&&localStorage.getItem("autosave")&&localStorage.removeItem("autosave");let t=W(e.imdbUrl),o=e.videoType.match(/bluray/i),{screenshots:s=[]}=e,r=h.imdb?.selector;if(m==="HDRoute"?$(r).val(t?.replace("tt","")??""):r&&$(r).val(e.imdbUrl),m==="HDBits"){let c=e.title.replace(/([^\d]+)\s+([12][90]\d{2})/,(d,f,y)=>`${e.movieName||e.movieAkaName} ${y}`);e.videoType==="remux"&&(c=c.replace(/\s+(bluray|blu-ray)/ig,"")),e.title=c}if(h.name){let{title:c,subtitle:d}=e,f=c;m==="TTG"?f+=`[${d}]`:m==="SSD"&&(f=c.replace(/\s/ig,".")),$(h.name.selector).val(f)}Me(),["subtitle","douban","area","audioCodec"].forEach(c=>{let d=h[c];if(d&&d.selector){let f=e[c];c==="douban"?f=e.doubanUrl:(c==="area"||c==="audioCodec")&&(f=d.map[e[c]]),$(d.selector).val(f)}});let l=e.mediaInfo,i="";if(e.description)if(i=e.description,te(h.siteType)&&m!=="SSD"){let{doubanInfo:c}=e;c&&(i=c+i)}else{let{sourceSiteType:c}=e;te(c)&&(i=Oe(e))}if(h.mediaInfo&&(o&&m.match(/HDBits|Blutopia/)||($(h.mediaInfo.selector).val(l),i=i.replace(l.trim(),""))),h.screenshots&&s.forEach(c=>{i.includes(c)&&(i=i.replace(c,""),c.match(/\[url=.+?\[url]/)||(i=i.replace(/\[img\]\[\/img\]\n*/g,"")))}),m==="SSD"&&($(h.imdb.selector).val(e.doubanUrl||e.imdbUrl),$(h.screenshots.selector).val(s.join(`
`)),(e.category==="tvPack"||e.title.match(/Trilogy|Collection/i)||e.subTitle&&e.subTitle.match(/合集/))&&$('input[name="pack"]').attr("checked",!0)),m==="HDAI"&&($(h.imdb.selector).val(e.doubanUrl||e.imdbUrl),$(h.screenshots.selector).val(s.join(`
`)),o&&$('input[type="checkbox"][name="tag[o]"]').attr("checked",!0)),h.poster){let c=(e.description+e.doubanInfo).match(/\[img\](http.+?poster.+?)\[\/img\]/);if(c&&c[1]){let d=c[1];$(h.poster).val(d),m==="HDRoute"&&($('input[name="poster"]').val(d),i=i.replace(d,""))}}if(i=Le(i),$(h.description.selector).val(Ke(e)+i.trim()),m.match(/BeyondHD|Blutopia|HDPOST/)){let c=h.siteType==="UNIT3D"?t.replace("tt",""):t;if($(h.imdb.selector).val(c),fe(t).then(d=>{$(h.tmdb.selector).val(d)}),m==="BeyondHD"){let{category:d,videoType:f}=e;if(e.category=f,e.videoType=d,o){let y=ge(e.size);f==="uhdbluray"&&y==="BD50"&&(y="uhd50"),e.category=y}}}let p=h.category.map[e.category],b=["videoCodec","videoType","resolution","source","area"],u=[];if(Array.isArray(p)?(u=[...p],b.forEach(c=>{u=Te(h,e,c,u),u.length===1&&$(h.category.selector).val(u[0])})):[...b,"category"].forEach(c=>{Te(h,e,c,u)}),m.match(/HDHome|PTHome/i)&&$(h.category.selector).change(),h.anonymous){let{selector:c,value:d=""}=h.anonymous;d?$(c).val(d):$(c).attr("checked",!0)}if(h.tags&&Object.keys(e.tags).forEach(c=>{e.tags[c]&&h.tags[c]&&$(h.tags[c]).attr("checked",!0)}),Fe(e),m.match(/PTHome|HDSky|LemonHD/i)&&e.tags.DIY){let c="";if(m==="PTHome")c=e.videoType==="bluray"?"14":"13";else if(m==="HDSky")c=e.videoType==="bluray"?"12":"14";else if(m==="LemonHD"){$('select[name="tag_diy"]').val("yes");return}$(h.videoType.selector).val(c)}if(m.match(/HDU/)){let c="",{resolution:d,videoType:f,category:y}=e,g=y.match(/tv/);f==="remux"&&(d==="2160p"?c=g?"16":"15":c=g?"12":"3"),g&&(f==="encode"?c="14":f==="web"&&(c="13")),c&&$(h.videoType.selector).val(c),f.match(/bluray/)&&$(h.category.selector).val("424")}if(m==="TJUPT"&&($("#browsecat").change(),Ve(e)),m==="NYPT"){$("#browsecat").change();let c=setTimeout(()=>{let f={movie:"#movie_enname",tv:"#series_enname",tvPack:"#series_enname",documentary:"#doc_enname",variety:"#show_enname",cartoon:"#anime_enname"}[e.category];f&&$(f).val(e.title),clearTimeout(c)},2e3)}if(h.siteType==="UNIT3D"&&e.category.match(/tv/)){let c=e.title.match(/S0?(\d{1,2})/i)?.[1]??1,d=e.title.match(/EP?0?(\d{1,3})/i)?.[1]??0;$("#season_number").val(c),$("#episode_number").val(d)}if(m==="HDRoute"){let{description:c,doubanInfo:d}=e,f=c+d,y=f.match(/IMDb评分\s+(\d(\.\d)?)/i)?.[1]??"";$("#upload-imdb").val(y);let g=f.match(/(片\s+名)\s+(.+)?/)?.[2]??"",D=f.match(/(译\s+名)\s+(.+)/)?.[2]?.split("/")?.[0]??"",P=f.match(/(简\s+介)\s+([^[◎]+)/)?.[2]?.split("/")?.[0]??"",_=g;g.match(/[\u4e00-\u9fa5]+/)||(_=D.match(/[\u4e00-\u9fa5]+/)?D:g),$("#title_chs").val(_),$("#upload_introduction").val(P)}},Te=(e,t,o,s)=>{let r=e[o]?e[o].map[t[o]]:void 0;return Array.isArray(r)&&s?(e[o].selector&&$(e[o].selector).val(r.shift()),s.length>1&&(s=s.filter(n=>r.includes(n)))):e[o]&&e[o].selector&&$(e[o].selector).val(r),s},Fe=e=>{let t=e.title.match(/-([^-]+)$/),o=h.team,s=t?.[1]?.replaceAll("-","")?.split("@")??"";if(s){if(s=s.length>1?s[1]:s[0],de.includes(s)&&m==="BTSCHOOL"){$(o.selector).val(o.map.hdbint);return}}else s="other";if(s&&o){let r=o.map[s.toLowerCase()],n=r||o.map.other;if(m==="HDAI"&&!r){$('input[name="team"]').val(s);return}$(o.selector).val(n.toLowerCase())}},Me=()=>{let e=h.name?.selector??"";if(e.match(/^#\w+/)){let t=$(e).clone().attr("name","").hide();$(e).attr("id","").after(t)}},Oe=e=>{let{description:t,screenshots:o=[]}=e,s="",r=t.match(/\[quote(=\w+)?\](.|\n)+?\[\/quote\]/g);r&&r.length>0&&r.forEach(l=>{let i=l.match(/Disc\s?Size|\.mpls|Unique\s?ID|唯一ID|Resolution/i);(!l.match(/[\u4e00-\u9fa5]+/i)||i)&&(s+=l+`
`)});let n=o.map(l=>l.match(/\[url=.+\]/i)?l:`[img]${l}[/img]`);return s+`
`+n.join("")},Ke=e=>{let t=te(h.siteType)||m==="HDPOST",o=`\u8F6C\u53D1\u81EA[b]${e.sourceSite}[/b]\uFF0C\u611F\u8C22\u539F\u53D1\u5E03\u8005\uFF01`;return t||(o=`Torrent from [b]${e.sourceSite}[/b].
All thanks to the original uploader\uFF01`),`[quote]${o}[/quote]
`},te=e=>e.match(/NexusPHP|TTG/),Le=e=>e.replace(/(\[\w+(=(\w|\s)+)?\](\s|\n)*)+(\s|\n)*(\[\/\w+\](\s|\n)*)+/g,""),Ve=e=>{let t=setTimeout(()=>{if($("#ename")){let{title:o,description:s,doubanInfo:r,category:n,resolution:l}=e;$("#ename").val(o);let i=s+r,p=i.match(/(产\s+地|国\s+家)\s+(.+)/)?.[2]??"",b=i.match(/(片\s+名)\s+(.+)?/)?.[2]??"",u=i.match(/(译\s+名)\s+(.+)/)?.[2]?.split("/")?.[0]??"",c=i.match(/(主\s+演)\s+([^◎]+)/)?.[2]?.split(`
`)?.filter(g=>!!g)??[],d=i.match(/(语\s+言)\s+(.+)/)?.[2]??"",f=c.map(g=>g.trim().split(/\s+/)?.[0]).join("/");if(p){if(n==="movie")$("#district").val(p.replace(/,/g,"/").replace(/中国/,""));else if(n.match(/tv/)){let g="";p.match(/大陆/)?g="#specificcat1":p.match(/台|港/)?g="#specificcat2":p.match(/美国/)?g="#specificcat3":p.match(/英国/)?g="#specificcat7":p.match(/日本/)?g="#specificcat4":p.match(/韩国/)?g="#specificcat5":g="#specificcat6",$(g).attr("checked",!0),getcheckboxvalue("specificcat")}else if(n.match(/variety/)){let g={CN:"#district1",HK:"#district2",TW:"#district2",JP:"#district4",KR:"#district4",US:"#district3",EU:"#district3",OT:"#district5"};$(g[e.area]).attr("checked",!0),getcheckboxvalue("district")}}if($("#format")&&(n.match(/variety/)?(l.match(/720/)?$("#format3").attr("checked",!0):l.match(/1080/)&&$("#format5").attr("checked",!0),getcheckboxvalue("format")):n.match(/documentary/)&&(l.match(/720/)?$("#format2").attr("checked",!0):l.match(/1080/)&&$("#format1").attr("checked",!0),getradiovalue("format"))),$("#language")){let g="";d&&(d.match(/汉语/)?g="#language1":d.match(/粤/)?g="#language2":d.match(/英语/)?g="#language3":d.match(/日语/)?g="#language4":d.match(/韩语/)&&(g="#language5"),$(g).attr("checked",!0),getcheckboxvalue("language"))}n.match(/variety/)&&$("#tvshowsguest").val(f);let y=b;b.match(/[\u4e00-\u9fa5]+/)||(y=u.match(/[\u4e00-\u9fa5]+/)?u:""),$("#cname").val(y),clearTimeout(t)}},2e3)};var _e=()=>{let e=z("torrentid");if(!e)return!1;a.sourceSite=m,a.sourceSiteType=h.siteType;let t=$(`#torrent_${e}`),o=$(".page__title").text().match(/]?([^[]+)/)[1]?.trim(),[s,r=""]=o.split(" AKA ");a.mediaInfo=`${t.find(".mediainfo.mediainfo--in-release-description").next("blockquote:contains(Unique ID)").text()}`,a.movieName=s,a.movieAkaName=r,a.imdbUrl=$("#imdb-title-link")?.attr("href")??"",a.year=$(".page__title").text().match(/\[(\d+)\]/)[2];let n=$(`#group_torrent_header_${e}`);a.category=ze();let l=S(t.find(".bbcode-table-guard")[0]);a.category==="concert"&&(l=$("#synopsis").text()+l);let{comparisonData:i,screenshots:p}=qe(t);if(i){let V=[];Object.keys(i).forEach(J=>{V=V.concat(i[J]),l=l.replace(J+":",""),l+=`
[b]`+J+`:[/b]
`+i[J].map(re=>`[img]${re}[/img]`).join("")}),a.comparisonImgs=V}a.description=l;let b=n.find("#PermaLinkedTorrentToggler").text().replace(/ /g,"").split("/"),[u,c,d,...f]=b,y=f.includes("Remux");a.videoType=d==="WEB"?"web":je(c,y,u,d);let g=U(l),D=a.videoType.match(/bluray/i),P=D?B:w,_=D?g:a.mediaInfo;a.mediaInfo=_;let{videoCodec:T,audioCodec:v,fileName:x="",resolution:I,mediaTags:k}=P(_);a.videoCodec=T,a.audioCodec=v,a.resolution=I,a.tags=k;let E=x||n.data("releasename");E=N(E),a.title=E,a.source=Ge(d,u,I),a.size=n.find(".nobr span").attr("title").replace(/[^\d]/g,""),a.screenshots=p;let K=[],L=$("#movieinfo div").text().match(/Country:\s+([^\n]+)/);return L&&L.length>0&&(K=L?.[1].replace(/(,)\s+/g,"$1").split(",")),a.area=H(K?.[0]),a},ze=()=>{let e={"Feature Film":"movie","Short Film":"movie","Stand-up Comedy":"other",Miniseries:"tvPack","Live Performance":"concert","Movie Collection":"movie"},t=$("#torrent-table .basic-movie-list__torrent-edition__main").eq(0).text();return e[t]},qe=()=>{let e=[],t={},o=$(".movie-page__torrent__panel"),s=o.find("a:contains(Show comparison)");for(let n=0;n<s.length;n++){let l=s[n].getAttribute("onclick");if(l&&l.match(/BBCode.ScreenshotComparisonToggleShow/))try{let i=l.match(/\((.+)\)/)?.[1]??"",[p="null",b="null"]=i.match(/\[.+?\]/g),u=JSON.parse(p)?.join(",")??"",c=JSON.parse(b);t[u]=c}catch(i){t=null}}let r=o.find(".bbcode__image");for(let n=0;n<r.length;n++)e.push(r[n].getAttribute("src"));return{screenshots:e,comparisonData:t}},Ge=(e,t,o)=>t.match(/BD100|BD66/i)||e.match(/Blu-ray/i)&&o.match(/2160P|4K/i)?"uhdbluray":e.replace(/-/g,"").toLowerCase(),je=(e,t,o,s)=>{let r="";return t?r="remux":o.match(/BD50|BD25/ig)?r="bluray":o.match(/BD66|BD100/ig)?r="uhdbluray":s.match(/DVD/ig)&&e.match(/MKV|AVI/ig)?r="dvdrip":o.match(/DVD5|DVD9/ig)&&e.match(/VOB|ISO/ig)?r="dvd":e.match(/MKV|MP4/i)&&(r="encode"),r};var xe=()=>{a.sourceSite=m,a.sourceSiteType=h.siteType;let{Category:e,Name:t,Source:o,Type:s,Size:r}=Je();a.size=F(r),a.title=N(t);let n=A(a.title),l=$(".movie-heading a:last").text(),i=$(".movie-heading a:first").text();if(l)a.year=l;else{let x=a.title.match(/\s([12][90]\d{2})/);a.year=x?x[0]:""}let p=$(".panel-heading:contains(Description)").next(".panel-body").find(".forced-nfo"),b=S(p[0]);a.description=b;let{category:u,countries:c,imdbUrl:d}=We();a.movieName=i;let f=e.toLowerCase().replace(/s/,"");f=u==="Animation"?"cartoon":f,a.category=R(a,f),a.source=Qe(o,s),a.area=H(c),a.videoType=Ze(s);let y=a.videoType.match(/bluray/i),g=$("#stats-full code").text();a.mediaInfo=g;let D=y?B:w,{videoCodec:P,audioCodec:_,resolution:T,mediaTags:v}=D(g);return a.videoCodec=P,a.audioCodec=_,a.resolution=T,a.tags={...n,...v},a.imdbUrl=d,a.screenshots=Ye(),a},Je=()=>{let e={};return $(".dotborder").each((t,o)=>{let s=$(o).find("td:first").text(),r=$(o).find("td:last").text();e[s]=r.replace(/\n/g,"").trim()}),console.log(e),e},We=()=>{let e=$(".movie-details a"),t={};return e.each((o,s)=>{let r=$(s).attr("href").replace(/.+\?/g,"").split("=");if(r.length>1){let n=decodeURI(r[0]),l=r[1];n==="g[]"&&(n="category"),t[n]=l}else r?.[0].match(/tt\d+/)&&(t.imdbUrl=r[0])}),t},Ye=()=>a.description.match(/\[url=.+?\]\[img\].+?\[\/img\]\[\/url]/g)??[],Qe=(e,t)=>t.match(/BD100|BD66/i)||e.match(/Blu-ray/i)&&t.match(/UHD/i)?"uhdbluray":e.match(/WEB|WEB-DL/i)?"web":e.replace(/-/g,"").toLowerCase(),Ze=e=>(e=e.replace(/\s/g,""),e.match(/Remux/i)?"remux":e.match(/BD50|BD25/i)?"bluray":e.match(/UHD50|UHD66|UHD100/i)?"uhdbluray":e.match(/DVD5|DVD9/i)?"dvd":e.match(/\d{3,4}p/i)?"encode":e);var Pe=()=>{let e=z("id");a.sourceSite=m,a.sourceSiteType=h.siteType;let t=$("#details tr").has("a:contains(Edit torrent)"),o=t.length>0?t.prev():$("#details tr").has(".js-tagcontent").prev(),s=S(o.find(">td")[0]);s=s.match(/\[quote\]((.|\n)+)\[\/quote\]/)?.[1]??"",a.description=s;let{size:r,category:n,videoType:l}=Xe(),i=$("h1").eq(0).text();a.title=N(i);let p=A(i),b=$(".contentlayout h1").length>0,u=b?$(".contentlayout h1"):$("#details .showlinks li").eq(1);if(b){let y=u.prop("lastChild").nodeValue.replace(/\s|\(|\)/g,""),g=u.find("a").text();if(a.movieName=g,y)a.year=y;else{let D=a.title.match(/\s([12][90]\d{2})/);a.year=D?D[0]:""}}a.imdbUrl=u.find("a").attr("href"),a.category=R(a,n),a.source=O(a.title),a.videoType=l;let c=a.videoType.match(/bluray/i),d=c?B:w,f=U(s);if(!c)a.bdinfo=f,et(e).then(y=>{if(y){a.mediaInfo=y;let{videoCodec:g,audioCodec:D,resolution:P,mediaTags:_}=d(a.mediaInfo);a.videoCodec=g,a.audioCodec=D,a.resolution=P,a.tags={...p,..._}}});else{a.mediaInfo=f;let{videoCodec:y,audioCodec:g,resolution:D,mediaTags:P}=d(f||s);a.videoCodec=y,a.audioCodec=g,a.resolution=D,a.tags={...p,...P}}a.size=r,a.screenshots=tt(o)},Xe=()=>{let e={"Blu-ray/HD DVD":"bluray",Capture:"hdtv",Encode:"encode",Remux:"remux","WEB-DL":"web"},t=$("th:contains(Category)").next().text(),o=$("th:contains(Size)").eq(0).next().text(),s=t.split("("),r=s[0].trim().toLowerCase(),n=s[1].split(",")[0].toLowerCase().replace(/\./g,""),l=s[1].split(",")[1].replace(/\)/g,"").trim();return{size:F(o),category:r,videoCodec:n,videoType:e[l]}},et=e=>new Promise((t,o)=>{GM_xmlhttpRequest({method:"GET",url:`https://hdbits.org/details/mediainfo?id=${e}`,onload(s){let r=s.responseText;(s.status!==200||!r)&&o(new Error("\u8BF7\u6C42\u5931\u8D25")),t(r)}})}),tt=e=>a.description.match(/\[url=.+?\]\[img\].+?\[\/img\]\[\/url]/g)??[];var Ce=()=>{a.sourceSite=m,a.sourceSiteType=h.siteType;let e=$("#main_table h1").eq(0).text(),t=e.match(/[^[]+/)?.[0];a.title=N(t),a.subtitle=e.replace(t,"").replace(/\[|\]/g,"");let o=A(a.subtitle+a.title),s=ae("\u7C7B\u578B").text(),{category:r,area:n,videoType:l}=at(s);a.area=n,a.videoType=st(t,l);let i=a.title.match(/(18|19|20)\d{2}/g);a.year=i?i.pop():"",a.imdbUrl=ae("IMDB").find("a").attr("href"),a.source=O(a.title);let p=ae("\u5C3A\u5BF8").text().match(/\(((\d|,)+)\s*字节\)/i)?.[1];a.size=p.replaceAll(",","");let b=a.videoType.match(/bluray/i),u=b?B:w;window.onload=()=>{let c=$("#kt_d"),d=S(c[0]),f=d.match(/\[color=\w+\]本种子.+?\[\/color\]/)?.[0]??"";d.match&&(d=d.replace(f,"")),a.description=d;let y=d.match(/https:\/\/(movie\.)?douban.com\/subject\/\d+/)?.[0];y&&(a.doubanUrl=y);let g=d.match(/(产\s+地|国\s+家)\s+(.+)/)?.[2];g&&(a.area=H(g)),r?a.category=R(a,r):a.category=ct(d);let{bdinfo:D,mediaInfo:P}=ot(d),_=b?D:P;if(_){a.mediaInfo=_;let{videoCodec:T,audioCodec:v,resolution:x,mediaTags:I}=u(_);a.videoCodec=T,a.audioCodec=v,a.resolution=x,a.tags={...o,...I}}else{let T=a.title.match(/\d{3,4}(p|i)/i)?.[0];if(!T&&T.match(/4k|uhd/i)&&(T="2160p"),a.resolution=T,a.audioCodec=q(a.title),d.match(/VIDEO(\.| )*CODEC/i)){let v=d.match(/VIDEO(\.| )*CODEC\.*:?\s*([^\s_:]+)?/i)?.[2];if(v)a.videoCodec=v.replace(/\.|-/g,"").toLowerCase();else{let{title:x}=a;a.videoCodec=Q(x)}}if(d.match(/AUDIO\s*CODEC/i)){let v=d.match(/AUDIO\s*CODEC\.*:?\s*(.+)/i)?.[1];v&&(a.audioCodec=q(v))}}a.screenshots=rt(d),console.log(a)}},at=e=>{let t="",o="",s="";return e.match(/电影/)?t="movie":e.match(/剧包/)?t="tvPack":e.match(/剧/)?t="tv":e.match(/纪录/)?t="documentary":e.match(/综艺/)?t="variety":e.match(/体育/)?t="sport":e.match(/演唱会/)?t="concert":e.match(/动漫/)&&(t="cartoon"),e.match(/韩/)?o="KR":e.match(/日/)?o="JP":e.match(/华/)?o="CN":e.match(/欧/)&&(o="US"),e.match(/UHD原盘/i)?s="uhdbluray":e.match(/bluray原盘/i)?s="bluray":e.match(/DVD/i)&&(s="dvd"),{category:t,area:o,videoType:s}},ot=e=>{let t=e.match(/\[quote\](.|\n)+?\[\/quote\]/g),o="",s="";for(let r=0;r<t.length;r++){let n=it(t[r]);n.match(/Disc\s?Size|\.mpls/i)&&(o+=n),n.match(/Unique ID/i)&&(s+=n)}return o||(o=U(e)),{bdinfo:o,mediaInfo:s}},it=e=>e.replace(/\[(.+)\]?/g,"").replaceAll("\u200D",""),rt=e=>{if(e.match(/More\.Screens/i)){let t=e.match(/\.More\.Screens\[\/u\]\[\/color\]\n((.|\n)+\[\/(url|img)\])/)?.[1];return Y(t)}else return Y(e)},st=(e,t)=>e.match(/HDTV/i)?"hdtv":e.match(/web(-)*(dl|rip)/i)?"web":e.match(/remux/i)?"remux":e.match(/dvdrip/i)?"dvdrip":e.match(/x264|x265/i)?"encode":t,ae=e=>$(`#main_table td.heading:contains(${e})`).next(),ct=e=>{let t="movie",{title:o,subtitle:s}=a;return o.match(/s0?\d{1,2}/i)||e.match(/集\s*数/)?o.match(/s0?\d{1,2}e0\d{1,2}/i)||s.match(/第[^\s]集/)?t="tv":t="tvPack":e.match(/动画/)?t="cartoon":e.match(/纪录/)&&(t="documentary"),t};var Se=()=>{a.sourceSite=m,a.sourceSiteType=h.siteType;let{Category:e,Name:t,Type:o,Size:s,Resolution:r}=nt();a.size=F(s);let n=N(t);a.title=N(t);let l=A(a.title),i=$(".movie-heading span:last").text(),p=$(".movie-heading span:first").text();if(m==="HDPOST"&&(n=n.replace(p,"").trim()),a.title=n,i)a.year=i.replace(/\(|\)|\s/g,"");else{let x=a.title.match(/(19|20)\d{2}/g);a.year=x?.pop()??""}a.resolution=r;let b=$(".panel-heading:contains(Description)+div .panel-body"),u=S(b[0]),c=$(".decoda-code code").text();a.description=`${u}
[quote]${c}[/quote]`;let d=$(".movie-details a:contains(IMDB)").attr("href");a.imdbUrl=d,a.movieName=m==="HDPOST"?"":p;let f=lt(e);a.category=R(a,f),a.source=O(a.title),a.videoType=dt(o,r);let y=a.videoType.match(/bluray/i),g=U(u),D=y?B:w,P=y?g:c,{videoCodec:_,audioCodec:T,mediaTags:v}=D(P);return a.mediaInfo=P,a.videoCodec=_,a.audioCodec=T,a.tags={...l,...v},a.screenshots=a.description.match(/\[url=.+?\]\[img\].+?\[\/img\]\[\/url]/g)??[],a},nt=()=>{let e={};return $("#vue+.panel table tr").each((t,o)=>{let s=$(o).find("td:first").text().replace(/\s|\n/g,""),r=$(o).find("td:last").text();e[s]=r.replace(/\n/g,"").trim()}),e},lt=e=>{if(!e)return"";if(e.match(/movie|电影/i))return"movie";if(e.match(/tv|电视|剧集/))return"tv"},dt=(e,t)=>(e=e.replace(/\s/g,""),e.match(/FullDisc/)?t.match(/2160p/i)?"uhdbluray":t.match(/1080/)?"bluray":"dvd":e.match(/Encode/i)?"encode":e.match(/web/i)?"web":e.match(/HDTV/i)?"hdtv":e);var Ie=()=>{let e=$("#top").text().split(/\s{3,}/)?.[0]?.trim(),t=$("td.rowhead:contains('\u57FA\u672C\u4FE1\u606F'), td.rowhead:contains('\u57FA\u672C\u8CC7\u8A0A')").next().text().replace(/:/g,":"),o=$("td.rowhead:contains('\u526F\u6807\u9898'), td.rowhead:contains('\u526F\u6A19\u984C')").next().text(),s=$("#kimdb>a").attr("href"),r=S($("#kdescr")[0]);if(m==="HDArea"&&(e=$("h1#top").text().split(/\s{3,}/)?.[0]?.trim()),m==="TJUPT"&&(e=(e.match(/\[((\w|\.|\d|-|\s)+)\]/g).filter(I=>I.match(/\.| /))?.[0]??"").replace(/\[|\]/g,"")),m==="PTer"&&(r=$("#descrcopyandpaster").val().replace(/hide(=(MediaInfo|BDInfo))?\]/ig,"quote]")),m==="LemonHD"&&(r=r.replace(/\[b\]\[color=\w+\][^[]+?网上搜集[^[]+?\[\/color\]\[\/b\]/,"")),m==="HDChina"){let v=[];$("li:contains('\u57FA\u672C\u4FE1\u606F'):last").next("li").children("i").each(function(){v.push($(this).text().replace("\uFF1A",":"))}),t=v.join("\xA0\xA0\xA0"),o=$("#top").next("h3").text()}if(m==="OurBits"&&(s=$(".imdbnew2 a:first").attr("href"),a.doubanUrl=$("#doubaninfo .doubannew a").attr("href"),a.doubanUrl)){let v=S($(".doubannew2 .doubaninfo")?.[0]),x=`[img]${$("#doubaninfo .doubannew a img").attr("src")}[/img]
`;a.doubanInfo=x+v}if(m==="KEEPFRDS"&&([e,o]=[o,e]),m==="SSD"){a.doubanUrl=$(".douban_info a:contains('://movie.douban.com/subject/')").attr("href");let v=S($(".douban-info artical")?.[0]),x=$("#kposter").find("img")?.attr("src")??"",I=x?`[img]${x} [/img]
`:"";if(a.doubanInfo=I+v?.replace(/\n{2,}/g,`
`)??"",r===""||r===void 0){let k=S($(".torrent-extra-text-container .extra-text")?.[0]);k=k?`
[quote]${k}[/quote]
`:"";let E=$(".screenshot").find("img"),K=[];E&&E.each((re,$e)=>{K.push(`[img]${$($e).attr("src").trim()}[/img]`)});let L=K.join(""),V=$("section[data-group='mediainfo'] .codemain").text(),J=`
[quote]${V}[/quote]
`;a.mediaInfo=V,r=k+J+L}s=$(".douban_info a:contains('://www.imdb.com/title/')").attr("href")}m==="LemonHD"&&(t+=$("td.rowhead:contains('\u8BE6\u7EC6\u4FE1\u606F')").next().text().replace(/:/g,":"),t.match(/分辨率:/)===null&&(t=t.replace("\u5206\u8FA8\u7387","\u5206\u8FA8\u7387:")));let n=e.match(/(19|20)\d{2}/g),{category:l,videoType:i,videoCodec:p,audioCodec:b,resolution:u,processing:c,size:d}=mt(t);a.sourceSite=m,a.sourceSiteType=h.siteType;let f=r.match(/https:\/\/(movie\.)?douban.com\/subject\/\d+/)?.[0];f&&(a.doubanUrl=f);let y=r.match(/http(s)?:\/\/www.imdb.com\/title\/tt\d+/)?.[0];if(y?a.imdbUrl=y:s&&(a.imdbUrl=s.match(/www.imdb.com\/title/)?s:""),a.year=n?n.pop():"",a.title=e,a.subtitle=o,a.description=r,!c||c.match(/raw/)){let v=r.match(/(产\s+地|国\s+家)】?\s*(.+)/)?.[2];v&&(a.area=H(v))}else a.area=H(c);let g=R(a,ht(l||r));if(a.category=g,a.videoType=pt(i||a.title),a.source=O(a.title),a.size=d?F(d):"",a.screenshots=Y(r),a.tags=A(a.subtitle),m.match(/beitai/i)){if(r.match(/VIDEO\s*(\.)?CODEC/i)){let v=r.match(/VIDEO\s*(\.)?CODEC\.*:?\s*([^\s_,]+)?/i)?.[2];v&&(a.videoCodec=v.replace(/\.|-/g,"").toLowerCase())}}else a.videoCodec=Q(p||a.title);a.resolution=gt(u||a.title),a.audioCodec=q(b||a.title);let D=a.videoType.match(/bluray/i),{bdinfo:P,mediaInfo:_}=ut(r),T=D?P:a.mediaInfo||_;if(T){a.mediaInfo=T;let v=D?B:w,{videoCodec:x,audioCodec:I,resolution:k,mediaTags:E}=v(T);x!==""&&I!==""&&k!==""&&(a.videoCodec=x,a.audioCodec=I,a.resolution=k,a.tags={...a.tags,...E})}},mt=e=>{let t="\u5206\u8FA8\u7387|\u89E3\u6790\u5EA6|\u683C\u5F0F",o="\u5A92\u4ECB|\u6765\u6E90|\u8D28\u91CF";m==="SSD"&&(t="\u5206\u8FA8\u7387|\u89E3\u6790\u5EA6",o="\u683C\u5F0F"),m.match(/TLF|HDAI/i)&&(o="\u5A92\u4ECB");let s=G("\u7C7B\u578B|\u5206\u7C7B|\u985E\u5225",e),r=G(o,e),n=G("\u7F16\u7801|\u7DE8\u78BC",e),l=G("\u97F3\u9891|\u97F3\u9891\u7F16\u7801",e),i=G(t,e),p=G("\u5904\u7406|\u8655\u7406|\u5730\u533A",e),b=G("\u5927\u5C0F",e);return console.log({category:s,videoType:r,videoCodec:n,audioCodec:l,resolution:i,processing:p,size:b}),{category:s,videoType:r,videoCodec:n,audioCodec:l,resolution:i,processing:p,size:b}},ut=e=>{let t=e.match(/\[quote\](.|\n)+?\[\/quote\]/g)??[],o="",s="";for(let r=0;r<t.length;r++){let n=ft(t[r]);n.match(/Disc\s?Size|\.mpls/i)&&(o+=n),n.match(/Unique\s*ID/i)&&(s+=n)}return o||(o=U(e)),{bdinfo:o,mediaInfo:s}},ft=e=>e.replace(/\[\/?(quote)\]{1}?/g,"").replaceAll("\u200D",""),G=(e,t)=>{let o=`(${e}):\\s?([^\u4E00-\u9FA5]+)?`;e.match(/大小/)&&(o=`(${e}):\\s?((\\d|\\.)+\\s+(G|M|T|K)(i)?B)`),m.match(/KEEPFRDS|TJUPT|PTSBAO|PTHome|HDTime|BTSCHOOL|TLF|HDAI/)&&e.match(/类型/)&&(o=`(${e}):\\s?([^\\s]+)?`),m==="PTer"&&e.match(/类型|地区/)&&(o=`(${e}):\\s?([^\\s]+)?`);let s=new RegExp(o),r=t.match(s,"i")?.[2];if(r)return r.replace(/\s/g,"").trim().toLowerCase()},pt=e=>e?(e=e.replace(/[.-]/g,"").toLowerCase(),e.match(/encode|x264|x265|bdrip|hdrip/ig)?"encode":e.match(/remux/ig)?"remux":e.match(/uhd|ultra/ig)?"uhdbluray":e.match(/blu/ig)?"bluray":e.match(/webdl/ig)?"web":e.match(/hdtv/ig)?"hdtv":e.match(/dvdr/ig)?"dvdrip":e.match(/dvd/ig)?"dvd":""):"",ht=e=>e?(e=e.replace(/[.-]/g,"").toLowerCase(),e.match(/movie|bd|ultra|电影/ig)?"movie":e.match(/tv|drama|剧集|电视/ig)?"tv":e.match(/TVSeries/ig)?"tvPack":e.match(/综艺/ig)?"variety":e.match(/document|纪录|紀錄|Doc/ig)?"documentary":e.match(/sport|体育/ig)?"sport":e.match(/mv|演唱|concert/ig)?"concert":e.match(/anim|动(画|漫)/ig)?"cartoon":""):"",gt=e=>(e=e===void 0?"":e.toLowerCase(),e.match(/4k|2160|UHD/ig)?"2160p":e.match(/1080(p)?/ig)?"1080p":e.match(/1080i/ig)?"1080i":e.match(/720(p)?/ig)?"720p":e.match(/sd/ig)?"480p":e);var j=_e;h?h.siteType==="NexusPHP"?j=Ie:m==="BeyondHD"?j=xe:m==="HDBits"?j=Pe:m==="TTG"?j=Ce:h.siteType==="UNIT3D"&&(j=Se):j=void 0;var we=j;var sa=GM_addStyle(`
.seed-dom h4{
text-align: center;
margin: 0;
font-size: 14px;
font-weight: 500;
margin-bottom: 15px;
}
.site-list,.search-list{
margin: 0;
padding: 0;
list-style: none;
display: flex;
justify-content: center;
margin-bottom: 15px;
flex-wrap: wrap;
}
.seed-dom li,.search-list li {
margin-top: 0;
margin-bottom: 0;
margin-left: 0;
margin-right: 5px;
line-height: 24px;
}
.seed-dom li:last-child span{
display: none;
}
.search-list li:last-child span{
display: none;
}
.seed-dom li a{
font-weight: 600;
}
.seed-dom .function-list{
display: flex;
justify-content: space-around;
}
.upload-section,.douban-section{
display: flex;
justify-content: center;
margin-bottom: 15px;
align-items: center;
}
.upload-section .upload-status,.douban-section .douban-status{
margin-left: 5px;
font-size: 14px;
font-weight: 600;
}
#img-transfer,#douban-info{
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;
}
#img-transfer:hover,#douban-info:hover {
background: #fff;
border-color: #409eff;
color: #409eff
}
#img-transfer.is-disabled, #img-transfer.is-disabled:hover,#douban-info.is-disabled, #douban-info.is-disabled:hover {
color: #c0c4cc;
cursor: not-allowed;
background-image: none;
background-color: #fff;
border-color: #ebeef5;
}
.upload-section #nsfw{
margin-left: 0;
position: static;
}
.upload-section label{
padding-left: 0;
}
#kdescr img{
max-width: 100%;
}
`);var bt=e=>{let o=Object.keys(M).sort().map((l,i)=>{let{url:p,uploadPath:b}=M[l];return M[l].asTarget?`<li>
<a href="javascript:void(0);" data-link="${p}${b}#torrentInfo=null">${l} </a>
<span>|</span>
</li>`:""}),s=Object.keys(X).map(l=>{let i=W(a.imdbUrl),p="",{movieAkaName:b,movieName:u}=a,c=i||b||u;return l==="TTG"&&i&&(c=c.replace("tt","imdb")),l==="nzb.in"&&(b||u)&&(c=b||u),p=X[l].replace("{imdbid}",c),p=p.replace("{searchArea}",i?"4":"0"),`<li><a href="${p}" target="_blank">${l}</a> <span>|</span></li>`}),r=h.needDoubanInfo?`
<div class="function-list-item">
<h4>\u83B7\u53D6\u8C46\u74E3\u7B80\u4ECB</h4>
<div class="douban-section">
<button id="douban-info">\u5F00\u59CB\u83B7\u53D6</button>
<div class="douban-status"></div>
</div>
</div>`:"",n=`
<div class="seed-dom movie-page__torrent__panel">
<h4>\u4E00\u952E\u8F6C\u79CD</h4>
<ul class="site-list">
${o.join("")}
</ul>
<section class="function-list">
${r}
<div class="function-list-item">
<h4>\u8F6C\u7F29\u7565\u56FE</h4>
<div class="upload-section">
<button id="img-transfer">\u5F00\u59CB\u8F6C\u6362</button>
<div class="checkbox">
<input type="checkbox" id="nsfw">
<label for="nsfw">\u662F\u5426\u5305\u542BNSFW</label>
</div>
<div class="upload-status"></div>
</div>
</div>
</section>
<h4>\u5FEB\u901F\u68C0\u7D22</h4>
<ul class="search-list">
${s.join("")}
</ul>
</div>
`;e.prepend(n)},yt=()=>{let e=$(".upload-section .upload-status"),t=a.screenshots.concat(a.comparisonImgs),o=t;if(o.length<1)throw new Error("\u83B7\u53D6\u56FE\u7247\u5217\u8868\u5931\u8D25");o=o.join(`
`);let s=$("#nsfw").is(":checked");e.text("\u8F6C\u6362\u4E2D..."),$("#img-transfer").attr("disabled",!0).addClass("is-disabled"),pe(o,s).then(r=>{if(r.length){let n=r.map(i=>`[url=${i.show_url}][img]${i.th_url}[/img][/url]`);a.screenshots=n.slice(0,a.screenshots.length);let{description:l}=a;t.forEach((i,p)=>{l.includes(i)&&(l=l.replace(`[img]${i}[/img]`,n[p]))}),a.description=l,e.text("\u8F6C\u6362\u6210\u529F\uFF01")}}).catch(r=>{e.text(r.message)}).finally(()=>{$("#img-transfer").removeAttr("disabled").removeClass("is-disabled")})},vt=()=>{let e=$(".page__title>a").attr("href");if(e&&e.match("movie.douban.com"))return a.doubanUrl=e,Be(),!1;let{imdbUrl:t,movieName:o}=a;ue(t,o).then(s=>{a.doubanUrl=s,Be()}).catch(s=>{throw new Error(s.message)})},Be=()=>{let{doubanUrl:e}=a,t=$(".douban-section .douban-status");try{e&&(t.text("\u83B7\u53D6\u4E2D..."),me(e).then(o=>{Tt(o),t.text("\u83B7\u53D6\u6210\u529F")}).catch(o=>{throw new Error(o.message)}))}catch(o){t.text(o.message)}},Tt=e=>{let t=e.format;a.doubanInfo=e.format,a.subtitle=he(e);let o=t.match(/(产\s+地|国\s+家)\s+(.+)/)?.[2];o&&(a.area=H(o));let s=a.category;s==="movie"&&(t.match(/动画/)?s="cartoon":t.match(/纪录/)&&(s="documentary"),a.category=s)},Dt=e=>{$("#imdb").val(e);let t=$('meta[name="csrf_token"]').attr("content");GM_xmlhttpRequest({method:"GET",url:`${h.url}/torrents/filter?imdb=${e}&_token=${t}&sorting=size&direction=desc`,onload(o){$("#facetedSearch").html(o.responseText)}})},_t=()=>{let e=z("imdb");e&&(m==="Blutopia"?Dt(e):m==="Bdc"&&($("#tsstac").val(e),$("#search_type").val("t_genre")))},oe=location.hash&&location.hash.match(/(^|#)torrentInfo=([^#]*)(#|$)/),Z=oe&&oe.length>0?oe[2]:null;if(m&&(_t(),Z&&h.asTarget&&(Z=JSON.parse(decodeURIComponent(Z)),De(Z)),h.asSource&&!location.pathname.match(/upload/ig))){we(),console.log(a);let e=$(h.seedDomSelector);if(h.siteType==="NexusPHP"||m.match(/BeyondHD|TTG|Blutopia|HDPOST/)){let t=`<tr>
<td class="rowhead nowrap">
</td>
<td class="rowfollow easy-seed-td"></td>
</tr>`;e.after(t),e=$(".easy-seed-td")}if(m==="HDBits"){let t=`<tr>
<td class="rowfollow easy-seed-td"></td>
</tr>`;e.after(t),e=$(".easy-seed-td")}if(m==="PTP"){let t=z("torrentid");e=$(`#torrent_${t} >td`)}bt(e),$(".site-list li>a").click(function(){let t=encodeURIComponent(JSON.stringify(a)),o=$(this).data("link");if(o.match(/lemonhd/)){let r={movie:"movie",tv:"tv",tvPack:"tv",variety:"tv",documentary:"doc",concert:"mv"}[a.category]||"movie";o=o.replace("upload_movie",`upload_${r}`)}if(o.match(/hdpost|blutopia/)){let r={movie:"1",tv:"2",tvPack:"2"}[a.category]||"1";o=o.replace("1",r)}if(m==="TTG"&&!a.description){alert("\u8BF7\u7B49\u5F85\u9875\u9762\u52A0\u8F7D\u5B8C\u6210");return}o=o.replace(/(#torrentInfo=)(.+)/,`$1${t}`),window.open(o)}),$("#img-transfer")&&$("#img-transfer").click(()=>{yt()}),$("#douban-info")&&$("#douban-info").click(()=>{vt()})}})();