// ==UserScript==
// @name easy-seed PT一键转种
// @namespace https://github.com/techmovie/easy-seed
// @version 1.1.1
// @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_getValue
// @grant GM_setValue
// @grant GM_openInTab
// @grant GM_xmlhttpRequest
// ==/UserScript==
(()=>{var A=Object.assign;var V={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:"tr:contains(\u57FA\u672C\u4FE1\u606F) ",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:""},me={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}",HDR:"http://hdroute.org/browse.php?dp=0&add=0&action=s&or=4&imdb={imdbid}",UHD:"https://uhdbits.org/torrents.php?searchstr={imdbid}"},xe="https://omit.mkrobot.org/movie/infos",De="https://media.pttool.workers.dev",_e="https://api.tmdb.org",Se="3d62cb1443c6b34b61262ab332aaf78c",We=e=>{let t="";try{return Object.keys(V).forEach(o=>{let r=V[o].host,s=new RegExp(r,"i");r&&e.match(s)&&(t=o)}),t}catch(o){o.message!=="end loop"&&console.log(o)}};var Pe=["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"],u=We(location.host),p=V[u],Ce=["Chotab","CRiSC","CtrlHD","DON","EA","EbP","Geek","LolHD","NTb","RightSiZE","SA89","SbR","TayTo","VietHD"];var z=e=>e.replace(/(?<!(([^\d]+\d{1})|([^\w]+H)))(\.)/ig," ").replace(/\.(?!(\d+))/," ").trim(),Ie=e=>new Promise((t,o)=>{try{if(e)GM_xmlhttpRequest({method:"GET",url:`${De}?url=${e}`,onload(r){let s=JSON.parse(r.responseText);if(s&&s.success)t(s);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(r){o(r.message)}}),we=(e,t)=>new Promise((o,r)=>{try{let s=" https://movie.douban.com/subject/",c=ie(e);c&&GM_xmlhttpRequest({method:"GET",url:`${xe}/${c}`,onload(l){let i=JSON.parse(l.responseText);if(i&&i.data)o(s+i.data.id);else throw new Error("\u83B7\u53D6\u5931\u8D25")}})}catch(s){r(s.message)}}),$e=(e,t)=>new Promise((o,r)=>{let s=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:s,onload(c){let l=c.responseText.match(/(upload_results = )({.*})(;)/);l||r(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(c){r(c.message)}}),J=(e,t)=>{let{description:o,title:r,subtitle:s}=e;return t==="movie"?o.match(/动画/)?t="cartoon":o.match(/纪录/)&&(t="documentary"):(t==null?void 0:t.match(/tv/))&&(r.match(/(s0?\d{1,2})?e(p)?\d{1,2}/i)||s.match(/第[^\s]集/)?t="tv":t="tvPack"),t},ee=e=>{let t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),o=location.search.substr(1).match(t);return o?unescape(o[2]):""},te=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":""):"",ue=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":""),ne=e=>{let t=e.match(/(\[url=(http(s)*:\/{2}.+?)\])?\[img\](.+?)\[\/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=>{var s,c;let r="";return o.match(/\[url=http(s)*:.+/)?r=(s=o.match(/=(([^\]])+)/))==null?void 0:s[1]:r=(c=o.match(/img\](([^[])+)/))==null?void 0:c[1],r})},Z=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",Be=e=>{let{chinese_title:t,this_title:o,trans_title:r}=e,s="";t.match(/[\u4e00-\u9fa5]+/)&&(s+=t);let c=o.concat(r).filter(l=>s!==l);return`${s}${c.length>0?"/":""}${c.join("/")}`};var G=e=>{let t=Pe;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"},ke=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"},Ee=e=>{try{return new Promise((t,o)=>{GM_xmlhttpRequest({method:"GET",url:`${_e}/3/find/${e}?api_key=${Se}&language=en&external_source=imdb_id`,onload(r){var d;let s=JSON.parse(r.responseText),c=s.movie_results&&s.movie_results.length>0,l=!s.tv_results&&s.tv_results.length>0;r.status!==200&&!c&&!l&&o(new Error("\u8BF7\u6C42\u5931\u8D25"));let i=c?s.movie_results[0].id:(d=s.tv_results[0])==null?void 0:d.id;t(i)}})})}catch(t){console.log(t)}},ie=e=>{let t=/tt\d+/.exec(e);return t&&t[0]?t[0]:""},Y=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:"":"",L=e=>{if(!e)return!1;let t=e.split(/\n\s*\n/),[o,r]=t,s=t.filter(T=>T.startsWith("Video #2")),[c,...l]=t.filter(T=>T.startsWith("Audio")),i=t.filter(T=>T.startsWith("Text")),d=M("Complete name",o).replace(/\.avi|\.mkv|\.mp4|\.ts/i,""),h=Y(M("File size",o)),{videoCodec:m,isHdr:g,isDV:b}=Qe(r,o,s),{audioCodec:v,channelName:f,languageArray:P}=Ze(c,l),x=i.map(T=>M("Language",T)),_=Ne(v,f,P,x,g,b),I=Ye(r);return{fileName:d,fileSize:h,videoCodec:m,audioCodec:v,resolution:I,mediaTags:_}},M=(e,t)=>{if(!t)return"";let o=e.replace(/\s/,"\\s*").replace(/(\(|\))/g,"\\$1"),r=new RegExp(`${o}\\s*:\\s([^
]+)`,"i");return t.match(r)?t.match(r)[1]:""},Ye=e=>{let t=parseInt(M("Height",e).replace(/\s/g,"")),o=parseInt(M("Width",e).replace(/\s/g,"")),r=M("Scan type",e);return t>1080?"2160p":t>720&&r==="Progressive"?"1080p":t>720&&r!=="Progressive"?"1080i":t>576||o>1024?"720p":t>480||o===1024?"576p":o>=840||t===480?"480p":""},Ne=(e,t,o,r,s,c)=>{let l=o.includes("Chinese"),i=r.includes("Chinese"),d={};return l&&(d.chineseAudio=!0),o.includes("Cantonese")&&(d.cantoneseAudio=!0),i&&(d.chineseSubtitle=!0),s&&(s.match(/HDR10\+/i)?d["HDR10+"]=!0:d.HDR=!0),c&&(d.DolbyVision=!0),e.match(/dtsx|atmos/ig)&&(d[e]=!0),d},Qe=(e,t,o)=>{let r=M("Format",t),s=M("Format",e),c=M("Format version",e),l=M("Codec ID",e),i=M("HDR format",e),d=o.length>0&&M("HDR format",o[0]).includes("Dolby Vision"),h=!!M("Encoding settings",e),m="";return r==="DVD Video"?m="DVD":r==="MPEG-4"?m="mpeg4":s==="MPEG Video"&&c==="Version 2"?m="mpeg2":l.match(/xvid/i)?m="xvid":s.match(/HEVC/i)&&!h?m="hevc":s.match(/HEVC/i)&&h?m="x265":s.match(/AVC/i)&&h?m="x264":s.match(/AVC/i)&&!h?m="h264":s.match(/VC-1/i)&&(m="vc1"),{videoCodec:m,hdrFormat:i,isDV:d}},Ze=(e,t=[])=>{let o=M("Format",e),r=M("Channel(s)",e),s=M("Commercial name",e),c=[e,...t].map(h=>M("Language",h)),l="",i="",d=parseInt(r);return d&&d>=6?l=`${d-1}.1`:l=`${d}.0`,o.match(/MLP FBA/i)&&s.match(/Dolby Atmos/i)?i="atmos":o.match(/MLP FBA/i)&&!s.match(/Dolby Atmos/i)?i="truehd":o.match(/AC-3/i)&&s.match(/Dolby Digital Plus/i)?i="dd+":o.match(/AC-3/i)&&s.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)&&s.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:c}},q=e=>{var k,E,S,O;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),r=e.match(/FILES:/i),s=new RegExp(`SUBTITLE(S)*:(\\s|Codec|Bitrate|Description|Language|-)*((.|\\n)*)${r?"FILES:":""}`,"i"),c=e.match(s),l=new RegExp(`AUDIO:(\\s|Codec|Bitrate|Description|Language|-)*((.|\\n)*)${c?"(SUBTITLE(S)?)":r?"FILES:":""}`,"i"),i=e.match(l),d=(E=(k=e.match(/Disc\s*Size:\s*((\d|,| )+)bytes/))==null?void 0:k[1])==null?void 0:E.replace(/,/g,""),h=!e.match(/PLAYLIST REPORT/i),m=ge(o,2),[g="",b=""]=m,v=g.match(/2160/)?"hevc":"h264",f=(S=g.match(/\/\s*HDR(\d)*(\+)*\s*\//i))==null?void 0:S[0],P=!!b.match(/\/\s*Dolby\s*Vision\s*/i),x=ge(i,2),_=ge(c,3),I=(O=g.match(/\d{3,4}(p|i)/))==null?void 0:O[0],{audioCodec:T="",channelName:w="",languageArray:B=[]}=Xe(x,h),C=_.map(N=>{var R,K;let n=(R=N.match(/(\w+)\s*\//))==null?void 0:R[1],y=(K=N.match(/Graphics\s*(\w+)\s*(\d|\.)+\s*kbps/i))==null?void 0:K[1];return h?n:y}),H=Ne(T,w,B,C,f,P);return{fileSize:d,videoCodec:v,audioCodec:T,resolution:I,mediaTags:H}},ge=(e,t)=>{var o,r;return(r=(o=e==null?void 0:e[t])==null?void 0:o.split(`
`).filter(s=>!!s))!=null?r:[]},Xe=(e,t)=>{var m,g;if(e.length<1)return{};let o=e.sort((b,v)=>{var x,_;let f=parseInt((x=b.match(/\/\s*(\d+)\s*kbps/i))==null?void 0:x[1]);return parseInt((_=v.match(/\/\s*(\d+)\s*kbps/i))==null?void 0:_[1])-f}),[r,s]=o,c=te(r),l=te(s),i=c,d=(m=r.match(/\d\.\d/))==null?void 0:m[0];c==="lpcm"&&l==="dtshdma"&&(i=l,d=(g=r.match(/\d\.\d/))==null?void 0:g[0]);let h=o.map(b=>{var x,_;let v=(x=b.match(/(\w+)\s*\//))==null?void 0:x[1],f=(_=b.match(/Audio\s*(\w+)\s*\d+\s*kbps/))==null?void 0:_[1];return t?v:f});return{audioCodec:i,channelName:d,languageArray:h}},et=({pre:e,post:t,tracker:o},r,s)=>{let c=typeof e!="undefined"&&e!==null,l=typeof t!="undefined"&&t!==null;c&&e.unshift(r),l&&t.push(s)},F=e=>{if(e)return He(e).replace(/\[quote\]((.|\n)*?)\[\/quote\]/g,function(o,r){return r&&r.match(/温馨提示|郑重|PT站|网上搜集|本种子|商业盈利|带宽|寬帶|法律责任|Quote:|正版|商用|转载|注明|后果|负责/)?"":o})},tt=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):""),Re=e=>/rgba?/.test(e)?tt(e):e,He=e=>{let t=[],o=[],r=[],s=et.bind(null,{pre:o,post:r});switch(e.nodeType){case 1:{switch(e.tagName.toUpperCase()){case"UL":{s(null,null);break}case"OL":{s("[list=1]","[/list]");break}case"LI":{let{className:m}=e;if(p.siteType==="UNIT3D"&&m){s("[quote]","[/quote]");break}else{s("[*]",`
`);break}}case"B":{s("[b]","[/b]");break}case"U":{s("[u]","[/u]");break}case"I":{s("[i]","[/i]");break}case"DIV":if(e.className==="codemain"){s(`
[quote]`,"[/quote]");break}else{s(`
`,`
`);break}case"P":{s(`
`);break}case"BR":{p.siteType==="NexusPHP"&&u!=="OurBits"?s(""):s(`
`);break}case"SPAN":{s(null,null);break}case"BLOCKQUOTE":case"PRE":case"FIELDSET":{let{tagName:m,className:g,lastElementChild:b}=e;if(m==="BLOCKQUOTE"&&u==="PTP"&&g.match(/spoiler/))return b.tagName==="BLOCKQUOTE"?`[quote]${b.textContent}[/quote]`:`[quote]${e.textContent}[/quote]`;s("[quote]","[/quote]");break}case"TD":if(u.match(/TTG|HDBits/)){s("[quote]","[/quote]");break}else return"";case"IMG":{let m="",{src:g}=e,b=e.getAttribute("data-src")||e.getAttribute("data-echo");if(b)m=b.match(/(http(s)?:)?\/\//)?b:location.origin+"/"+b;else if(g&&!g.match(/ico_\w+.gif|jinzhuan/))m=g;else return"";return`[img]${m}[/img]`}case"FONT":{let{color:m}=e;m&&s(`[color=${Re(m)}]`,"[/color]");break}case"A":{let{href:m,textContent:g}=e;if(m&&m.length>0){if(m.match(/javascript:void/))return"";if(u==="PTP"&&g.match(/Show comparison/))return"";s(`[url=${m}]`,"[/url]")}break}case"H1":{s('[b][size="7"]',`[/size][/b]
`);break}case"H2":{s('[b][size="6"]',`[/size][/b]
`);break}case"H3":{s('[b][size="5"]',`[/size][/b]
`);break}case"H4":{s('[b][size="4"]',`[/size][/b]
`);break}}let{textAlign:c,fontWeight:l,fontStyle:i,textDecoration:d,color:h}=e.style;if(c)switch(c.toUpperCase()){case"LEFT":{s("[left]","[/left]");break}case"RIGHT":{s("[right]","[/right]");break}case"CENTER":{s("[center]","[/center]");break}}(l==="bold"||~~l>=600)&&s("[b]","[/b]"),i==="italic"&&s("[i]","[/i]"),d==="underline"&&s("[u]","[/u]"),h&&h.trim()!==""&&s(`[color=${Re(h)}]`,"[/color]");break}case 3:return e.textContent.match(/引用|Quote|代码|代碼|Show|Hide|Hidden text|\[show\]|Spoiler/)?"":e.textContent;default:return null}return e.childNodes.forEach((c,l)=>{let i=He(c);i&&t.push(i)}),o.concat(t).concat(r).join("")},j=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},W=e=>{var r,s;if(!e)return"";let t=e.match(/\[quote(=\w+)?\](.|\n)+?\[\/quote\]/g),o="";return t&&t.length>0&&t.forEach(c=>{c.match(/Disc\s*Size/i)&&(o+=c.replace(/\[(\/)?(quote|font)(=(\w| )+)?\]/gi,"").trim()+`
`)}),o||(o=(s=(r=e.match(/Disc\s+(Title|Label)[^[]+/i))==null?void 0:r[0])!=null?s:""),o},pe=e=>{if(!("Notification"in window)||Notification.permission==="denied")alert(e.text);else if(Notification.permission==="granted"){let t=new Notification(e.title,{body:e.text});t.onerror=()=>{alert(e.text)}}else Notification.permission!=="denied"&&Notification.requestPermission(function(t){if(t==="granted"){let o=new Notification(e.title,{body:e.text});o.onerror=()=>{alert(e.text)}}else alert(e.text)})};var Ae=e=>{var g,b,v,f,P,x,_,I,T,w,B,C,H,k,E,S,O,N;console.log(e),u==="PTSBAO"&&localStorage.getItem("autosave")&&localStorage.removeItem("autosave");let t=ie(e.imdbUrl),o=e.videoType.match(/bluray/i),{screenshots:r=[]}=e,s=(g=p.imdb)==null?void 0:g.selector;if(u==="HDRoute"?$(s).val((b=t==null?void 0:t.replace("tt",""))!=null?b:""):s&&$(s).val(e.imdbUrl),u==="HDBits"){let n=e.title.replace(/([^\d]+)\s+([12][90]\d{2})/,(y,D,R)=>`${e.movieName||e.movieAkaName} ${R}`);e.videoType==="remux"&&(n=n.replace(/\s+(bluray|blu-ray)/ig,"")),e.title=n}if(p.name){let{title:n,subtitle:y}=e,D=n;u==="TTG"?D+=`[${y}]`:u==="SSD"&&(D=n.replace(/\s/ig,".")),$(p.name.selector).val(D)}ot(),["subtitle","douban","area","audioCodec"].forEach(n=>{let y=p[n];if(y&&y.selector){let D=e[n];n==="douban"?D=e.doubanUrl:(n==="area"||n==="audioCodec")&&(D=y.map[e[n]]),$(y.selector).val(D)}});let l=e.mediaInfo,i="";if(e.description)if(i=e.description,be(p.siteType)&&u!=="SSD"){let{doubanInfo:n}=e;n&&(i=n+i)}else{let{sourceSiteType:n}=e;be(n)&&(i=st(e))}if(p.mediaInfo&&(o&&u.match(/HDBits|Blutopia/)||($(p.mediaInfo.selector).val(l),i=i.replace(l.trim(),""))),p.screenshots&&r.forEach(n=>{i.includes(n)&&(i=i.replace(n,""),n.match(/\[url=.+?\[url]/)||(i=i.replace(/\[img\]\[\/img\]\n*/g,"")))}),u==="SSD"&&($(p.imdb.selector).val(e.doubanUrl||e.imdbUrl),$(p.screenshots.selector).val(r.join(`
`)),(e.category==="tvPack"||e.title.match(/Trilogy|Collection/i)||e.subTitle&&e.subTitle.match(/合集/))&&$('input[name="pack"]').attr("checked",!0)),u==="HDAI"&&($(p.imdb.selector).val(e.doubanUrl||e.imdbUrl),$(p.screenshots.selector).val(r.join(`
`)),o&&$('input[type="checkbox"][name="tag[o]"]').attr("checked",!0)),p.poster){let n=(e.description+e.doubanInfo).match(/\[img\](http[^[]+?poster[^[]+?)\[\/img\]/);if(n&&n[1]){let y=n[1];$(p.poster).val(y),u==="HDRoute"&&($('input[name="poster"]').val(y),i=i.replace(y,""))}}if(i=ct(i),$(p.description.selector).val(rt(e)+i.trim()),u.match(/BeyondHD|Blutopia|HDPOST/)){let n=p.siteType==="UNIT3D"?t.replace("tt",""):t;if($(p.imdb.selector).val(n),Ee(t).then(y=>{$(p.tmdb.selector).val(y)}),u==="BeyondHD"){let{category:y,videoType:D}=e;if(e.category=D,e.videoType=y,o){let R=ke(e.size);D==="uhdbluray"&&R==="BD50"&&(R="uhd50"),e.category=R}}}let d=p.category.map[e.category],h=["videoCodec","videoType","resolution","source","area"],m=[];if(Array.isArray(d)?(m=[...d],h.forEach(n=>{m=Ue(p,e,n,m),m.length===1&&$(p.category.selector).val(m[0])})):[...h,"category"].forEach(n=>{Ue(p,e,n,m)}),u.match(/HDHome|PTHome/i)&&$(p.category.selector).change(),p.anonymous){let{selector:n,value:y=""}=p.anonymous;y?$(n).val(y):$(n).attr("checked",!0)}if(p.tags&&Object.keys(e.tags).forEach(n=>{e.tags[n]&&p.tags[n]&&$(p.tags[n]).attr("checked",!0)}),at(e),u.match(/PTHome|HDSky|LemonHD/i)&&e.tags.DIY){let n="";if(u==="PTHome")n=e.videoType==="bluray"?"14":"13";else if(u==="HDSky")n=e.videoType==="bluray"?"12":"14";else if(u==="LemonHD"){$('select[name="tag_diy"]').val("yes");return}$(p.videoType.selector).val(n)}if(u.match(/HDU/)){let n="",{resolution:y,videoType:D,category:R}=e,K=R.match(/tv/);D==="remux"&&(y==="2160p"?n=K?"16":"15":n=K?"12":"3"),K&&(D==="encode"?n="14":D==="web"&&(n="13")),n&&$(p.videoType.selector).val(n),D.match(/bluray/)&&$(p.category.selector).val("424")}if(u==="TJUPT"&&($("#browsecat").change(),it(e)),u==="NYPT"){$("#browsecat").change();let n=setTimeout(()=>{let D={movie:"#movie_enname",tv:"#series_enname",tvPack:"#series_enname",documentary:"#doc_enname",variety:"#show_enname",cartoon:"#anime_enname"}[e.category];D&&$(D).val(e.title),clearTimeout(n)},2e3)}if(p.siteType==="UNIT3D"&&e.category.match(/tv/)){let n=(f=(v=e.title.match(/S0?(\d{1,2})/i))==null?void 0:v[1])!=null?f:1,y=(x=(P=e.title.match(/EP?0?(\d{1,3})/i))==null?void 0:P[1])!=null?x:0;$("#season_number").val(n),$("#episode_number").val(y)}if(u==="HDRoute"){let{description:n,doubanInfo:y}=e,D=n+y,R=(I=(_=D.match(/IMDb评分\s+(\d(\.\d)?)/i))==null?void 0:_[1])!=null?I:"";$("#upload-imdb").val(R);let K=(w=(T=D.match(/(片\s+名)\s+(.+)?/))==null?void 0:T[2])!=null?w:"",re=(k=(H=(C=(B=D.match(/(译\s+名)\s+(.+)/))==null?void 0:B[2])==null?void 0:C.split("/"))==null?void 0:H[0])!=null?k:"",le=(N=(O=(S=(E=D.match(/(简\s+介)\s+([^[◎]+)/))==null?void 0:E[2])==null?void 0:S.split("/"))==null?void 0:O[0])!=null?N:"",ce=K;K.match(/[\u4e00-\u9fa5]+/)||(ce=re.match(/[\u4e00-\u9fa5]+/)?re:K),$("#title_chs").val(ce),$("#upload_introduction").val(le)}},Ue=(e,t,o,r)=>{let s=e[o]?e[o].map[t[o]]:void 0;return Array.isArray(s)&&r?(e[o].selector&&$(e[o].selector).val(s.shift()),r.length>1&&(r=r.filter(c=>s.includes(c)))):e[o]&&e[o].selector&&$(e[o].selector).val(s),r},at=e=>{var s,c,l;let t=e.title.match(/-([^-]+)$/),o=p.team,r=(l=(c=(s=t==null?void 0:t[1])==null?void 0:s.replace(/-/g,""))==null?void 0:c.split("@"))!=null?l:"";if(r){if(r=r.length>1?r[1]:r[0],Ce.includes(r)&&u==="BTSCHOOL"){$(o.selector).val(o.map.hdbint);return}}else r="other";if(r&&o){let i=o.map[r.toLowerCase()],d=i||o.map.other;if(u==="HDAI"&&!i){$('input[name="team"]').val(r);return}$(o.selector).val(d.toLowerCase())}},ot=()=>{var t,o;let e=(o=(t=p.name)==null?void 0:t.selector)!=null?o:"";if(e.match(/^#\w+/)){let r=$(e).clone().attr("name","").hide();$(e).attr("id","").after(r)}},st=e=>{let{description:t,screenshots:o=[]}=e,r="",s=t.match(/\[quote(=\w+)?\](.|\n)+?\[\/quote\]/g);s&&s.length>0&&s.forEach(l=>{let i=l.match(/Disc\s?Size|\.mpls|Unique\s?ID|唯一ID|Resolution/i);(!l.match(/[\u4e00-\u9fa5]+/i)||i)&&(r+=l+`
`)});let c=o.map(l=>l.match(/\[url=.+\]/i)?l:`[img]${l}[/img]`);return r+`
`+c.join("")},rt=e=>{let t=be(p.siteType)||u==="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]
`},be=e=>e.match(/NexusPHP|TTG/),ct=e=>e.replace(/(\[\w+(=(\w|\s)+)?\](\s|\n)*)+(\s|\n)*(\[\/\w+\](\s|\n)*)+/g,""),it=e=>{let t=setTimeout(()=>{var o,r,s,c,l,i,d,h,m,g,b,v,f,P;if($("#ename")){let{title:x,description:_,doubanInfo:I,category:T,resolution:w}=e;$("#ename").val(x);let B=_+I,C=(r=(o=B.match(/(产\s+地|国\s+家)\s+(.+)/))==null?void 0:o[2])!=null?r:"";C=C.replace(/\[\/?.+?\]/g,"");let H=(c=(s=B.match(/(片\s+名)\s+(.+)?/))==null?void 0:s[2])!=null?c:"",k=(h=(d=(i=(l=B.match(/(译\s+名)\s+(.+)/))==null?void 0:l[2])==null?void 0:i.split("/"))==null?void 0:d[0])!=null?h:"",E=(v=(b=(g=(m=B.match(/(主\s+演)\s+([^◎]+)/))==null?void 0:m[2])==null?void 0:g.split(`
`))==null?void 0:b.filter(n=>!!n))!=null?v:[],S=(P=(f=B.match(/(语\s+言)\s+(.+)/))==null?void 0:f[2])!=null?P:"",O=E.map(n=>{var y;return(y=n.trim().split(/\s+/))==null?void 0:y[0]}).join("/");if(C){if(T==="movie")$("#district").val(C.replace(/,/g,"/").replace(/中国/,""));else if(T.match(/tv/)){let n="";C.match(/大陆/)?n="#specificcat1":C.match(/台|港/)?n="#specificcat2":C.match(/美国/)?n="#specificcat3":C.match(/英国/)?n="#specificcat7":C.match(/日本/)?n="#specificcat4":C.match(/韩国/)?n="#specificcat5":n="#specificcat6",$(n).attr("checked",!0),getcheckboxvalue("specificcat")}else if(T.match(/variety/)){let n={CN:"#district1",HK:"#district2",TW:"#district2",JP:"#district4",KR:"#district4",US:"#district3",EU:"#district3",OT:"#district5"};$(n[e.area]).attr("checked",!0),getcheckboxvalue("district")}}if($("#format")&&(T.match(/variety/)?(w.match(/720/)?$("#format3").attr("checked",!0):w.match(/1080/)&&$("#format5").attr("checked",!0),getcheckboxvalue("format")):T.match(/documentary/)&&(w.match(/720/)?$("#format2").attr("checked",!0):w.match(/1080/)&&$("#format1").attr("checked",!0),getradiovalue("format"))),$("#language")){let n="";S&&(S.match(/汉语/)?n="#language1":S.match(/粤/)?n="#language2":S.match(/英语/)?n="#language3":S.match(/日语/)?n="#language4":S.match(/韩语/)&&(n="#language5"),$(n).attr("checked",!0),getcheckboxvalue("language"))}T.match(/variety/)&&$("#tvshowsguest").val(O);let N=H;H.match(/[\u4e00-\u9fa5]+/)||(N=k.match(/[\u4e00-\u9fa5]+/)?k:""),$("#cname").val(N),clearTimeout(t)}},2e3)};var Me=()=>{var O,N,n;let e=ee("torrentid");if(!e)return!1;a.sourceSite=u,a.sourceSiteType=p.siteType;let t=$(`#torrent_${e}`),o=(O=$(".page__title").text().match(/]?([^[]+)/)[1])==null?void 0:O.trim(),[r,s=""]=o.split(" AKA ");a.mediaInfo=`${t.find(".mediainfo.mediainfo--in-release-description").next("blockquote:contains(Unique ID)").text()}`,a.movieName=r,a.movieAkaName=s,a.imdbUrl=(n=(N=$("#imdb-title-link"))==null?void 0:N.attr("href"))!=null?n:"",a.year=$(".page__title").text().match(/\[(\d+)\]/)[2];let c=$(`#group_torrent_header_${e}`);a.category=nt();let l=F(t.find(".bbcode-table-guard")[0]);a.category==="concert"&&(l=$("#synopsis").text()+l);let{comparisonData:i,screenshots:d}=lt(t);if(i){let y=[];Object.keys(i).forEach(D=>{y=y.concat(i[D]),l=l.replace(D+":",""),l+=`
[b]`+D+`:[/b]
`+i[D].map(R=>`[img]${R}[/img]`).join("")}),a.comparisonImgs=y}a.description=l;let h=c.find("#PermaLinkedTorrentToggler").text().replace(/ /g,"").split("/"),[m,g,b,...v]=h,f=v.includes("Remux");a.videoType=b==="WEB"?"web":mt(g,f,m,b);let P=W(l),x=a.videoType.match(/bluray/i),_=x?q:L,I=x?P:a.mediaInfo;a.mediaInfo=I;let{videoCodec:T,audioCodec:w,fileName:B="",resolution:C,mediaTags:H}=_(I);a.videoCodec=T,a.audioCodec=w,a.resolution=C,a.tags=H;let k=B||c.data("releasename");k=z(k),a.title=k,a.source=dt(b,m,C),a.size=c.find(".nobr span").attr("title").replace(/[^\d]/g,""),a.screenshots=d;let E=[],S=$("#movieinfo div").text().match(/Country:\s+([^\n]+)/);return S&&S.length>0&&(E=S==null?void 0:S[1].replace(/(,)\s+/g,"$1").split(",")),a.area=G(E==null?void 0:E[0]),a},nt=()=>{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]},lt=()=>{var c,l,i,d;let e=[],t={},o=$(".movie-page__torrent__panel"),r=o.find("a:contains(Show comparison)");for(let h=0;h<r.length;h++){let m=r[h].getAttribute("onclick");if(m&&m.match(/BBCode.ScreenshotComparisonToggleShow/))try{let g=(l=(c=m.match(/\((.+)\)/))==null?void 0:c[1])!=null?l:"",[b="null",v="null"]=g.match(/\[.+?\]/g),f=(d=(i=JSON.parse(b))==null?void 0:i.join(","))!=null?d:"",P=JSON.parse(v);t[f]=P}catch(g){t=null}}let s=o.find(".bbcode__image");for(let h=0;h<s.length;h++)e.push(s[h].getAttribute("src"));return{screenshots:e,comparisonData:t}},dt=(e,t,o)=>t.match(/BD100|BD66/i)||e.match(/Blu-ray/i)&&o.match(/2160P|4K/i)?"uhdbluray":e.replace(/-/g,"").toLowerCase(),mt=(e,t,o,r)=>{let s="";return t?s="remux":o.match(/BD50|BD25/ig)?s="bluray":o.match(/BD66|BD100/ig)?s="uhdbluray":r.match(/DVD/ig)&&e.match(/MKV|AVI/ig)?s="dvdrip":o.match(/DVD5|DVD9/ig)&&e.match(/VOB|ISO/ig)?s="dvd":e.match(/MKV|MP4/i)&&(s="encode"),s};var Oe=()=>{a.sourceSite=u,a.sourceSiteType=p.siteType;let{Category:e,Name:t,Source:o,Type:r,Size:s}=ut();a.size=Y(s),a.title=z(t);let c=j(a.title),l=$(".movie-heading a:last").text(),i=$(".movie-heading a:first").text();if(l)a.year=l;else{let B=a.title.match(/\s([12][90]\d{2})/);a.year=B?B[0]:""}let d=$(".panel-heading:contains(Description)").next(".panel-body").find(".forced-nfo"),h=F(d[0]);a.description=h;let{category:m,countries:g,imdbUrl:b}=pt();a.movieName=i;let v=e.toLowerCase().replace(/s/,"");v=m==="Animation"?"cartoon":v,a.category=J(a,v),a.source=gt(o,r),a.area=G(g),a.videoType=bt(r);let f=a.videoType.match(/bluray/i),P=$("#stats-full code").text();a.mediaInfo=P;let x=f?q:L,{videoCodec:_,audioCodec:I,resolution:T,mediaTags:w}=x(P);return a.videoCodec=_,a.audioCodec=I,a.resolution=T,a.tags=A(A({},c),w),a.imdbUrl=b,a.screenshots=ht(),a},ut=()=>{let e={};return $(".dotborder").each((t,o)=>{let r=$(o).find("td:first").text(),s=$(o).find("td:last").text();e[r]=s.replace(/\n/g,"").trim()}),console.log(e),e},pt=()=>{let e=$(".movie-details a"),t={};return e.each((o,r)=>{let s=$(r).attr("href").replace(/.+\?/g,"").split("=");if(s.length>1){let c=decodeURI(s[0]),l=s[1];c==="g[]"&&(c="category"),t[c]=l}else(s==null?void 0:s[0].match(/tt\d+/))&&(t.imdbUrl=s[0])}),t},ht=()=>{var t;return(t=a.description.match(/\[url=.+?\]\[img\].+?\[\/img\]\[\/url]/g))!=null?t:[]},gt=(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(),bt=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 Fe=()=>{var f,P;let e=ee("id");a.sourceSite=u,a.sourceSiteType=p.siteType;let t=$("#details tr").has("a:contains(Edit torrent)"),o=t.length>0?t.prev():$("#details tr").has(".js-tagcontent").prev(),r=F(o.find(">td")[0]);r=(P=(f=r.match(/\[quote\]((.|\n)+)\[\/quote\]/))==null?void 0:f[1])!=null?P:"",a.description=r;let{size:s,category:c,videoType:l}=ft(),i=$("h1").eq(0).text();a.title=z(i);let d=j(i),h=$(".contentlayout h1").length>0,m=h?$(".contentlayout h1"):$("#details .showlinks li").eq(1);if(h){let x=m.prop("lastChild").nodeValue.replace(/\s|\(|\)/g,""),_=m.find("a").text();if(a.movieName=_,x)a.year=x;else{let I=a.title.match(/\s([12][90]\d{2})/);a.year=I?I[0]:""}}a.imdbUrl=m.find("a").attr("href"),a.category=J(a,c),a.source=Z(a.title),a.videoType=l;let g=a.videoType.match(/bluray/i),b=g?q:L,v=W(r);if(!g)a.bdinfo=v,yt(e).then(x=>{if(x){a.mediaInfo=x;let{videoCodec:_,audioCodec:I,resolution:T,mediaTags:w}=b(a.mediaInfo);a.videoCodec=_,a.audioCodec=I,a.resolution=T,a.tags=A(A({},d),w)}});else{a.mediaInfo=v;let{videoCodec:x,audioCodec:_,resolution:I,mediaTags:T}=b(v||r);a.videoCodec=x,a.audioCodec=_,a.resolution=I,a.tags=A(A({},d),T)}a.size=s,a.screenshots=vt(o)},ft=()=>{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(),r=t.split("("),s=r[0].trim().toLowerCase(),c=r[1].split(",")[0].toLowerCase().replace(/\./g,""),l=r[1].split(",")[1].replace(/\)/g,"").trim();return{size:Y(o),category:s,videoCodec:c,videoType:e[l]}},yt=e=>new Promise((t,o)=>{GM_xmlhttpRequest({method:"GET",url:`https://hdbits.org/details/mediainfo?id=${e}`,onload(r){let s=r.responseText;(r.status!==200||!s)&&o(new Error("\u8BF7\u6C42\u5931\u8D25")),t(s)}})}),vt=e=>{var o;return(o=a.description.match(/\[url=.+?\]\[img\].+?\[\/img\]\[\/url]/g))!=null?o:[]};var Ve=()=>{var g,b;a.sourceSite=u,a.sourceSiteType=p.siteType;let e=$("#main_table h1").eq(0).text(),t=(g=e.match(/[^[]+/))==null?void 0:g[0];a.title=z(t),a.subtitle=e.replace(t,"").replace(/\[|\]/g,"");let o=j(a.subtitle+a.title),r=fe("\u7C7B\u578B").text(),{category:s,area:c,videoType:l}=Tt(r);a.area=c,a.videoType=_t(t,l);let i=a.title.match(/(18|19|20)\d{2}/g);a.year=i?i.pop():"",a.imdbUrl=fe("IMDB").find("a").attr("href"),a.source=Z(a.title);let d=(b=fe("\u5C3A\u5BF8").text().match(/\(((\d|,)+)\s*字节\)/i))==null?void 0:b[1];a.size=d.replace(/,/g,"");let h=a.videoType.match(/bluray/i),m=h?q:L;window.onload=()=>{var B,C,H,k,E,S,O;let v=$("#kt_d"),f=F(v[0]),P=(C=(B=f.match(/\[color=\w+\]本种子.+?\[\/color\]/))==null?void 0:B[0])!=null?C:"";f.match&&(f=f.replace(P,"")),a.description=f;let x=(H=f.match(/https:\/\/(movie\.)?douban.com\/subject\/\d+/))==null?void 0:H[0];x&&(a.doubanUrl=x);let _=(k=f.match(/(产\s+地|国\s+家)\s+(.+)/))==null?void 0:k[2];_&&(a.area=G(_)),s?a.category=J(a,s):a.category=St(f);let{bdinfo:I,mediaInfo:T}=xt(f),w=h?I:T;if(w){a.mediaInfo=w;let{videoCodec:N,audioCodec:n,resolution:y,mediaTags:D}=m(w);a.videoCodec=N,a.audioCodec=n,a.resolution=y,a.tags=A(A({},o),D)}else{let N=(E=a.title.match(/\d{3,4}(p|i)/i))==null?void 0:E[0];if(!N&&N.match(/4k|uhd/i)&&(N="2160p"),a.resolution=N,a.audioCodec=te(a.title),f.match(/VIDEO(\.| )*CODEC/i)){let n=(S=f.match(/VIDEO(\.| )*CODEC\.*:?\s*([^\s_:]+)?/i))==null?void 0:S[2];if(n)a.videoCodec=n.replace(/\.|-/g,"").toLowerCase();else{let{title:y}=a;a.videoCodec=ue(y)}}if(f.match(/AUDIO\s*CODEC/i)){let n=(O=f.match(/AUDIO\s*CODEC\.*:?\s*(.+)/i))==null?void 0:O[1];n&&(a.audioCodec=te(n))}}a.screenshots=Dt(f),console.log(a)}},Tt=e=>{let t="",o="",r="";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)?r="uhdbluray":e.match(/bluray原盘/i)?r="bluray":e.match(/DVD/i)&&(r="dvd"),{category:t,area:o,videoType:r}},xt=e=>{let t=e.match(/\[quote\](.|\n)+?\[\/quote\]/g),o="",r="";for(let s=0;s<t.length;s++){let c=Pt(t[s]);c.match(/Disc\s?Size|\.mpls/i)&&(o+=c),c.match(/Unique ID/i)&&(r+=c)}return o||(o=W(e)),{bdinfo:o,mediaInfo:r}},Pt=e=>e.replace(/\[(.+)\]?/g,"").replace(/\u200D/g,""),Dt=e=>{var t;if(e.match(/More\.Screens/i)){let o=(t=e.match(/\.More\.Screens\[\/u\]\[\/color\]\n((.|\n)+\[\/(url|img)\])/))==null?void 0:t[1];return ne(o)}else return ne(e)},_t=(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,fe=e=>$(`#main_table td.heading:contains(${e})`).next(),St=e=>{let t="movie",{title:o,subtitle:r}=a;return o.match(/s0?\d{1,2}/i)||e.match(/集\s*数/)?o.match(/s0?\d{1,2}e0\d{1,2}/i)||r.match(/第[^\s]集/)?t="tv":t="tvPack":e.match(/动画/)?t="cartoon":e.match(/纪录/)&&(t="documentary"),t};var Ke=()=>{var B,C,H,k,E;a.sourceSite=u,a.sourceSiteType=p.siteType;let{Category:e,Name:t,Type:o,Size:r,Resolution:s}=Ct();a.size=Y(r);let c=z(t),l=j(a.title),i=$(".movie-heading span:last").text(),d=$(".movie-heading span:first").text();if(u==="HDPOST"){let S=(C=(B=c.match(/[\s\W\d]+(.+)/))==null?void 0:B[1])!=null?C:"";a.subtitle=(H=c.replace(S,""))==null?void 0:H.trim(),c=S}if(a.title=c,i)a.year=i.replace(/\(|\)|\s/g,"");else{let S=a.title.match(/(19|20)\d{2}/g);a.year=(k=S==null?void 0:S.pop())!=null?k:""}a.resolution=s;let h=$(".panel:contains(Media Info)").next().find(".panel-body"),m=F(h[0]),g=$(".decoda-code code").text();a.description=`${m}
[quote]${g}[/quote]`;let b=$(".movie-details a:contains(IMDB)").attr("href");a.imdbUrl=b,a.movieName=u==="HDPOST"?"":d;let v=It(e);a.category=J(a,v),a.source=Z(a.title),a.videoType=wt(o,s);let f=a.videoType.match(/bluray/i),P=W(m),x=f?q:L,_=f?P:g,{videoCodec:I,audioCodec:T,mediaTags:w}=x(_);return a.mediaInfo=_,a.videoCodec=I,a.audioCodec=T,a.tags=A(A({},l),w),a.screenshots=(E=a.description.match(/\[url=.+?\]\[img\].+?\[\/img\]\[\/url]/g))!=null?E:[],a},Ct=()=>{let e={},t={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"};return $("#vue+.panel table tr").each((o,r)=>{let s=$(r).find("td:first").text().replace(/\s|\n/g,""),c=$(r).find("td:last").text();e[t[s]]=c.replace(/\n/g,"").trim()}),e},It=e=>{if(!e)return"";if(e.match(/movie|电影/i))return"movie";if(e.match(/tv|电视|剧集/))return"tv"},wt=(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 ze=()=>{var w,B,C,H,k,E,S,O,N,n,y,D,R,K,re,le,ce;let e=z((B=(w=$("#top").text().split(/\s{3,}/))==null?void 0:w[0])==null?void 0:B.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(),r=$("#kimdb>a").attr("href"),s=F($("#kdescr")[0]);if(u==="HDArea"&&(e=(H=(C=$("h1#top").text().split(/\s{3,}/))==null?void 0:C[0])==null?void 0:H.trim()),u==="TJUPT"&&(e=((E=(k=(e.match(/\[[^\]]+(\.|\s)+[^\]]+\]/g)||[]).filter(se=>se.match(/\.| /)))==null?void 0:k[0])!=null?E:"").replace(/\[|\]/g,"")),u==="PTer"&&(s=(S=$("#descrcopyandpaster").val())==null?void 0:S.replace(/hide(=(MediaInfo|BDInfo))?\]/ig,"quote]")),u==="LemonHD"&&(s=s.replace(/\[b\]\[color=\w+\][^[]+?网上搜集[^[]+?\[\/color\]\[\/b\]/,"")),u==="HDChina"){let U=[];$("li:contains('\u57FA\u672C\u4FE1\u606F'):last").next("li").children("i").each(function(){U.push($(this).text().replace("\uFF1A",":"))}),t=U.join("\xA0\xA0\xA0"),o=$("#top").next("h3").text()}if(u==="OurBits"&&(r=$(".imdbnew2 a:first").attr("href"),a.doubanUrl=$("#doubaninfo .doubannew a").attr("href"),a.doubanUrl)){let U=F((O=$(".doubannew2 .doubaninfo"))==null?void 0:O[0]),Q=`[img]${$("#doubaninfo .doubannew a img").attr("src")}[/img]
`;a.doubanInfo=Q+U}if(u==="KEEPFRDS"&&([e,o]=[o,e]),u==="SSD"){a.doubanUrl=$(".douban_info a:contains('://movie.douban.com/subject/')").attr("href");let U=F((N=$(".douban-info artical"))==null?void 0:N[0]),Q=(y=(n=$("#kposter").find("img"))==null?void 0:n.attr("src"))!=null?y:"",se=Q?`[img]${Q} [/img]
`:"";if(a.doubanInfo=(D=se+(U==null?void 0:U.replace(/\n{2,}/g,`
`)))!=null?D:"",s===""||s===void 0){let X=F((R=$(".torrent-extra-text-container .extra-text"))==null?void 0:R[0]);X=X?`
[quote]${X}[/quote]
`:"";let de=$(".screenshot").find("img"),ve=[];de&&de.each((Lt,je)=>{ve.push(`[img]${$(je).attr("src").trim()}[/img]`)});let Ge=ve.join(""),Te=$("section[data-group='mediainfo'] .codemain").text(),Je=`
[quote]${Te}[/quote]
`;a.mediaInfo=Te,s=X+Je+Ge}r=$(".douban_info a:contains('://www.imdb.com/title/')").attr("href")}u==="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 c=e.match(/(19|20)\d{2}/g),{category:l,videoType:i,videoCodec:d,audioCodec:h,resolution:m,processing:g,size:b}=$t(t);a.sourceSite=u,a.sourceSiteType=p.siteType;let v=(K=s.match(/https:\/\/(movie\.)?douban.com\/subject\/\d+/))==null?void 0:K[0];v&&(a.doubanUrl=v);let f=(re=s.match(/http(s)?:\/\/www.imdb.com\/title\/tt\d+/))==null?void 0:re[0];if(f?a.imdbUrl=f:r&&(a.imdbUrl=r.match(/www.imdb.com\/title/)?r:""),a.year=c?c.pop():"",a.title=e,a.subtitle=o,a.description=s,!g||g.match(/raw/)){let U=(le=s.match(/(产\s+地|国\s+家)】?\s*(.+)/))==null?void 0:le[2];U&&(a.area=G(U))}else a.area=G(g);let P=J(a,Et(l||s));if(a.category=P,a.videoType=kt(i||a.title),a.source=Z(a.title),a.size=b?Y(b):"",a.screenshots=ne(s),a.tags=j(a.subtitle),u.match(/beitai/i)){if(s.match(/VIDEO\s*(\.)?CODEC/i)){let U=(ce=s.match(/VIDEO\s*(\.)?CODEC\.*:?\s*([^\s_,]+)?/i))==null?void 0:ce[2];U&&(a.videoCodec=U.replace(/\.|-/g,"").toLowerCase())}}else a.videoCodec=ue(d||a.title);a.resolution=Nt(m||a.title),a.audioCodec=te(h||a.title);let x=a.videoType.match(/bluray/i),{bdinfo:_,mediaInfo:I}=Bt(s),T=x?_:a.mediaInfo||I;if(T){a.mediaInfo=T;let U=x?q:L,{videoCodec:Q,audioCodec:se,resolution:X,mediaTags:de}=U(T);Q!==""&&se!==""&&X!==""&&(a.videoCodec=Q,a.audioCodec=se,a.resolution=X,a.tags=A(A({},a.tags),de))}},$t=e=>{let t="\u5206\u8FA8\u7387|\u89E3\u6790\u5EA6|\u683C\u5F0F",o="\u5A92\u4ECB|\u6765\u6E90|\u8D28\u91CF";u==="SSD"&&(t="\u5206\u8FA8\u7387|\u89E3\u6790\u5EA6",o="\u683C\u5F0F"),u.match(/TLF|HDAI/i)&&(o="\u5A92\u4ECB");let r=ae("\u7C7B\u578B|\u5206\u7C7B|\u985E\u5225",e),s=ae(o,e),c=ae("\u7F16\u7801|\u7DE8\u78BC",e),l=ae("\u97F3\u9891|\u97F3\u9891\u7F16\u7801",e),i=ae(t,e),d=ae("\u5904\u7406|\u8655\u7406|\u5730\u533A",e),h=ae("\u5927\u5C0F",e);return console.log({category:r,videoType:s,videoCodec:c,audioCodec:l,resolution:i,processing:d,size:h}),{category:r,videoType:s,videoCodec:c,audioCodec:l,resolution:i,processing:d,size:h}},Bt=e=>{var s;let t=(s=e.match(/\[quote\](.|\n)+?\[\/quote\]/g))!=null?s:[],o="",r="";for(let c=0;c<t.length;c++){let l=Ht(t[c]);l.match(/Disc\s?Size|\.mpls/i)&&(o+=l),l.match(/Unique\s*ID/i)&&(r+=l)}return o||(o=W(e)),{bdinfo:o,mediaInfo:r}},Ht=e=>e.replace(/\[\/?(quote)\]{1}?/g,"").replace(/\u200D/g,""),ae=(e,t)=>{var c;let o=`(${e}):\\s?([^\u4E00-\u9FA5]+)?`;e.match(/大小/)&&(o=`(${e}):\\s?((\\d|\\.)+\\s+(G|M|T|K)(i)?B)`),u.match(/KEEPFRDS|TJUPT|PTSBAO|PTHome|HDTime|BTSCHOOL|TLF|HDAI/)&&e.match(/类型/)&&(o=`(${e}):\\s?([^\\s]+)?`),u==="PTer"&&e.match(/类型|地区/)&&(o=`(${e}):\\s?([^\\s]+)?`),u==="HDSky"&&e.match(/类型/)&&(o=`(${e}):\\s?.+?/([^\\s]+)?`);let r=new RegExp(o),s=(c=t.match(r,"i"))==null?void 0:c[2];if(s)return s.replace(/\s/g,"").trim().toLowerCase()},kt=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":""):"",Et=e=>e?(e=e.replace(/[.-]/g,"").toLowerCase(),e.match(/movie|bd|ultra|电影/ig)?"movie":e.match(/综艺/ig)?"variety":e.match(/tv|drama|剧集|电视/ig)?"tv":e.match(/TVSeries/ig)?"tvPack":e.match(/document|纪录|紀錄|Doc/ig)?"documentary":e.match(/sport|体育/ig)?"sport":e.match(/mv|演唱|concert/ig)?"concert":e.match(/anim|动(画|漫)/ig)?"cartoon":""):"",Nt=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 oe=Me;p?p.siteType==="NexusPHP"?oe=ze:u==="BeyondHD"?oe=Oe:u==="HDBits"?oe=Fe:u==="TTG"?oe=Ve:p.siteType==="UNIT3D"&&(oe=Ke):oe=void 0;var Le=oe;var wa=GM_addStyle(`
.seed-dom h4{
text-align: center;
margin: 0;
font-size: 14px;
font-weight: 500;
margin-bottom: 15px;
display: flex;
align-items: center;
justify-content: 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: 8px 20px;
font-size: 14px;
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;
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;
}
.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: 5px;
}
.easy-seed-setting-btn svg{
height: 20px;
width: 20px;
}
.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{
padding: 7px 15px;
font-size: 12px;
border-radius: 20px;
}
.easy-seed-setting-panel *{
padding: 0;
margin: 0;
}
.easy-seed-setting-panel h3,.easy-seed-setting-panel h1{
color: #000;
margin-bottom: 15px;
}
.easy-seed-setting-panel .panel-content{
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 30px 10px;
}
.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 li label{
cursor: pointer;
color: #000 !important;
font-size: 12px;
display: flex;
align-items: center;
}
.easy-seed-setting-panel .panel-content li label input{
margin: 0;
margin-right: 3px;
padding:0;
}
.easy-seed-setting-panel .site-enable-setting{
padding-top: 5px;
}
.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: 20px;
}
.easy-seed-setting-panel button:hover {
background: #fff;
border-color: #409eff;
color: #409eff
}
.easy-seed-setting-panel .confirm-btns {
padding-top: 15px;
}
#save-setting-btn{
background-color: #007bff;
border-color: #007bff;
color:#fff;
}
#save-setting-btn:hover{
background: #66b1ff;
border-color: #66b1ff;
color: #fff
}
`);var Rt=e=>{let t=GM_getValue("easy-seed.enabled-target-sites")===void 0?[]:JSON.parse(GM_getValue("easy-seed.enabled-target-sites")),o=GM_getValue("easy-seed.enabled-search-sites")===void 0?[]:JSON.parse(GM_getValue("easy-seed.enabled-search-sites")),s=Object.keys(V).sort().map((d,h)=>{let{url:m,uploadPath:g}=V[d];return V[d].asTarget&&(t.length===0||t.includes(d))?`<li>
<a href="javascript:void(0);" data-link="${m}${g}#torrentInfo=null">${d} </a>
<span>|</span>
</li>`:""}),c=Object.keys(me).map(d=>{let h=ie(a.imdbUrl),m="",{movieAkaName:g,movieName:b}=a,v=h||g||b;return d==="TTG"&&h&&(v=v.replace("tt","imdb")),d==="HDR"&&h&&(v=v.replace("tt","")),d==="nzb.in"&&(g||b)&&(v=g||b),m=me[d].replace("{imdbid}",v),m=m.replace("{searchArea}",h?"4":"0"),o.length===0||o.includes(d)?`<li><a href="${m}" target="_blank">${d}</a> <span>|</span></li>`:""}),l=p.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>`:"",i=`
<div class="seed-dom movie-page__torrent__panel">
<h4>\u4E00\u952E\u8F6C\u79CD <span id="easy-seed-setting" class="easy-seed-setting-btn">
<svg t="1616602641809" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1165" width="32" height="32"><path d="M636.2112 847.7696c5.7344-42.5472 39.8848-76.7488 82.432-82.3808 20.1216-2.6624 39.2192 0.8704 55.6544 9.0112 32.5632 16.0768 72.3456 4.864 92.3136-25.3952 8.1408-12.3392 15.5648-25.1392 22.2208-38.4 16.6912-33.1264 4.8128-72.8064-25.7536-93.8496-1.4336-0.9728-2.816-1.9968-4.1984-3.072-34.2016-26.2656-46.848-73.216-30.2592-113.0496 7.7312-18.6368 20.3264-33.28 35.4816-43.4176 30.3104-20.2752 40.704-60.4672 24.2176-92.9792a383.37536 383.37536 0 0 0-19.3024-33.7408c-20.224-31.5392-60.4672-42.1376-94.5152-26.4192-1.536 0.7168-3.1232 1.3824-4.7616 2.048-39.936 15.9744-86.6304 2.9696-112.4864-31.4368-12.0832-16.0768-18.3296-34.304-19.4048-52.4288-2.1504-36.5056-31.6928-65.6896-68.1472-67.9936a388.59776 388.59776 0 0 0-47.9744-0.0512c-36.9152 2.2528-65.1776 32.2048-68.2496 69.0688-0.1536 1.6896-0.3072 3.3792-0.5632 5.0688-5.7344 42.3936-39.7312 76.4416-82.0736 82.2272-20.0192 2.7136-39.0656-0.7168-55.4496-8.704-32.5632-15.8208-72.192-4.5056-92.0064 25.7536a386.85184 386.85184 0 0 0-22.1696 38.5024c-16.5376 32.9728-4.864 72.3968 25.3952 93.5424 1.3824 0.9728 2.7648 1.9968 4.096 3.0208 33.6896 26.112 46.1312 72.3968 30.1056 111.872-7.6288 18.7904-20.1728 33.6384-35.3792 43.9296-29.952 20.2752-39.8848 60.2112-23.6032 92.4672 5.9392 11.7248 12.3904 23.0912 19.456 34.0992 20.0704 31.3856 59.9552 42.0352 93.9008 26.624 1.536-0.7168 3.1232-1.3824 4.7104-1.9968 39.68-15.6672 85.8624-2.7648 111.6672 31.232 12.288 16.2304 18.6368 34.6112 19.712 52.9408 2.0992 36.352 31.744 65.2288 68.096 67.6864 8.6016 0.5632 17.2544 0.8704 25.9584 0.8704 7.4752 0 14.8992-0.2048 22.3232-0.6656 36.8128-2.1504 65.024-32.1024 68.096-68.864 0.0512-1.6896 0.256-3.4304 0.4608-5.12z" fill="#FFF7E6" p-id="1166"></path><path d="M515.7888 514.816m-127.7952 0a127.7952 127.7952 0 1 0 255.5904 0 127.7952 127.7952 0 1 0-255.5904 0Z" fill="#FD973F" p-id="1167"></path><path d="M515.7888 668.2112c-84.5824 0-153.3952-68.8128-153.3952-153.3952 0-84.5824 68.8128-153.3952 153.3952-153.3952s153.3952 68.8128 153.3952 153.3952c-0.0512 84.5824-68.8128 153.3952-153.3952 153.3952z m0-255.5392c-56.32 0-102.1952 45.824-102.1952 102.1952s45.824 102.1952 102.1952 102.1952 102.1952-45.824 102.1952-102.1952-45.8752-102.1952-102.1952-102.1952zM886.1696 437.1968c-6.0416 0-12.0832-2.0992-16.9472-6.4a25.6 25.6 0 0 1-2.2016-36.1472c14.8992-16.8448 18.0736-41.5744 7.936-61.5424a388.5568 388.5568 0 0 0-20.224-35.328c-12.4416-19.4048-35.5328-29.0304-58.7776-24.576a25.60512 25.60512 0 0 1-29.952-20.3264 25.60512 25.60512 0 0 1 20.3264-29.952c43.9808-8.3968 87.7056 10.0864 111.5136 47.2064 8.2432 12.8 15.9232 26.2144 22.784 39.8336 19.5584 38.5536 13.4144 86.2208-15.2576 118.6304-5.12 5.6832-12.1344 8.6016-19.2 8.6016z" fill="#44454A" p-id="1168"></path><path d="M515.7888 968.448c-10.1888 0-20.48-0.3584-30.6176-1.024-53.7088-3.6352-96.5632-46.3872-99.6352-99.4304-0.9216-16.1792-6.7584-31.6928-16.7936-44.9536-21.9136-28.8768-60.7744-39.7312-94.5152-26.4192-1.3824 0.512-2.7136 1.0752-3.9936 1.6896-50.1248 22.784-107.6224 6.2976-136.704-39.1168a459.9552 459.9552 0 0 1-22.9376-40.2432c-24.064-47.6672-9.1136-105.984 34.816-135.68 13.3632-9.0624 23.7568-21.9648 30.0032-37.3248 13.6192-33.536 3.1744-72.448-25.4976-94.72-1.1776-0.9216-2.3552-1.792-3.5328-2.6112-45.0048-31.4368-60.3648-88.8832-36.5056-136.5504 7.7824-15.5648 16.5888-30.8736 26.1632-45.4656 29.2352-44.6464 87.296-60.8256 135.0144-37.6832 14.4384 7.0144 30.72 9.5232 47.104 7.3216 35.9936-4.9152 64.5632-33.536 69.4784-69.632 0.2048-1.4336 0.3584-2.8672 0.4608-4.3008 4.6592-54.8864 46.6432-97.0752 99.9424-100.352 18.688-1.1264 37.8368-1.1264 56.6272 0.1024 53.76 3.4304 96.6656 46.336 99.7888 99.7888 0.9216 15.9744 6.656 31.3856 16.4864 44.544 14.4384 19.2 37.632 31.232 62.1568 32.2048 14.1312 0.5632 25.1392 12.4928 24.576 26.5728-0.5632 14.1312-12.6976 25.088-26.5728 24.576-40.2944-1.5872-77.1584-20.7872-101.0688-52.6848-15.9232-21.1968-25.1392-46.1824-26.6752-72.2432-1.6384-27.648-23.9616-49.8688-51.9168-51.6608-16.64-1.0752-33.6896-1.0752-50.2272-0.0512-27.6992 1.6896-49.6128 24.1664-52.0704 53.4528-0.2048 2.2528-0.4608 4.608-0.768 6.912-7.9872 58.8288-54.5792 105.472-113.3056 113.5104-26.4192 3.584-52.7872-0.5632-76.3904-11.9808-24.6272-11.9296-54.6816-3.5328-69.8368 19.6608a404.15744 404.15744 0 0 0-23.1936 40.2944c-12.3904 24.7808-3.9936 54.9376 20.0192 71.68 1.8944 1.3312 3.7888 2.7136 5.632 4.1472 46.6432 36.1984 63.744 99.7376 41.472 154.4192-10.0864 24.7808-26.9312 45.6704-48.7424 60.416-22.6304 15.3088-30.2592 45.5168-17.8176 70.2464 6.144 12.1856 13.0048 24.1664 20.3776 35.6864 15.2576 23.808 45.6704 32.256 72.3968 20.1728 2.0992-0.9216 4.2496-1.8432 6.4-2.7136 55.04-21.7088 118.3744-3.9936 154.112 43.1104 16.2304 21.4016 25.6 46.592 27.0848 72.96 1.5872 27.3408 23.9104 49.408 51.968 51.3024 16.6912 1.1264 33.6384 1.2288 50.5344 0.256 27.5456-1.5872 49.3056-24.0128 51.7632-53.248 0.2048-2.3552 0.4608-4.6592 0.768-6.9632 7.9872-59.136 54.784-105.8304 113.8176-113.664 26.5216-3.5328 53.0432 0.768 76.6464 12.4416 24.6272 12.1856 54.784 3.84 70.0416-19.4048 8.4992-12.9024 16.3328-26.4192 23.2448-40.192 12.544-24.8832 3.9936-55.1424-20.3264-71.8848-1.9456-1.3312-3.84-2.7136-5.7344-4.1984-47.5648-36.5568-64.7168-100.7104-41.728-155.9552a25.55904 25.55904 0 0 1 33.4848-13.7728 25.55904 25.55904 0 0 1 13.7728 33.4848c-13.8752 33.3824-3.1232 73.6256 25.6512 95.6928 1.1776 0.9216 2.3552 1.792 3.584 2.6112 45.6192 31.4368 61.184 89.1392 37.0176 137.1136-7.8336 15.5136-16.64 30.72-26.2144 45.312-29.4912 44.7488-87.7056 60.7232-135.4752 37.1712-14.4896-7.168-30.8736-9.7792-47.2576-7.5776-35.6352 4.7104-64.9728 34.048-69.7856 69.7344-0.2048 1.4848-0.3584 2.9696-0.4608 4.4032-4.5568 54.8352-46.5408 96.9728-99.7888 100.0448-8.7552 0.4096-17.6128 0.6656-26.3168 0.6656z" fill="#44454A" p-id="1169">
</path>
</svg>
</span></h4>
<ul class="site-list">
${s.join("")}
<li>
<button id="batch-seed-btn">\u4E00\u952E\u7FA4\u8F6C</button>
</li>
</ul>
<section class="function-list">
${l}
<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">
${c.join("")}
</ul>
</div>
`;e.prepend(i)},At=()=>{let e=GM_getValue("easy-seed.enabled-target-sites")===void 0?[]:JSON.parse(GM_getValue("easy-seed.enabled-target-sites")),t=GM_getValue("easy-seed.enabled-batch-seed-sites")===void 0?[]:JSON.parse(GM_getValue("easy-seed.enabled-batch-seed-sites")),o=GM_getValue("easy-seed.enabled-search-sites")===void 0?[]:JSON.parse(GM_getValue("easy-seed.enabled-search-sites")),r=Object.keys(V).sort(),s=r.map((d,h)=>{if(V[d].asTarget){let m=e.includes(d)?"checked":"";return`<li>
<label><input name="target-site-enabled" type="checkbox" value="${d}" ${m}/>${d} </label>
</li>`}return""}),c=r.map((d,h)=>{if(V[d].asTarget){let m=t.includes(d)?"checked":"";return`<li>
<label><input name="batch-seed-site-enabled" type="checkbox" value="${d}" ${m}/>${d} </label>
</li>`}return""}),l=Object.keys(me).map(d=>{let h=o.includes(d)?"checked":"";return`<li>
<label><input name="search-site-enabled" type="checkbox" value="${d}" ${h}/>${d} </label>
</li>`}),i=`
<div id="easy-seed-setting-panel" class="easy-seed-setting-panel">
<div class="panel-content">
<h3>\u8F6C\u79CD\u7AD9\u70B9\u542F\u7528</h3>
<section class="site-enable-setting">
<ul class="target-sites-enable-list" >
${s.join("")}
</ul>
</section>
<h3>\u6279\u91CF\u8F6C\u79CD\u542F\u7528</h3>
<i>\u4E00\u952E\u6279\u91CF\u8F6C\u53D1\u5230\u4EE5\u4E0B\u9009\u4E2D\u7684\u7AD9\u70B9</i>
<section class="site-enable-setting">
<ul class="batch-seed-sites-enable-list">
${c.join("")}
</ul>
</section>
<h3>\u7AD9\u70B9\u641C\u7D22\u542F\u7528</h3>
<section class="site-enable-setting">
<ul class="search-sites-enable-list">
${l.join("")}
</ul>
</section>
<div class="confirm-btns">
<button id="save-setting-btn">\u4FDD\u5B58</button>
<button id="cancel-setting-btn">\u53D6\u6D88</button>
</div>
</div>
</div>
`;$("body").append(i),$("#easy-seed-setting-panel").on("click","#save-setting-btn",()=>{Ut()}),$("#easy-seed-setting-panel").on("click","#cancel-setting-btn",()=>{$("#easy-seed-setting-panel").remove()})},Ut=()=>{let e=[],t=[],o=[];$("input[name='target-site-enabled']:checked").each(function(){e.push($(this).val())}),$("input[name='search-site-enabled']:checked").each(function(){t.push($(this).val())}),$("input[name='batch-seed-site-enabled']:checked").each(function(){o.push($(this).val())}),console.log(e);try{GM_setValue("easy-seed.enabled-target-sites",JSON.stringify(e)),GM_setValue("easy-seed.enabled-search-sites",JSON.stringify(t)),GM_setValue("easy-seed.enabled-batch-seed-sites",JSON.stringify(o)),$("#easy-seed-setting-panel").remove(),window.location.reload()}catch(r){pe({title:"\u9519\u8BEF",text:"\u4FDD\u5B58\u672C\u5730\u7AD9\u70B9\u8BBE\u7F6E\u5931\u8D25"})}},Mt=()=>{let e=GM_getValue("easy-seed.enabled-batch-seed-sites")===void 0?[]:JSON.parse(GM_getValue("easy-seed.enabled-batch-seed-sites"));if(e.length===0)return pe({title:"\u9519\u8BEF",text:"\u8BF7\u5148\u8BBE\u7F6E\u7FA4\u8F6C\u5217\u8868"}),!1;let t=Object.keys(V).sort(),o=encodeURIComponent(JSON.stringify(a));t.forEach((r,s)=>{let{url:c,uploadPath:l}=V[r];V[r].asTarget&&e.includes(r)&&GM_openInTab(c+l+"#torrentInfo="+o)}),pe({title:"\u6210\u529F",text:"\u8F6C\u79CD\u9875\u9762\u5DF2\u6253\u5F00\uFF0C\u8BF7\u524D\u5F80\u5BF9\u5E94\u9875\u9762\u64CD\u4F5C"})},Ot=()=>{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 r=$("#nsfw").is(":checked");e.text("\u8F6C\u6362\u4E2D..."),$("#img-transfer").attr("disabled",!0).addClass("is-disabled"),$e(o,r).then(s=>{if(s.length){let c=s.map(i=>`[url=${i.show_url}][img]${i.th_url}[/img][/url]`);a.screenshots=c.slice(0,a.screenshots.length);let{description:l}=a;t.forEach((i,d)=>{l.includes(i)&&(l=l.replace(`[img]${i}[/img]`,c[d]))}),a.description=l,e.text("\u8F6C\u6362\u6210\u529F\uFF01")}}).catch(s=>{e.text(s.message)}).finally(()=>{$("#img-transfer").removeAttr("disabled").removeClass("is-disabled")})},Ft=()=>{let e=$(".page__title>a").attr("href");if(e&&e.match("movie.douban.com"))return a.doubanUrl=e,qe(),!1;let{imdbUrl:t,movieName:o}=a;we(t,o).then(r=>{a.doubanUrl=r,qe()}).catch(r=>{throw new Error(r.message)})},qe=()=>{let{doubanUrl:e}=a,t=$(".douban-section .douban-status");try{e&&(t.text("\u83B7\u53D6\u4E2D..."),Ie(e).then(o=>{Vt(o),t.text("\u83B7\u53D6\u6210\u529F")}).catch(o=>{throw new Error(o.message)}))}catch(o){t.text(o.message)}},Vt=e=>{var s;let t=e.format;a.doubanInfo=e.format,a.subtitle=Be(e);let o=(s=t.match(/(产\s+地|国\s+家)\s+(.+)/))==null?void 0:s[2];o&&(a.area=G(o));let r=a.category;r==="movie"&&(t.match(/动画/)?r="cartoon":t.match(/纪录/)&&(r="documentary"),a.category=r)},Kt=e=>{$("#imdb").val(e);let t=$('meta[name="csrf_token"]').attr("content");GM_xmlhttpRequest({method:"GET",url:`${p.url}/torrents/filter?imdb=${e}&_token=${t}&sorting=size&direction=desc`,onload(o){$("#facetedSearch").html(o.responseText)}})},zt=()=>{let e=ee("imdb");e&&(u==="Blutopia"?Kt(e):u==="Bdc"&&($("#tsstac").val(e),$("#search_type").val("t_genre")))},ye=location.hash&&location.hash.match(/(^|#)torrentInfo=([^#]*)(#|$)/),he=ye&&ye.length>0?ye[2]:null;if(u&&(zt(),he&&p.asTarget&&(he=JSON.parse(decodeURIComponent(he)),Ae(he)),p.asSource&&!location.pathname.match(/upload/ig))){Le(),console.log(a);let e=$(p.seedDomSelector);if(p.siteType==="NexusPHP"||u.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(u==="HDBits"){let t=`<tr>
<td class="rowfollow easy-seed-td"></td>
</tr>`;e.after(t),e=$(".easy-seed-td")}if(u==="PTP"){let t=ee("torrentid");e=$(`#torrent_${t} >td`)}Rt(e),$(".site-list li>a").click(function(){let t=encodeURIComponent(JSON.stringify(a)),o=$(this).data("link");if(o.match(/lemonhd/)){let s={movie:"movie",tv:"tv",tvPack:"tv",variety:"tv",documentary:"doc",concert:"mv"}[a.category]||"movie";o=o.replace("upload_movie",`upload_${s}`)}if(o.match(/hdpost|blutopia/)){let s={movie:"1",tv:"2",tvPack:"2"}[a.category]||"1";o=o.replace("1",s)}if(u==="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(()=>{Ot()}),$("#douban-info")&&$("#douban-info").click(()=>{Ft()}),$("#easy-seed-setting")&&$("#easy-seed-setting").on("click",()=>{At()}),$("#batch-seed-btn")&&$("#batch-seed-btn").on("click",()=>{Mt()})}})();