diff --git a/dist/easy-seed.user.js b/dist/easy-seed.user.js index 802e9950..d25b523d 100644 --- a/dist/easy-seed.user.js +++ b/dist/easy-seed.user.js @@ -1,7 +1,7 @@ // ==UserScript== -// @name easy-seed +// @name easy-seed PT一键转种 // @namespace https://github.com/techmovie/easy-seed -// @version 1.0.2 +// @version 1.0.3 // @description easy seeding for different trackers // @author birdplane // @require https://cdn.bootcss.com/jquery/1.7.1/jquery.min.js @@ -20,33 +20,36 @@ // @grant GM_addStyle // @grant GM_xmlhttpRequest // ==/UserScript== -(()=>{var M={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://pt.m-team.cc",host:"pt.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"}}},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"}}},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(7)",searchKey:"search",searchParam:{search_area:"{key}",sort:"5",type:"desc"},name:{selector:"#name"},subtitle:{selector:"#small_descr"},description:{selector:"#descr"},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:"",vc1:"3",xvid:"",dvd:""}},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(6)",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"]}}},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"},imdb:{selector:'input[name="url"][type="text"]'},anonymous:{selector:'input[name="uplver"]'},tags:{chineseAudio:"#tagGY",DIY:"#tagDIY",cantoneseAudio:"#tag_yy",chineseSubtitle:"#tagZZ",HDR:"#tagHDR10","HDR10+":"#tagHDR10P",DolbyVision:"#tagDB"},category:{selector:'select[name="type"]',map:{movie:"401","3d":"402",tv:"412",tvPack:"405",documentary:"410",concert:"419",sport:"415",cartoon:"411",variety:"413"}},videoCodec:{selector:'select[name="codec_sel"]',map:{h264:"12",hevc:"14",x264:"12",x265:"14",h265:"14",mpeg2:"15",mpeg4:"12",vc1:"16",xvid:"17",dvd:"18"}},audioCodec:{selector:'select[name="audiocodec_sel"]',map:{aac:"7",ac3:"6",dd:"6","dd+":"6",flac:"13",dts:"4",truehd:"2",lpcm:"5",dtshdma:"1",atmos:"14",dtsx:"21"}},videoType:{selector:'select[name="medium_sel"]',map:{uhdbluray:"12",bluray:"1",remux:"4",encode:"7",web:"9",hdtv:"5",dvd:"2",dvdrip:"2",other:"0"}},resolution:{selector:'select[name="standard_sel"]',map:{"2160p":"5","1080p":"1","1080i":"2","720p":"3","576p":"4","480p":"4"}},area:{selector:'select[name="processing_sel"]',map:{CN:"1",US:"2",EU:"2",HK:"3",TW:"3",JP:"4",KR:"5",OT:"6"}}},HDSky:{url:"https://hdsky.me",host:"hdsky.me",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+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"},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"},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"]}}},KEEPFRDS:{url:"https://pt.keepfrds.com",host:"pt.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"}}},BeiTai:{url:"https://www.beitai.pt",host:"www.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:"#top+div+table>tbody>tr:nth-child(8)",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:"pt.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"}}},TJUPT:{url:"https://www.tjupt.org",host:"www.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"}}},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:"www.pthome.net",siteType:"NexusPHP",asSource:!0,asTarget:!0,uploadPath:"/upload.php",searchPath:"/torrents.php",seedDomSelector:"#top+table>tbody>tr:nth-child(7)",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",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"}}},TCCF:{url:"https://et8.org",host:"et8.org",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(6)",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"}}}};var t={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:""},ee={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://pt.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"},ae="054022eaeae0b00e0fc068c0c0a2102a",se="https://frodo.douban.com/api/v2",ce="https://omit.mkrobot.org/movie/infos",ie="https://media.pttool.workers.dev",ne="https://api.themoviedb.org",le="3d62cb1443c6b34b61262ab332aaf78c",Ne=e=>{let o="";try{return Object.keys(M).forEach(r=>{let s=M[r].host;s&&e===s&&(o=r)}),o}catch(r){r.message!=="end loop"&&console.log(r)}},W=["atmos","dtshdma","aac","ac3","dd+","dd","dtsx","dts","truehd","flac","lpcm"],de=["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"],d=Ne(location.host),h=M[d];var N=e=>e.replace(/(?new Promise((o,r)=>{try{if(e)GM_xmlhttpRequest({method:"GET",url:`${ie}?url=${e}`,onload(s){let a=JSON.parse(s.responseText);if(a&&a.success)o(a);else throw new Error("\u83B7\u53D6\u8C46\u74E3\u4FE1\u606F\u5931\u8D25")}});else throw new Error("\u65E0\u6CD5\u83B7\u53D6\u8C46\u74E3\u4FE1\u606F")}catch(s){r(s.message)}}),ue=(e,o)=>new Promise((r,s)=>{try{let a=" https://movie.douban.com/subject/",i=j(e);i?GM_xmlhttpRequest({method:"GET",url:`${ce}/${i}`,onload(c){let l=JSON.parse(c.responseText);if(l&&l.data)r(a+l.data.id);else throw new Error("\u83B7\u53D6\u5931\u8D25")}}):GM_xmlhttpRequest({method:"GET",url:`${se}/search/weixin?q=${o}&start=0&count=1&apiKey=${ae}`,onload(c){let l=JSON.parse(c.responseText);if(l&&l.items&&l.items.length>0)r(a+l.items[0].id);else throw new Error("\u83B7\u53D6\u5931\u8D25")}})}catch(a){s(a.message)}}),pe=(e,o)=>new Promise((r,s)=>{let a=encodeURI(`imgs=${e}&content_type=${o?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:a,onload(i){let c=i.responseText.match(/(upload_results = )({.*})(;)/);c||s(new Error("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"));let l=[];if(c&&c.length){if(l=JSON.parse(c[2]).images,l.length.length<1)throw new Error(new Error("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"));r(l)}else throw new Error("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")}})}catch(i){s(i.message)}}),R=(e,o)=>{let{description:r,title:s,subtitle:a}=e;return o==="movie"?r.match(/动画/)?o="cartoon":r.match(/纪录/)&&(o="documentary"):o.match(/tv/)&&(s.match(/(s0?\d{1,2})?e(p)?\d{1,2}/i)||a.match(/第[^\s]集/)?o="tv":o="tvPack"),o},L=e=>{let o=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),r=location.search.substr(1).match(o);return r?unescape(r[2]):""},V=e=>{if(!e)return"";let o="",r=e.replace(/:|-|\s/g,"").toLowerCase();for(let s=0;s(e=e.replace(/\.|-/g,""),e.match(/x264/i)?"x264":e.match(/h264|AVC/i)?"h264":e.match(/x265/i)?"x265":e.match(/hevc|h265/i)?"hevc":e.match(/vc-?1/i)?"vc1":e.match(/mpeg-?2/i)?"mpeg2":e.match(/mpeg-?4/i)?"mpeg4":""),Y=e=>{let o=e.match(/(\[url=(http(s)*:\/{2}.+?(\.(png|jpg)))\])?\[img\](.*?\.(png|jpg|gif))\[\/img](\[url\])?/g);if(o&&o.length>0)return o=o.filter(r=>!r.match(/GDJT|douban|logo|(2019\/03\/28\/5c9cb8f8216d7\.png)|_front|(info_01\.png)|(screens\.png)|(04\/6b\/Ggp5ReQb_o)|(ce\/e7\/KCmGFMOB_o)/)),o.map(r=>{let s="";return r.match(/\[url=http(s)*:.+/)?s=r.match(/=(([^\]])+)/)?.[1]:s=r.match(/img\](([^[])+)/)?.[1],s})},O=e=>e.match(/(uhd|2160|4k).*(blu(-)?ray|remux)/i)?"uhdbluray":e.match(/blu(-)?ray|remux/i)?"bluray":e.match(/hdtv/i)?"hdtv":e.match(/web(-(rip|dl))+/i)?"web":e.match(/hddvd/i)?"hddvd":e.match(/dvd/i)?"dvd":e.match(/vhs/i)?"vhs":"other",ge=e=>{let o=e.trans_title.join("/"),{director:r=[]}=e,s=r.map(l=>he(l.name)),a=e.cast.slice(0,2).map(l=>he(l.name)),i=s.length>0?`|\u5BFC\u6F14: ${s.join(" ")}`:"",c=a.length>0?`|\u4E3B\u6F14:${a.join(" ")}`:"";return o+i+c},he=e=>e.replace(/\s+[A-Za-z\s]+/,""),E=e=>{let o=de;if(e){if(e.match(/USA|US|Canada|CA|美国|加拿大/i))return"US";if(o.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"},fe=e=>{let o=e/1e9;if(o<25)return"BD25";if(o<50)return"BD50";if(o<66)return"BD66";if(o<100)return"BD100"},be=e=>{try{return new Promise((o,r)=>{GM_xmlhttpRequest({method:"GET",url:`${ne}/3/find/${e}?api_key=${le}&language=en&external_source=imdb_id`,onload(s){let a=JSON.parse(s.responseText),i=a.movie_results&&a.movie_results.length>1,c=!a.tv_results&&a.tv_results.length>1;s.status!==200&&!i&&!c&&r(new Error("\u8BF7\u6C42\u5931\u8D25"));let l=i?a.movie_results[0].id:a.tv_results[0].id;o(l)}})})}catch(o){console.log(o)}},j=e=>{let o=/tt\d+/.exec(e);return o&&o[0]?o[0]:""},k=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:"",B=e=>{if(!e)return!1;let o=e.split(/\n\s*\n/),[r,s]=o,a=o.filter(y=>y.startsWith("Video #2")),[i,...c]=o.filter(y=>y.startsWith("Audio")),l=o.filter(y=>y.startsWith("Text")),m=S("Complete name",r).replace(/\.avi|\.mkv|\.mp4|\.ts/i,""),g=k(S("File size",r)),{videoCodec:n,isHdr:p,isDV:u}=He(s,r,a),{audioCodec:b,channelName:T,languageArray:D}=Ue(i,c),v=l.map(y=>S("Language",y)),C=ye(b,T,D,v,p,u),_=Re(s);return{fileName:m,fileSize:g,videoCodec:n,audioCodec:b,resolution:_,mediaTags:C}},S=(e,o)=>{let r=e.replace(/\s/,"\\s*").replace(/(\(|\))/g,"\\$1"),s=new RegExp(`${r}\\s*:\\s([^ -]+)`,"i");return o.match(s)?o.match(s)[1]:""},Re=e=>{let o=parseInt(S("Height",e).replace(/\s/g,"")),r=parseInt(S("Width",e).replace(/\s/g,"")),s=S("Scan type",e);return o>1080?"2160p":o>720&&s==="Progressive"?"1080p":o>720&&s!=="Progressive"?"1080i":o>576||r>1024?"720p":o>480||r===1024?"576p":r>=840||o===480?"480p":`${r}x${o}`},ye=(e,o,r,s,a,i)=>{let c=r.includes("Chinese"),l=s.includes("Chinese"),m={};return c&&(m.chineseAudio=!0),r.includes("Cantonese")&&(m.cantoneseAudio=!0),l&&(m.chineseSubtitle=!0),a&&(a.match(/HDR10\+/i)?m["HDR10+"]=!0:m.HDR=!0),i&&(m.DolbyVision=!0),e.match(/dtsx|atmos/ig)&&(m[e]=!0),m},He=(e,o,r)=>{let s=S("Format",o),a=S("Format",e),i=S("Format version",e),c=S("Codec ID",e),l=S("HDR format",e),m=r.length>0&&S("HDR format",r[0]).includes("Dolby Vision"),g=!!S("Encoding settings",e),n="";return s==="DVD Video"?n="DVD":s==="MPEG-4"?n="mpeg4":a==="MPEG Video"&&i==="Version 2"?n="mpeg2":c.match(/xvid/i)?n="xvid":a.match(/HEVC/i)&&!g?n="hevc":a.match(/HEVC/i)&&g?n="x265":a.match(/AVC/i)&&g?n="x264":a.match(/AVC/i)&&!g?n="h264":a.match(/VC-1/i)&&(n="vc1"),{videoCodec:n,hdrFormat:l,isDV:m}},Ue=(e,o=[])=>{let r=S("Format",e),s=S("Channel(s)",e),a=S("Commercial name",e),i=[e,...o].map(g=>S("Language",g)),c="",l="",m=parseInt(s);return m&&m>=6?c=`${m-1}.1`:c=`${m}.0`,r.match(/MLP FBA/i)&&a.match(/Dolby Atmos/i)?l="atmos":r.match(/MLP FBA/i)&&!a.match(/Dolby Atmos/i)?l="truehd":r.match(/AC-3/i)&&a.match(/Dolby Digital Plus/i)?l="dd+":r.match(/AC-3/i)&&a.match(/Dolby Digital/i)?l="dd":r.match(/AC-3/i)?l="ac3":r.match(/DTS XLL X/i)?l="dtsx":r.match(/DTS/i)&&a.match(/DTS-HD Master Audio/i)?l="dtshdma":r.match(/DTS/i)?l="dts":r.match(/FLAC/i)?l="flac":r.match(/AAC/i)?l="aac":r.match(/LPCM/i)&&(l="lpcm"),{audioCodec:l,channelName:c,languageArray:i}},w=e=>{if(!e)return"";let o=e.split("Disc Title");o.length>2&&(e=o[1]);let r=e.match(/VIDEO:(\s|Codec|Bitrate|Description|Language|-)*((.|\n)*)AUDIO:/i),s=e.match(/AUDIO:(\s|Codec|Bitrate|Description|Language|-)*((.|\n)*)(SUBTITLE(S))*/i),a=e.match(/SUBTITLE(S)*:(\s|Codec|Bitrate|Description|Language|-)*((.|\n)+)(FILES:)*/i),i=e.match(/Disc\s*Size:\s*((\d|,| )+)bytes/)?.[1]?.replaceAll(",",""),c=!e.match(/PLAYLIST REPORT/i),l=te(r,2),[m="",g=""]=l,n=m.match(/2160/)?"hevc":"h264",p=m.match(/\/\s*HDR(\d)*(\+)*\s*\//i)?.[0],u=!!g.match(/\/\s*Dolby\s*Vision\s*/i),b=te(s,2),T=te(a,3),D=m.match(/\d{3,4}(p|i)/)?.[0],{audioCodec:v="",channelName:C="",languageArray:_=[]}=ke(b,c),y=T.map(x=>{let I=x.match(/(\w+)\s*\//)?.[1],A=x.match(/Graphics\s*(\w+)\s*(\d|\.)+\s*kbps/i)?.[1];return c?I:A}),f=ye(v,C,_,y,p,u);return{fileSize:i,videoCodec:n,audioCodec:v,resolution:D,mediaTags:f}},te=(e,o)=>e?.[o]?.split(` -`).filter(r=>!r.match(/^\s+$/))??[],ke=(e,o)=>{if(e.length<1)return{};let r=e.sort((n,p)=>{let u=parseInt(n.match(/\/\s*(\d+)\s*kbps/i)?.[1]);return parseInt(p.match(/\/\s*(\d+)\s*kbps/i)?.[1])-u}),[s,a]=r,i=V(s),c=V(a),l=i,m=s.match(/\d\.\d/)?.[0];i==="lpcm"&&c==="dtshdma"&&(l=c,m=s.match(/\d\.\d/)?.[0]);let g=r.map(n=>{let p=n.match(/(\w+)\s*\//)?.[1],u=n.match(/Audio\s*(\w+)\s*\d+\s*kbps/)?.[1];return o?p:u});return{audioCodec:l,channelName:m,languageArray:g}},Fe=({pre:e,post:o,tracker:r},s,a)=>{let i=typeof e!="undefined"&&e!==null,c=typeof o!="undefined"&&o!==null;i&&e.unshift(s),c&&o.push(a)},P=e=>{if(e)return ve(e).replace(/\[quote\]((.|\n)*?)\[\/quote\]/g,function(r,s){return s&&s.match(/温馨提示|郑重|PT站|网上搜集|本种子|商业盈利|带宽|寬帶|法律责任|Quote:|正版|商用/)?"":r})},Me=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):""),Te=e=>/rgba?/.test(e)?Me(e):e,ve=e=>{let o=[],r=[],s=[],a=Fe.bind(null,{pre:r,post:s});switch(e.nodeType){case 1:{switch(e.tagName.toUpperCase()){case"UL":{a(null,null);break}case"OL":{a("[list=1]","[/list]");break}case"LI":{let{className:n}=e;if(d==="Blutopia"&&n){a("[quote]","[/quote]");break}else{a("[*]",` -`);break}}case"B":{a("[b]","[/b]");break}case"U":{a("[u]","[/u]");break}case"I":{a("[i]","[/i]");break}case"DIV":if(e.className==="codemain"){a(` -[quote]`,"[/quote]");break}else{a(` +(()=>{var M={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:"kp.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"}}},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"}}},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(7)",searchKey:"search",searchParam:{search_area:"{key}",sort:"5",type:"desc"},name:{selector:"#name"},subtitle:{selector:"#small_descr"},description:{selector:"#descr"},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:"",vc1:"3",xvid:"",dvd:""}},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(6)",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"]}}},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"},imdb:{selector:'input[name="url"][type="text"]'},anonymous:{selector:'input[name="uplver"]'},tags:{chineseAudio:"#tagGY",DIY:"#tagDIY",cantoneseAudio:"#tag_yy",chineseSubtitle:"#tagZZ",HDR:"#tagHDR10","HDR10+":"#tagHDR10P",DolbyVision:"#tagDB"},category:{selector:'select[name="type"]',map:{movie:"401","3d":"402",tv:"412",tvPack:"405",documentary:"410",concert:"419",sport:"415",cartoon:"411",variety:"413"}},videoCodec:{selector:'select[name="codec_sel"]',map:{h264:"12",hevc:"14",x264:"12",x265:"14",h265:"14",mpeg2:"15",mpeg4:"12",vc1:"16",xvid:"17",dvd:"18"}},audioCodec:{selector:'select[name="audiocodec_sel"]',map:{aac:"7",ac3:"6",dd:"6","dd+":"6",flac:"13",dts:"4",truehd:"2",lpcm:"5",dtshdma:"1",atmos:"14",dtsx:"21"}},videoType:{selector:'select[name="medium_sel"]',map:{uhdbluray:"12",bluray:"1",remux:"4",encode:"7",web:"9",hdtv:"5",dvd:"2",dvdrip:"2",other:"0"}},resolution:{selector:'select[name="standard_sel"]',map:{"2160p":"5","1080p":"1","1080i":"2","720p":"3","576p":"4","480p":"4"}},area:{selector:'select[name="processing_sel"]',map:{CN:"1",US:"2",EU:"2",HK:"3",TW:"3",JP:"4",KR:"5",OT:"6"}}},HDSky:{url:"https://hdsky.me",host:"hdsky.me",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+div+table>tbody>tr:nth-child(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"},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"},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"]}}},KEEPFRDS:{url:"https://pt.keepfrds.com",host:"pt.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"}}},BeiTai:{url:"https://www.beitai.pt",host:"www.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:"#top+div+table>tbody>tr:nth-child(8)",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:"pt.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"}}},TJUPT:{url:"https://www.tjupt.org",host:"www.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"}}},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:"www.pthome.net",siteType:"NexusPHP",asSource:!0,asTarget:!0,uploadPath:"/upload.php",searchPath:"/torrents.php",seedDomSelector:"#top+table>tbody>tr:nth-child(7)",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",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"}}},TCCF:{url:"https://et8.org",host:"et8.org",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(6)",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"}}},HDDolby:{url:"https://www.hddolby.com",host:"www.hddolby.com",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(6)",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"}}},HDArea:{url:"https://www.hdarea.co",host:"www.hdarea.co",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(6)",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"}}},BTSCHOOL:{url:"https://pt.btschool.club",host:"pt.btschool.club",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(6)",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="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"}}},HDU:{url:"https://pt.hdupt.com",host:"pt.hdupt.com",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(6)",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(6)",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"}}}};var t={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:""},Z={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://pt.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"},re="054022eaeae0b00e0fc068c0c0a2102a",se="https://frodo.douban.com/api/v2",ce="https://omit.mkrobot.org/movie/infos",ie="https://media.pttool.workers.dev",ne="https://api.themoviedb.org",de="3d62cb1443c6b34b61262ab332aaf78c",Ne=e=>{let o="";try{return Object.keys(M).forEach(a=>{let s=M[a].host;s&&e===s&&(o=a)}),o}catch(a){a.message!=="end loop"&&console.log(a)}};var le=["Albania","Andorra","Armenia","Austria","Azerbaijan","Belarus","Belgium","Bosnia and Herzegovina","Bulgaria","Croatia","Cyprus","Czech Republic","Denmark","Estonia","Finland","France","Georgia","Germany","Greece","Hungary","Iceland","Ireland","Italy","Kazakhstan","Latvia","Liechtenstein","Lithuania","Luxembourg","Malta","Moldova","Monaco","Montenegro","Netherlands","North Macedonia","Norway","Poland","Portugal","Romania","Russia","San Marino","Serbia","Slovakia","Slovenia","Spain","Sweden","Switzerland","Turkey","Ukraine","United Kingdom","UK","Vatican City"],l=Ne(location.host),h=M[l];var H=e=>e.replace(/(?new Promise((o,a)=>{try{if(e)GM_xmlhttpRequest({method:"GET",url:`${ie}?url=${e}`,onload(s){let r=JSON.parse(s.responseText);if(r&&r.success)o(r);else throw new Error("\u83B7\u53D6\u8C46\u74E3\u4FE1\u606F\u5931\u8D25")}});else throw new Error("\u65E0\u6CD5\u83B7\u53D6\u8C46\u74E3\u4FE1\u606F")}catch(s){a(s.message)}}),ue=(e,o)=>new Promise((a,s)=>{try{let r=" https://movie.douban.com/subject/",n=j(e);n?GM_xmlhttpRequest({method:"GET",url:`${ce}/${n}`,onload(i){let d=JSON.parse(i.responseText);if(d&&d.data)a(r+d.data.id);else throw new Error("\u83B7\u53D6\u5931\u8D25")}}):GM_xmlhttpRequest({method:"GET",url:`${se}/search/weixin?q=${o}&start=0&count=1&apiKey=${re}`,onload(i){let d=JSON.parse(i.responseText);if(d&&d.items&&d.items.length>0)a(r+d.items[0].id);else throw new Error("\u83B7\u53D6\u5931\u8D25")}})}catch(r){s(r.message)}}),pe=(e,o)=>new Promise((a,s)=>{let r=encodeURI(`imgs=${e}&content_type=${o?1:0}&max_th_size=300`);try{GM_xmlhttpRequest({url:"https://pixhost.to/remote/",method:"POST",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded;charset=utf-8"},data:r,onload(n){let i=n.responseText.match(/(upload_results = )({.*})(;)/);i||s(new Error("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"));let d=[];if(i&&i.length){if(d=JSON.parse(i[2]).images,d.length.length<1)throw new Error(new Error("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"));a(d)}else throw new Error("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")}})}catch(n){s(n.message)}}),R=(e,o)=>{let{description:a,title:s,subtitle:r}=e;return o==="movie"?a.match(/动画/)?o="cartoon":a.match(/纪录/)&&(o="documentary"):o.match(/tv/)&&(s.match(/(s0?\d{1,2})?e(p)?\d{1,2}/i)||r.match(/第[^\s]集/)?o="tv":o="tvPack"),o},V=e=>{let o=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),a=location.search.substr(1).match(o);return a?unescape(a[2]):""},z=e=>e?(e=e.replace(/:|-|\s/g,""),e.match(/atoms/i)?"atoms":e.match(/dtshdma/i)?"dtshdma":e.match(/dtsx/i)?"dtsx":e.match(/dts/i)?"dts":e.match(/truehd/i)?"truehd":e.match(/lpcm/i)?"lpcm":e.match(/flac/i)?"flac":e.match(/aac/i)?"aac":e.match(/DD\+|DDP|DolbyDigitalPlus/i)?"dd+":e.match(/DD|DolbyDigital/i)?"dd":e.match(/ac3/i)?"ac3":""):"",Q=e=>(e=e.replace(/\.|-/g,""),e.match(/x264/i)?"x264":e.match(/h264|AVC/i)?"h264":e.match(/x265/i)?"x265":e.match(/hevc|h265/i)?"hevc":e.match(/vc-?1/i)?"vc1":e.match(/mpeg-?2/i)?"mpeg2":e.match(/mpeg-?4/i)?"mpeg4":""),J=e=>{let o=e.match(/(\[url=(http(s)*:\/{2}.+?(\.(png|jpg)))\])?\[img\](.*?\.(png|jpg|gif))\[\/img](\[url\])?/g);if(o&&o.length>0)return o=o.filter(a=>!a.match(/GDJT|douban|logo|(2019\/03\/28\/5c9cb8f8216d7\.png)|_front|(info_01\.png)|(screens\.png)|(04\/6b\/Ggp5ReQb_o)|(ce\/e7\/KCmGFMOB_o)/)),o.map(a=>{let s="";return a.match(/\[url=http(s)*:.+/)?s=a.match(/=(([^\]])+)/)?.[1]:s=a.match(/img\](([^[])+)/)?.[1],s})},O=e=>e.match(/(uhd|2160|4k).*(blu(-)?ray|remux)/i)?"uhdbluray":e.match(/blu(-)?ray|remux/i)?"bluray":e.match(/hdtv/i)?"hdtv":e.match(/web(-(rip|dl))+/i)?"web":e.match(/hddvd/i)?"hddvd":e.match(/dvd/i)?"dvd":e.match(/vhs/i)?"vhs":"other",ge=e=>{let o=e.trans_title.join("/"),{director:a=[]}=e,s=a.map(d=>he(d.name)),r=e.cast.slice(0,2).map(d=>he(d.name)),n=s.length>0?`|\u5BFC\u6F14: ${s.join(" ")}`:"",i=r.length>0?`|\u4E3B\u6F14:${r.join(" ")}`:"";return o+n+i},he=e=>e.replace(/\s+[A-Za-z\s]+/,""),E=e=>{let o=le;if(e){if(e.match(/USA|US|Canada|CA|美国|加拿大/i))return"US";if(o.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"},fe=e=>{let o=e/1e9;if(o<25)return"BD25";if(o<50)return"BD50";if(o<66)return"BD66";if(o<100)return"BD100"},be=e=>{try{return new Promise((o,a)=>{GM_xmlhttpRequest({method:"GET",url:`${ne}/3/find/${e}?api_key=${de}&language=en&external_source=imdb_id`,onload(s){let r=JSON.parse(s.responseText),n=r.movie_results&&r.movie_results.length>1,i=!r.tv_results&&r.tv_results.length>1;s.status!==200&&!n&&!i&&a(new Error("\u8BF7\u6C42\u5931\u8D25"));let d=n?r.movie_results[0].id:r.tv_results[0].id;o(d)}})})}catch(o){console.log(o)}},j=e=>{let o=/tt\d+/.exec(e);return o&&o[0]?o[0]:""},F=e=>e.match(/T/i)?parseFloat(e)*1024*1024*1024*1024||0:e.match(/G/i)?parseFloat(e)*1024*1024*1024||0:e.match(/M/i)?parseFloat(e)*1024*1024||0:e.match(/K/i)?parseFloat(e)*1024||0:"",w=e=>{if(!e)return!1;let o=e.split(/\n\s*\n/),[a,s]=o,r=o.filter(v=>v.startsWith("Video #2")),[n,...i]=o.filter(v=>v.startsWith("Audio")),d=o.filter(v=>v.startsWith("Text")),u=P("Complete name",a).replace(/\.avi|\.mkv|\.mp4|\.ts/i,""),g=F(P("File size",a)),{videoCodec:c,isHdr:p,isDV:m}=He(s,a,r),{audioCodec:f,channelName:y,languageArray:D}=Re(n,i),T=d.map(v=>P("Language",v)),_=ye(f,y,D,T,p,m),C=Ae(s);return{fileName:u,fileSize:g,videoCodec:c,audioCodec:f,resolution:C,mediaTags:_}},P=(e,o)=>{let a=e.replace(/\s/,"\\s*").replace(/(\(|\))/g,"\\$1"),s=new RegExp(`${a}\\s*:\\s([^ +]+)`,"i");return o.match(s)?o.match(s)[1]:""},Ae=e=>{let o=parseInt(P("Height",e).replace(/\s/g,"")),a=parseInt(P("Width",e).replace(/\s/g,"")),s=P("Scan type",e);return o>1080?"2160p":o>720&&s==="Progressive"?"1080p":o>720&&s!=="Progressive"?"1080i":o>576||a>1024?"720p":o>480||a===1024?"576p":a>=840||o===480?"480p":`${a}x${o}`},ye=(e,o,a,s,r,n)=>{let i=a.includes("Chinese"),d=s.includes("Chinese"),u={};return i&&(u.chineseAudio=!0),a.includes("Cantonese")&&(u.cantoneseAudio=!0),d&&(u.chineseSubtitle=!0),r&&(r.match(/HDR10\+/i)?u["HDR10+"]=!0:u.HDR=!0),n&&(u.DolbyVision=!0),e.match(/dtsx|atmos/ig)&&(u[e]=!0),u},He=(e,o,a)=>{let s=P("Format",o),r=P("Format",e),n=P("Format version",e),i=P("Codec ID",e),d=P("HDR format",e),u=a.length>0&&P("HDR format",a[0]).includes("Dolby Vision"),g=!!P("Encoding settings",e),c="";return s==="DVD Video"?c="DVD":s==="MPEG-4"?c="mpeg4":r==="MPEG Video"&&n==="Version 2"?c="mpeg2":i.match(/xvid/i)?c="xvid":r.match(/HEVC/i)&&!g?c="hevc":r.match(/HEVC/i)&&g?c="x265":r.match(/AVC/i)&&g?c="x264":r.match(/AVC/i)&&!g?c="h264":r.match(/VC-1/i)&&(c="vc1"),{videoCodec:c,hdrFormat:d,isDV:u}},Re=(e,o=[])=>{let a=P("Format",e),s=P("Channel(s)",e),r=P("Commercial name",e),n=[e,...o].map(g=>P("Language",g)),i="",d="",u=parseInt(s);return u&&u>=6?i=`${u-1}.1`:i=`${u}.0`,a.match(/MLP FBA/i)&&r.match(/Dolby Atmos/i)?d="atmos":a.match(/MLP FBA/i)&&!r.match(/Dolby Atmos/i)?d="truehd":a.match(/AC-3/i)&&r.match(/Dolby Digital Plus/i)?d="dd+":a.match(/AC-3/i)&&r.match(/Dolby Digital/i)?d="dd":a.match(/AC-3/i)?d="ac3":a.match(/DTS XLL X/i)?d="dtsx":a.match(/DTS/i)&&r.match(/DTS-HD Master Audio/i)?d="dtshdma":a.match(/DTS/i)?d="dts":a.match(/FLAC/i)?d="flac":a.match(/AAC/i)?d="aac":a.match(/LPCM/i)&&(d="lpcm"),{audioCodec:d,channelName:i,languageArray:n}},B=e=>{if(!e)return"";let o=e.split("Disc Title");o.length>2&&(e=o[1]);let a=e.match(/VIDEO:(\s|Codec|Bitrate|Description|Language|-)*((.|\n)*)AUDIO:/i),s=e.match(/FILES:/i),r=new RegExp(`SUBTITLE(S)*:(\\s|Codec|Bitrate|Description|Language|-)*((.|\\n)*)${s?"FILES:":""}`,"i"),n=e.match(r),i=new RegExp(`AUDIO:(\\s|Codec|Bitrate|Description|Language|-)*((.|\\n)*)${n?"(SUBTITLE(S)?)":s?"FILES:":""}`,"i"),d=e.match(i),u=e.match(/Disc\s*Size:\s*((\d|,| )+)bytes/)?.[1]?.replaceAll(",",""),g=!e.match(/PLAYLIST REPORT/i),c=ee(a,2),[p="",m=""]=c,f=p.match(/2160/)?"hevc":"h264",y=p.match(/\/\s*HDR(\d)*(\+)*\s*\//i)?.[0],D=!!m.match(/\/\s*Dolby\s*Vision\s*/i),T=ee(d,2),_=ee(n,3),C=p.match(/\d{3,4}(p|i)/)?.[0],{audioCodec:v="",channelName:b="",languageArray:x=[]}=ke(T,g),I=_.map(A=>{let L=A.match(/(\w+)\s*\//)?.[1],K=A.match(/Graphics\s*(\w+)\s*(\d|\.)+\s*kbps/i)?.[1];return g?L:K}),N=ye(v,b,x,I,y,D);return{fileSize:u,videoCodec:f,audioCodec:v,resolution:C,mediaTags:N}},ee=(e,o)=>e?.[o]?.split(` +`).filter(a=>!!a)??[],ke=(e,o)=>{if(e.length<1)return{};let a=e.sort((c,p)=>{let m=parseInt(c.match(/\/\s*(\d+)\s*kbps/i)?.[1]);return parseInt(p.match(/\/\s*(\d+)\s*kbps/i)?.[1])-m}),[s,r]=a,n=z(s),i=z(r),d=n,u=s.match(/\d\.\d/)?.[0];n==="lpcm"&&i==="dtshdma"&&(d=i,u=s.match(/\d\.\d/)?.[0]);let g=a.map(c=>{let p=c.match(/(\w+)\s*\//)?.[1],m=c.match(/Audio\s*(\w+)\s*\d+\s*kbps/)?.[1];return o?p:m});return{audioCodec:d,channelName:u,languageArray:g}},Ue=({pre:e,post:o,tracker:a},s,r)=>{let n=typeof e!="undefined"&&e!==null,i=typeof o!="undefined"&&o!==null;n&&e.unshift(s),i&&o.push(r)},S=e=>{if(e)return ve(e).replace(/\[quote\]((.|\n)*?)\[\/quote\]/g,function(a,s){return s&&s.match(/温馨提示|郑重|PT站|网上搜集|本种子|商业盈利|带宽|寬帶|法律责任|Quote:|正版|商用|转载|注明|后果|负责/)?"":a})},Fe=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):""),Te=e=>/rgba?/.test(e)?Fe(e):e,ve=e=>{let o=[],a=[],s=[],r=Ue.bind(null,{pre:a,post:s});switch(e.nodeType){case 1:{switch(e.tagName.toUpperCase()){case"UL":{r(null,null);break}case"OL":{r("[list=1]","[/list]");break}case"LI":{let{className:c}=e;if(l==="Blutopia"&&c){r("[quote]","[/quote]");break}else{r("[*]",` +`);break}}case"B":{r("[b]","[/b]");break}case"U":{r("[u]","[/u]");break}case"I":{r("[i]","[/i]");break}case"DIV":if(e.className==="codemain"){r(` +[quote]`,"[/quote]");break}else{r(` `,` -`);break}case"P":{a(` +`);break}case"P":{r(` `,` -`);break}case"BR":{a(` -`);break}case"SPAN":{a(null,null);break}case"BLOCKQUOTE":case"PRE":case"FIELDSET":{let{tagName:n,className:p}=e;if(n==="BLOCKQUOTE"&&d==="PTP"&&p.match(/spoiler/))return`[quote]${e.textContent}[/quote]`;a("[quote]","[/quote]");break}case"TD":if(d.match(/TTG|HDBits/)){a("[quote]","[/quote]");break}else return"";case"IMG":{let n="",{src:p}=e,u=e.getAttribute("data-src")||e.getAttribute("data-echo");if(u)n=u.match(/(http(s)?:)?\/\//)?u:location.origin+"/"+u;else if(p&&!p.match(/ico_\w+.gif|jinzhuan/))n=p;else return"";return`[img]${n}[/img]`}case"FONT":{let{color:n}=e;n&&a(`[color=${Te(n)}]`,"[/color]");break}case"A":{let{href:n,textContent:p}=e;if(n&&n.length>0){if(n.match(/javascript:void/))return"";if(d==="PTP"&&p.match(/Show comparison/))return"";a(`[url=${n}]`,"[/url]")}break}case"H1":{a('[b][size="7"]',`[/size][/b] -`);break}case"H2":{a('[b][size="6"]',`[/size][/b] -`);break}case"H3":{a('[b][size="5"]',`[/size][/b] -`);break}case"H4":{a('[b][size="4"]',`[/size][/b] -`);break}}let{textAlign:i,fontWeight:c,fontStyle:l,textDecoration:m,color:g}=e.style;if(i)switch(i.toUpperCase()){case"LEFT":{a("[left]","[/left]");break}case"RIGHT":{a("[right]","[/right]");break}case"CENTER":{a("[center]","[/center]");break}}(c==="bold"||~~c>=600)&&a("[b]","[/b]"),l==="italic"&&a("[i]","[/i]"),m==="underline"&&a("[u]","[/u]"),g&&g.trim()!==""&&a(`[color=${Te(g)}]`,"[/color]");break}case 3:return e.textContent.match(/引用|Quote|代码|代碼|Show|Hide|Hidden text|\[show\]/)?"":e.textContent;default:return null}return e.childNodes.forEach((i,c)=>{let l=ve(i);l&&o.push(l)}),r.concat(o).concat(s).join("")},H=e=>{let o={};return e.match(/diy/i)&&(o.DIY=!0),e.match(/国配|国语/i)&&(o.chineseAudio=!0),e.match(/Atoms|杜比全景声/i)&&(o.atoms=!0),e.match(/HDR/i)&&(e.match(/HDR10\+/i)?o["HDR10+"]=!0:o.HDR=!0),e.match(/DoVi|(Dolby\s*Vision)|杜比视界/i)&&(o.DolbyVision=!0),e.match(/粤/i)&&(o.cantoneseAudio=!0),e.match(/简|繁|中字/i)&&(o.chineseSubtitle=!0),e.match(/Criterion|CC标准/i)&&(o.CC=!0),o},U=e=>{if(!e)return"";let o=e.match(/\[quote\](.|\n)+?\[\/quote\]/g),r="";return o&&o.length>0&&o.forEach(s=>{s.match(/Disc\s*Size/i)&&(r+=s.replace(/\[(\/)?quote\]/g,"")+` -`)}),r||(r=e.match(/Disc\s+(Title|Label)[^[]+/i)?.[0]??""),r};var Ce=e=>{console.log(e),d==="PTSBAO"&&localStorage.getItem("autosave")&&localStorage.removeItem("autosave");let o=j(e.imdbUrl),r=e.videoType.match(/bluray/i),{screenshots:s=[]}=e;if($(h.imdb.selector).val(e.imdbUrl),d==="HDBits"){let n=e.title.replace(/([^\d]+)\s+([12][90]\d{2})/,(p,u,b)=>`${e.movieName||e.movieAkaName} ${b}`);e.videoType==="remux"&&(n=n.replace(/\s+(bluray|blu-ray)/ig,"")),e.title=n}if(h.name){let{title:n,subtitle:p}=e,u=n;d==="TTG"&&(u+=`[${p}]`),$(h.name.selector).val(u)}Oe(),["subtitle","douban","area","audioCodec"].forEach(n=>{let p=h[n];if(p&&p.selector){let u=e[n];n==="douban"?u=e.doubanUrl:(n==="area"||n==="audioCodec")&&(u=p.map[e[n]]),$(p.selector).val(u)}});let i=e.mediaInfo,c="";if(e.description)if(c=e.description,xe(h.siteType,d)){let{doubanInfo:n}=e;n&&(c=n+c)}else{let{sourceSite:n,sourceSiteType:p}=e;xe(p,n)&&(c=Le(e))}if(h.mediaInfo&&(r&&d.match(/HDBits|Blutopia/)||($(h.mediaInfo.selector).val(i),c=c.replace(i,"").replace(/\[quote\]\[\/quote\]/g,""))),h.screenshots&&s.forEach(n=>{c.includes(n)&&(c=c.replace(n,""),n.match(/\[url=.+?\[url]/)||(c=c.replace(/\[img\]\[\/img\]\n*/g,"")))}),d==="SSD"&&(e.title=e.title.replace(/\s/ig,"."),$(h.imdb.selector).val(e.doubanUrl||e.imdbUrl),$(h.screenshots.selector).val(s.join(` -`)),(e.category==="tvPack"||e.title.match(/Trilogy|Collection/i)||e.subTitle&&e.subTitle.match(/合集/))&&$('input[name="pack"]').attr("checked",!0)),$(h.description.selector).val(c.trim()),d.match(/BeyondHD|Blutopia/)){let n=d==="Blutopia"?o.replace("tt",""):o;if($(h.imdb.selector).val(n),be(o).then(p=>{$(h.tmdb.selector).val(p)}),d==="BeyondHD"){let{category:p,videoType:u}=e;if(e.category=u,e.videoType=p,r){let b=fe(e.size);u==="uhdbluray"&&b==="BD50"&&(b="uhd50"),e.category=b}}}let l=h.category.map[e.category],m=["videoCodec","videoType","resolution","source","area"],g=[];if(Array.isArray(l)?(g=[...l],m.forEach(n=>{g=De(h,e,n,g),g.length===1&&$(h.category.selector).val(g[0])})):[...m,"category"].forEach(n=>{De(h,e,n,g)}),d.match(/HDHome|PTHome/i)&&$(h.category.selector).change(),h.anonymous){let{selector:n,value:p=""}=h.anonymous;p?$(n).val(p):$(n).attr("checked",!0)}if(h.tags&&Object.keys(e.tags).forEach(n=>{e.tags[n]&&h.tags[n]&&$(h.tags[n]).attr("checked",!0)}),d.match(/PTHome|HDSky|LemonHD/i)&&e.tags.DIY){let n="";if(d==="PTHome")n=e.videoType==="bluray"?"14":"13";else if(d==="HDSky")n=e.videoType==="bluray"?"12":"14";else if(d==="LemonHD"){$('select[name="tag_diy"]').val("yes");return}$(h.videoType.selector).val(n)}},De=(e,o,r,s)=>{let a=e[r]?e[r].map[o[r]]:void 0;return Array.isArray(a)&&s?(e[r].selector&&$(e[r].selector).val(a.shift()),s.length>1&&(s=s.filter(i=>a.includes(i)))):e[r]&&e[r].selector&&$(e[r].selector).val(a),s},Oe=()=>{d.match(/SSD|HDHome|CHDBits|PTer|PTSBAO|PTHome|BeyondHD|OurBits|HDSky|TCCF/)&&$(h.name.selector).attr("id","")},Le=e=>{let{description:o,screenshots:r=[]}=e,s="",a=o.match(/\[quote\](.|\n)+?\[\/quote\]/g);a&&a.length>0&&a.forEach(c=>{c.match(/[\u4e00-\u9fa5]+/i)||(s+=c+` -`)});let i=r.map(c=>c.match(/\[url=.+\]/i)?c:`[img]${c}[/img]`);return s+` -`+i},xe=(e,o)=>e.match(/NexusPHP|TTG/)&&!o.match(/SSD/);var _e=()=>{let e=L("torrentid");if(!e)return!1;t.sourceSite=d,t.sourceSiteType=h.siteType;let o=$(`#torrent_${e}`),r=$(".page__title").text().match(/(^|])([^\d[]+)/)[2].trim(),[s,a=""]=r.split(" AKA ");t.mediaInfo=`${o.find(".mediainfo.mediainfo--in-release-description").next("blockquote").text()}`,t.movieName=s,t.movieAkaName=a,t.imdbUrl=$("#imdb-title-link")?.attr("href")??"",t.year=$(".page__title").text().match(/\[(\d+)\]/)[2];let i=$(`#group_torrent_header_${e}`);t.category=Ve();let c=P(o.find(".bbcode-table-guard")[0]);t.category==="concert"&&(c=$("#synopsis").text()+c);let{comparisonData:l,screenshots:m}=Ke(o);if(l){let Z=[];Object.keys(l).forEach(J=>{Z=Z.concat(l[J]),c=c.replace(J+":",""),c+=` -[b]`+J+`:[/b] -`+l[J].map(Ae=>`[img]${Ae}[/img]`).join("")}),t.comparisonImgs=Z}t.description=c;let g=i.find("#PermaLinkedTorrentToggler").text().replace(/ /g,"").split("/"),[n,p,u,...b]=g,T=b.includes("Remux");t.videoType=u==="WEB"?"web":qe(p,T,n,u);let D=U(c),v=t.videoType.match(/bluray/i),C=v?w:B,_=v?D:t.mediaInfo,{videoCodec:y,audioCodec:f,fileName:x="",resolution:I,mediaTags:A}=C(_);t.videoCodec=y,t.audioCodec=f,t.resolution=I,t.tags=A;let F=x||i.data("releasename");F=N(F),t.title=F,t.source=ze(u,n,I),t.size=i.find(".nobr span").attr("title").replace(/[^\d]/g,""),t.screenshots=m;let q=[],G=$("#movieinfo div").text().match(/Country:\s+([^\n]+)/);return G&&G.length>0&&(q=G?.[1].replace(/(,)\s+/g,"$1").split(",")),t.area=E(q?.[0]),t},Ve=()=>{let e={"Feature Film":"movie","Short Film":"movie","Stand-up Comedy":"other",Miniseries:"tvPack","Live Performance":"concert","Movie Collection":"movie"},o=$("#torrent-table .basic-movie-list__torrent-edition__main").eq(0).text();return e[o]},Ke=()=>{let e=[],o={},r=$(".movie-page__torrent__panel"),s=r.find("a:contains(Show comparison)");for(let i=0;io.match(/BD100|BD66/i)||e.match(/Blu-ray/i)&&r.match(/2160P|4K/i)?"uhdbluray":e.replace(/-/g,"").toLowerCase(),qe=(e,o,r,s)=>{let a="";return o?a="remux":r.match(/BD50|BD25/ig)?a="bluray":r.match(/BD66|BD100/ig)?a="uhdbluray":s.match(/DVD/ig)&&e.match(/MKV|AVI/ig)?a="dvdrip":r.match(/DVD5|DVD9/ig)&&e.match(/VOB|ISO/ig)?a="dvd":e.match(/MKV|MP4/i)&&(a="encode"),a};var Se=()=>{t.sourceSite=d,t.sourceSiteType=h.siteType;let{Category:e,Name:o,Source:r,Type:s,Size:a}=Ge();t.size=k(a),t.title=N(o);let i=H(t.title),c=$(".movie-heading a:last").text(),l=$(".movie-heading a:first").text();if(c)t.year=c;else{let x=t.title.match(/\s([12][90]\d{2})/);t.year=x?x[0]:""}let m=$(".panel-heading:contains(Description)").next(".panel-body").find(".forced-nfo"),g=P(m[0]);t.description=g;let{category:n,countries:p,imdbUrl:u}=je();t.movieName=l;let b=e.toLowerCase().replace(/s/,"");b=n==="Animation"?"cartoon":b,t.category=R(t,b),t.source=Je(r,s),t.area=E(p),t.videoType=We(s);let T=t.videoType.match(/bluray/i),D=$("#stats-full code").text();t.mediaInfo=D;let v=T?w:B,{videoCodec:C,audioCodec:_,resolution:y,mediaTags:f}=v(D);return t.videoCodec=C,t.audioCodec=_,t.resolution=y,t.tags={...i,...f},t.imdbUrl=u,t.screenshots=Ye(),t},Ge=()=>{let e={};return $(".dotborder").each((o,r)=>{let s=$(r).find("td:first").text(),a=$(r).find("td:last").text();e[s]=a.replace(/\n/g,"").trim()}),console.log(e),e},je=()=>{let e=$(".movie-details a"),o={};return e.each((r,s)=>{let a=$(s).attr("href").replace(/.+\?/g,"").split("=");if(a.length>1){let i=decodeURI(a[0]),c=a[1];i==="g[]"&&(i="category"),o[i]=c}else a?.[0].match(/tt\d+/)&&(o.imdbUrl=a[0])}),o},Ye=()=>t.description.match(/\[url=.+?\]\[img\].+?\[\/img\]\[\/url]/g)??[],Je=(e,o)=>o.match(/BD100|BD66/i)||e.match(/Blu-ray/i)&&o.match(/UHD/i)?"uhdbluray":e.match(/WEB|WEB-DL/i)?"web":e.replace(/-/g,"").toLowerCase(),We=e=>(e=e.replace(/\s/g,""),e.match(/Remux/i)?"remux":e.match(/BD50|BD25/i)?"bluray":e.match(/UHD50|UHD66|UHD100/i)?"uhdbluray":e.match(/DVD5|DVD9/i)?"dvd":e.match(/\d{3,4}p/i)?"encode":e);var Pe=()=>{let e=L("id");t.sourceSite=d,t.sourceSiteType=h.siteType;let o=$("#details tr").has("a:contains(Edit torrent)"),r=o.length>0?o.prev():$("#details tr").has(".js-tagcontent").prev(),s=P(r.find(">td")[0]);s=s.match(/\[quote\]((.|\n)+)\[\/quote\]/)?.[1]??"",t.description=s;let{size:a,category:i,videoType:c}=Qe(),l=$("h1").eq(0).text();t.title=N(l);let m=H(l),g=$(".contentlayout h1").length>0,n=g?$(".contentlayout h1"):$("#details .showlinks li").eq(1);if(g){let T=n.prop("lastChild").nodeValue.replace(/\s|\(|\)/g,""),D=n.find("a").text();if(t.movieName=D,T)t.year=T;else{let v=t.title.match(/\s([12][90]\d{2})/);t.year=v?v[0]:""}}t.imdbUrl=n.find("a").attr("href"),t.category=R(t,i),t.source=O(t.title),t.videoType=c;let p=t.videoType.match(/bluray/i),u=p?w:B,b=U(s);if(!p)t.bdinfo=b,Xe(e).then(T=>{if(T){t.mediaInfo=T;let{videoCodec:D,audioCodec:v,resolution:C,mediaTags:_}=u(t.mediaInfo);t.videoCodec=D,t.audioCodec=v,t.resolution=C,t.tags={...m,..._}}});else{t.mediaInfo=b;let{videoCodec:T,audioCodec:D,resolution:v,mediaTags:C}=u(b||s);t.videoCodec=T,t.audioCodec=D,t.resolution=v,t.tags={...m,...C}}t.size=a,t.screenshots=Ze(r)},Qe=()=>{let e={"Blu-ray/HD DVD":"bluray",Capture:"hdtv",Encode:"encode",Remux:"remux","WEB-DL":"web"},o=$("th:contains(Category)").next().text(),r=$("th:contains(Size)").eq(0).next().text(),s=o.split("("),a=s[0].trim().toLowerCase(),i=s[1].split(",")[0].toLowerCase().replace(/\./g,""),c=s[1].split(",")[1].replace(/\)/g,"").trim();return{size:k(r),category:a,videoCodec:i,videoType:e[c]}},Xe=e=>new Promise((o,r)=>{GM_xmlhttpRequest({method:"GET",url:`https://hdbits.org/details/mediainfo?id=${e}`,onload(s){let a=s.responseText;(s.status!==200||!a)&&r(new Error("\u8BF7\u6C42\u5931\u8D25")),o(a)}})}),Ze=e=>t.description.match(/\[url=.+?\]\[img\].+?\[\/img\]\[\/url]/g)??[];var Ie=()=>{t.sourceSite=d,t.sourceSiteType=h.siteType;let e=$("#main_table h1").eq(0).text(),o=e.match(/[^[]+/)?.[0];t.title=N(o),t.subtitle=e.replace(o,"").replace(/\[|\]/g,"");let r=H(t.subtitle+t.title),s=oe("\u7C7B\u578B").text(),{category:a,area:i,videoType:c}=et(s);t.area=i,t.videoType=rt(o,c);let l=t.title.match(/(18|19|20)\d{2}/g);t.year=l?l.pop():"",t.imdbUrl=oe("IMDB").find("a").attr("href"),t.source=O(t.title);let m=oe("\u5C3A\u5BF8").text().match(/\(((\d|,)+)\s*字节\)/i)?.[1];t.size=m.replaceAll(",","");let g=t.videoType.match(/bluray/i),n=g?w:B;window.onload=()=>{let p=$("#kt_d"),u=P(p[0]),b=u.match(/\[color=\w+\]本种子.+?\[\/color\]/)?.[0]??"";u.match&&(u=u.replace(b,"")),t.description=u;let T=u.match(/https:\/\/(movie\.)?douban.com\/subject\/\d+/)?.[0];T&&(t.doubanUrl=T);let D=u.match(/(产\s+地|国\s+家)\s+(.+)/)?.[2];D&&(t.area=E(D)),a?t.category=R(t,a):t.category=at(u);let{bdinfo:v,mediaInfo:C}=tt(u),_=g?v:C;if(_){t.mediaInfo=_;let{videoCodec:y,audioCodec:f,resolution:x,mediaTags:I}=n(_);t.videoCodec=y,t.audioCodec=f,t.resolution=x,t.tags={...r,...I}}else{let y=t.title.match(/\d{3,4}(p|i)/i)?.[0];if(!y&&y.match(/4k|uhd/i)&&(y="2160p"),t.resolution=y,t.audioCodec=V(t.title),u.match(/VIDEO(\.| )*CODEC/i)){let f=u.match(/VIDEO(\.| )*CODEC\.*:?\s*([^\s_:]+)?/i)?.[2];if(f)t.videoCodec=f.replace(/\.|-/g,"").toLowerCase();else{let{title:x}=t;t.videoCodec=Q(x)}}if(u.match(/AUDIO\s*CODEC/i)){let f=u.match(/AUDIO\s*CODEC\.*:?\s*(.+)/i)?.[1];f&&(t.audioCodec=V(f))}}t.screenshots=ot(u),console.log(t)}},et=e=>{let o="",r="",s="";return e.match(/电影/)?o="movie":e.match(/剧包/)?o="tvPack":e.match(/剧/)?o="tv":e.match(/纪录/)?o="documentary":e.match(/综艺/)?o="variety":e.match(/体育/)?o="sport":e.match(/演唱会/)?o="concert":e.match(/动漫/)&&(o="cartoon"),e.match(/韩/)?r="KR":e.match(/日/)?r="JP":e.match(/华/)?r="CN":e.match(/欧/)&&(r="US"),e.match(/UHD原盘/i)?s="uhdbluray":e.match(/bluray原盘/i)?s="bluray":e.match(/DVD/i)&&(s="dvd"),{category:o,area:r,videoType:s}},tt=e=>{let o=e.match(/\[quote\](.|\n)+?\[\/quote\]/g),r="",s="";for(let a=0;ae.replace(/\[(.+)\]?/g,"").replaceAll("\u200D",""),ot=e=>{if(e.match(/More\.Screens/i)){let o=e.match(/\.More\.Screens\[\/u\]\[\/color\]\n((.|\n)+\[\/(url|img)\])/)?.[1];return Y(o)}else return Y(e)},rt=(e,o)=>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":o,oe=e=>$(`#main_table td.heading:contains(${e})`).next(),at=e=>{let o="movie",{title:r,subtitle:s}=t;return r.match(/s0?\d{1,2}/i)||e.match(/集\s*数/)?r.match(/s0?\d{1,2}e0\d{1,2}/i)||s.match(/第[^\s]集/)?o="tv":o="tvPack":e.match(/动画/)?o="cartoon":e.match(/纪录/)&&(o="documentary"),o};var Be=()=>{t.sourceSite=d,t.sourceSiteType=h.siteType;let{Category:e,Name:o,Type:r,Size:s,Resolution:a}=ct();t.size=k(s),t.title=N(o);let i=H(t.title),c=$(".movie-heading span:last").text(),l=$(".movie-heading span:first").text();if(c)t.year=c.replace(/\(|\)|\s/g,"");else{let f=t.title.match(/(19|20)\d{2}/g);t.year=f?.pop()??""}t.resolution=a;let m=$(".panel-heading:contains(Description)+div .panel-body"),g=P(m[0]);t.description=g;let n=$(".movie-details a:contains(IMDB)").attr("href");t.imdbUrl=n,t.movieName=l;let p=it(e);t.category=R(t,p),t.source=O(t.title),t.videoType=nt(r,a);let u=t.videoType.match(/bluray/i),b=$(".decoda-code code").text(),T=U(g),D=u?w:B,v=u?T:b,{videoCodec:C,audioCodec:_,mediaTags:y}=D(v);return t.mediaInfo=v,t.videoCodec=C,t.audioCodec=_,t.tags={...i,...y},t.screenshots=t.description.match(/\[url=.+?\]\[img\].+?\[\/img\]\[\/url]/g)??[],t},ct=()=>{let e={};return $("#vue+.panel table tr").each((o,r)=>{let s=$(r).find("td:first").text().replace(/\s|\n/g,""),a=$(r).find("td:last").text();e[s]=a.replace(/\n/g,"").trim()}),e},it=e=>({Movie:"movie","TV Show":"tv"})[e],nt=(e,o)=>(e=e.replace(/\s/g,""),e.match(/FullDisc/)?o.match(/2160p/i)?"uhdbluray":o.match(/1080/)?"bluray":"dvd":e.match(/Encode/i)?"encode":e.match(/web/i)?"web":e.match(/HDTV/i)?"hdtv":e);var we=()=>{let e=$("#top").text().split(/\s{3,}/)?.[0]?.trim(),o=e.match(/(19|20)\d{2}/g),r=$("td.rowhead:contains('\u57FA\u672C\u4FE1\u606F'), td.rowhead:contains('\u57FA\u672C\u8CC7\u8A0A')").next().text().replace(/:/g,":"),s=$("td.rowhead:contains('\u526F\u6807\u9898'), td.rowhead:contains('\u526F\u6A19\u984C')").next().text(),a=$("#kimdb>a").attr("href"),i=P($("#kdescr")[0]);if(d==="TJUPT"&&(e=(e.match(/\[((\w|\.|\d|-)+)\]/g).filter(I=>I.match(/\.| /))?.[0]??"").replace(/\[|\]/g,"")),d==="PTer"&&(i=$("#descrcopyandpaster").val()),d==="LemonHD"&&(i=i.replace(/\[b\]\[color=\w+\][^[]+?网上搜集[^[]+?\[\/color\]\[\/b\]/,"")),d==="HDChina"){let f=[];$("li:contains('\u57FA\u672C\u4FE1\u606F'):last").next("li").children("i").each(function(){f.push($(this).text().replace("\uFF1A",":"))}),r=f.join("\xA0\xA0\xA0"),s=$("#top").next("h3").text()}if(d==="OurBits"&&(a=$(".imdbnew2 a:first").attr("href"),t.doubanUrl=$("#doubaninfo .doubannew a").attr("href"),t.doubanUrl)){let f=P($(".doubannew2 .doubaninfo")?.[0]),x=`[img]${$("#doubaninfo .doubannew a img").attr("src")}[/img] -`;t.doubanInfo=x+f}if(d==="KEEPFRDS"&&([e,s]=[s,e],o=e.match(/(19|20)\d{2}/g)),d==="SSD"){t.doubanUrl=$(".douban_info a:contains('://movie.douban.com/subject/')").attr("href");let f=P($(".douban-info artical")?.[0]),x=$("#kposter").find("img")?.attr("src")??"",I=x?`[img]${x} [/img] -`:"";if(t.doubanInfo=I+f,i===""||i===void 0){let A=P($(".torrent-extra-text-container .extra-text")?.[0]);A=A?` -[quote]${A}[/quote] -`:"";let F=$(".screenshot").find("img").attr("src")?`[img]${$(".screenshot").find("img").attr("src")}[/img] -`:"",q=$("section[data-group='mediainfo'] .codemain").text(),G=` -[quote]${q}[/quote] -`;t.mediaInfo=q,i=A+G+F}a=$(".douban_info a:contains('://www.imdb.com/title/')").attr("href")}d==="LemonHD"&&(r+=$("td.rowhead:contains('\u8BE6\u7EC6\u4FE1\u606F')").next().text().replace(/:/g,":"),r.match(/分辨率:/)===null&&(r=r.replace("\u5206\u8FA8\u7387","\u5206\u8FA8\u7387:")));let{category:c,videoType:l,videoCodec:m,audioCodec:g,resolution:n,processing:p,size:u}=lt(r);t.sourceSite=d,t.sourceSiteType=h.siteType;let b=i.match(/https:\/\/(movie\.)?douban.com\/subject\/\d+/)?.[0];b&&(t.doubanUrl=b);let T=i.match(/http(s)?:\/\/www.imdb.com\/title\/tt\d+/)?.[0];if(T?t.imdbUrl=T:a&&(t.imdbUrl=a.match(/www.imdb.com\/title/)?a:""),t.year=o?o.pop():"",t.title=e,t.subtitle=s,t.description=i,!p||p.match(/raw/)){let f=i.match(/(产\s+地|国\s+家)\s+(.+)/)?.[2];f&&(t.area=E(f))}else t.area=E(p);let D=R(t,ut(c||i));t.category=D,t.videoType=mt(l||t.title),t.source=O(t.title),t.size=u?k(u):"",t.screenshots=Y(i),t.tags=H(t.subtitle);let v=t.videoType.match(/bluray/i),{bdinfo:C,mediaInfo:_}=dt(i),y=v?C:t.mediaInfo||_;if(y){t.mediaInfo=y;let f=v?w:B,{videoCodec:x,audioCodec:I,resolution:A,mediaTags:F}=f(y);t.videoCodec=x,t.audioCodec=I,t.resolution=A,t.tags={...t.tags,...F}}else{if(d.match(/beitai/i)){if(i.match(/VIDEO\s*(\.)?CODEC/i)){let f=i.match(/VIDEO\s*(\.)?CODEC\.*:?\s*([^\s_,]+)?/i)?.[2];f&&(t.videoCodec=f.replace(/\.|-/g,"").toLowerCase())}}else t.videoCodec=Q(m||t.title);t.resolution=pt(n||t.title),t.audioCodec=V(g||t.title)}},lt=e=>{let o="\u5206\u8FA8\u7387|\u89E3\u6790\u5EA6|\u683C\u5F0F";d==="SSD"&&(o="\u5206\u8FA8\u7387|\u89E3\u6790\u5EA6");let r=K("\u7C7B\u578B|\u5206\u7C7B|\u985E\u5225",e),s=K("\u5A92\u4ECB|\u6765\u6E90|\u8D28\u91CF",e),a=K("\u7F16\u7801|\u7DE8\u78BC",e),i=K("\u97F3\u9891|\u97F3\u9891\u7F16\u7801",e),c=K(o,e),l=K("\u5904\u7406|\u8655\u7406|\u5730\u533A",e),m=K("\u5927\u5C0F",e);return console.log({category:r,videoType:s,videoCodec:a,audioCodec:i,resolution:c,processing:l,size:m}),{category:r,videoType:s,videoCodec:a,audioCodec:i,resolution:c,processing:l,size:m}},dt=e=>{let o=e.match(/\[quote\](.|\n)+?\[\/quote\]/g)??[],r="",s="";for(let a=0;ae.replace(/\[(.+)\]?/g,"").replaceAll("\u200D",""),K=(e,o)=>{let r=`(${e}):\\s?([^\u4E00-\u9FA5]+)?`;e.match(/大小/)&&(r=`(${e}):\\s?((\\d|\\.)+\\s+(G|M|T|K)(i)?B)`),d.match(/KEEPFRDS|TJUPT|PTSBAO|PTHome/)&&e.match(/类型/)&&(r=`(${e}):\\s?([^\\s]+)?`),d==="PTer"&&e.match(/类型|地区/)&&(r=`(${e}):\\s?([^\\s]+)?`);let s=new RegExp(r),a=o.match(s,"i")?.[2];if(a)return a.replace(/\s/g,"").trim().toLowerCase()},mt=e=>e?(e=e.replace(/[.-]/g,"").toLowerCase(),e.match(/uhd|ultra/ig)?"uhdbluray":e.match(/remux/ig)?"remux":e.match(/blu/ig)?"bluray":e.match(/encode|x264|x265|bdrip|hdrip/ig)?"encode":e.match(/web/ig)?"web":e.match(/hdtv/ig)?"hdtv":e.match(/dvdr/ig)?"dvdrip":e.match(/dvd/ig)?"dvd":""):"",ut=e=>e?(e=e.replace(/[.-]/g,"").toLowerCase(),e.match(/movie|bd|ultra|电影/ig)?"movie":e.match(/tv|drama|剧集/ig)?"tv":e.match(/TVSeries/ig)?"tvPack":e.match(/综艺/ig)?"variety":e.match(/document|纪录|紀錄/ig)?"documentary":e.match(/sport|体育/ig)?"sport":e.match(/mv|演唱|concert/ig)?"concert":e.match(/anim|动(画|漫)/ig)?"cartoon":""):"",pt=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 z=_e;h?h.siteType==="NexusPHP"?z=we:d==="BeyondHD"?z=Se:d==="HDBits"?z=Pe:d==="TTG"?z=Ie:d==="Blutopia"&&(z=Be):z=void 0;var Ee=z;var oo=GM_addStyle(` +`);break}case"BR":{r(` +`);break}case"SPAN":{r(null,null);break}case"BLOCKQUOTE":case"PRE":case"FIELDSET":{let{tagName:c,className:p}=e;if(c==="BLOCKQUOTE"&&l==="PTP"&&p.match(/spoiler/))return`[quote]${e.textContent}[/quote]`;r("[quote]","[/quote]");break}case"TD":if(l.match(/TTG|HDBits/)){r("[quote]","[/quote]");break}else return"";case"IMG":{let c="",{src:p}=e,m=e.getAttribute("data-src")||e.getAttribute("data-echo");if(m)c=m.match(/(http(s)?:)?\/\//)?m:location.origin+"/"+m;else if(p&&!p.match(/ico_\w+.gif|jinzhuan/))c=p;else return"";return`[img]${c}[/img]`}case"FONT":{let{color:c}=e;c&&r(`[color=${Te(c)}]`,"[/color]");break}case"A":{let{href:c,textContent:p}=e;if(c&&c.length>0){if(c.match(/javascript:void/))return"";if(l==="PTP"&&p.match(/Show comparison/))return"";r(`[url=${c}]`,"[/url]")}break}case"H1":{r('[b][size="7"]',`[/size][/b] +`);break}case"H2":{r('[b][size="6"]',`[/size][/b] +`);break}case"H3":{r('[b][size="5"]',`[/size][/b] +`);break}case"H4":{r('[b][size="4"]',`[/size][/b] +`);break}}let{textAlign:n,fontWeight:i,fontStyle:d,textDecoration:u,color:g}=e.style;if(n)switch(n.toUpperCase()){case"LEFT":{r("[left]","[/left]");break}case"RIGHT":{r("[right]","[/right]");break}case"CENTER":{r("[center]","[/center]");break}}(i==="bold"||~~i>=600)&&r("[b]","[/b]"),d==="italic"&&r("[i]","[/i]"),u==="underline"&&r("[u]","[/u]"),g&&g.trim()!==""&&r(`[color=${Te(g)}]`,"[/color]");break}case 3:return e.textContent.match(/引用|Quote|代码|代碼|Show|Hide|Hidden text|\[show\]/)?"":e.textContent;default:return null}return e.childNodes.forEach((n,i)=>{let d=ve(n);d&&o.push(d)}),a.concat(o).concat(s).join("")},k=e=>{let o={};return e.match(/diy/i)&&(o.DIY=!0),e.match(/国配|国语/i)&&(o.chineseAudio=!0),e.match(/Atoms|杜比全景声/i)&&(o.atoms=!0),e.match(/HDR/i)&&(e.match(/HDR10\+/i)?o["HDR10+"]=!0:o.HDR=!0),e.match(/DoVi|(Dolby\s*Vision)|杜比视界/i)&&(o.DolbyVision=!0),e.match(/粤/i)&&(o.cantoneseAudio=!0),e.match(/简|繁|中字/i)&&(o.chineseSubtitle=!0),e.match(/Criterion|CC标准/i)&&(o.CC=!0),o},U=e=>{if(!e)return"";let o=e.match(/\[quote\](.|\n)+?\[\/quote\]/g),a="";return o&&o.length>0&&o.forEach(s=>{s.match(/Disc\s*Size/i)&&(a+=s.replace(/\[(\/)?quote\]/g,"")+` +`)}),a||(a=e.match(/Disc\s+(Title|Label)[^[]+/i)?.[0]??""),a};var xe=e=>{console.log(e),l==="PTSBAO"&&localStorage.getItem("autosave")&&localStorage.removeItem("autosave");let o=j(e.imdbUrl),a=e.videoType.match(/bluray/i),{screenshots:s=[]}=e;if($(h.imdb.selector).val(e.imdbUrl),l==="HDBits"){let c=e.title.replace(/([^\d]+)\s+([12][90]\d{2})/,(p,m,f)=>`${e.movieName||e.movieAkaName} ${f}`);e.videoType==="remux"&&(c=c.replace(/\s+(bluray|blu-ray)/ig,"")),e.title=c}if(h.name){let{title:c,subtitle:p}=e,m=c;l==="TTG"&&(m+=`[${p}]`),$(h.name.selector).val(m)}Me(),["subtitle","douban","area","audioCodec"].forEach(c=>{let p=h[c];if(p&&p.selector){let m=e[c];c==="douban"?m=e.doubanUrl:(c==="area"||c==="audioCodec")&&(m=p.map[e[c]]),$(p.selector).val(m)}});let n=e.mediaInfo,i="";if(e.description)if(i=e.description,te(h.siteType,l)){let{doubanInfo:c}=e;c&&(i=c+i)}else{let{sourceSite:c,sourceSiteType:p}=e;te(p,c)&&(i=Oe(e))}if(h.mediaInfo&&(a&&l.match(/HDBits|Blutopia/)||($(h.mediaInfo.selector).val(n),i=i.replace(n,"").replace(/\[quote\]\[\/quote\]/g,""))),h.screenshots&&s.forEach(c=>{i.includes(c)&&(i=i.replace(c,""),c.match(/\[url=.+?\[url]/)||(i=i.replace(/\[img\]\[\/img\]\n*/g,"")))}),l==="SSD"&&(e.title=e.title.replace(/\s/ig,"."),$(h.imdb.selector).val(e.doubanUrl||e.imdbUrl),$(h.screenshots.selector).val(s.join(` +`)),(e.category==="tvPack"||e.title.match(/Trilogy|Collection/i)||e.subTitle&&e.subTitle.match(/合集/))&&$('input[name="pack"]').attr("checked",!0)),$(h.description.selector).val(Le(e)+i.trim()),l.match(/BeyondHD|Blutopia/)){let c=l==="Blutopia"?o.replace("tt",""):o;if($(h.imdb.selector).val(c),be(o).then(p=>{$(h.tmdb.selector).val(p)}),l==="BeyondHD"){let{category:p,videoType:m}=e;if(e.category=m,e.videoType=p,a){let f=fe(e.size);m==="uhdbluray"&&f==="BD50"&&(f="uhd50"),e.category=f}}}let d=h.category.map[e.category],u=["videoCodec","videoType","resolution","source","area"],g=[];if(Array.isArray(d)?(g=[...d],u.forEach(c=>{g=De(h,e,c,g),g.length===1&&$(h.category.selector).val(g[0])})):[...u,"category"].forEach(c=>{De(h,e,c,g)}),l.match(/HDHome|PTHome/i)&&$(h.category.selector).change(),h.anonymous){let{selector:c,value:p=""}=h.anonymous;p?$(c).val(p):$(c).attr("checked",!0)}if(h.tags&&Object.keys(e.tags).forEach(c=>{e.tags[c]&&h.tags[c]&&$(h.tags[c]).attr("checked",!0)}),l.match(/PTHome|HDSky|LemonHD/i)&&e.tags.DIY){let c="";if(l==="PTHome")c=e.videoType==="bluray"?"14":"13";else if(l==="HDSky")c=e.videoType==="bluray"?"12":"14";else if(l==="LemonHD"){$('select[name="tag_diy"]').val("yes");return}$(h.videoType.selector).val(c)}if(l.match(/HDU/)){let c="",{resolution:p,videoType:m,category:f}=e,y=f.match(/tv/);m==="remux"&&(p==="2160p"?c=y?"16":"15":c=y?"12":"3"),y&&(m==="encode"?c="14":m==="web"&&(c="13")),c&&$(h.videoType.selector).val(c),m.match(/bluray/)&&$(h.category.selector).val("424")}},De=(e,o,a,s)=>{let r=e[a]?e[a].map[o[a]]:void 0;return Array.isArray(r)&&s?(e[a].selector&&$(e[a].selector).val(r.shift()),s.length>1&&(s=s.filter(n=>r.includes(n)))):e[a]&&e[a].selector&&$(e[a].selector).val(r),s},Me=()=>{l.match(/SSD|HDHome|CHDBits|PTer|PTSBAO|PTHome|BeyondHD|OurBits|HDSky|TCCF/)&&$(h.name.selector).attr("id","")},Oe=e=>{let{description:o,screenshots:a=[]}=e,s="",r=o.match(/\[quote\](.|\n)+?\[\/quote\]/g);r&&r.length>0&&r.forEach(i=>{i.match(/[\u4e00-\u9fa5]+/i)||(s+=i+` +`)});let n=a.map(i=>i.match(/\[url=.+\]/i)?i:`[img]${i}[/img]`);return s+` +`+n},Le=e=>{let o=te(h.siteType,l),a=`\u8F6C\u53D1\u81EA[b]${e.sourceSite}[/b]\uFF0C\u611F\u8C22\u539F\u53D1\u5E03\u8005\uFF01`;return o||(a=`Torrent from [b]${e.sourceSite}[/b]. +All thanks to the original uploader\uFF01`),`[quote]${a}[/quote] + +`},te=(e,o)=>e.match(/NexusPHP|TTG/)&&!o.match(/SSD/);var _e=()=>{let e=V("torrentid");if(!e)return!1;t.sourceSite=l,t.sourceSiteType=h.siteType;let o=$(`#torrent_${e}`),a=$(".page__title").text().match(/(^|])([^\d[]+)/)[2].trim(),[s,r=""]=a.split(" AKA ");t.mediaInfo=`${o.find(".mediainfo.mediainfo--in-release-description").next("blockquote").text()}`,t.movieName=s,t.movieAkaName=r,t.imdbUrl=$("#imdb-title-link")?.attr("href")??"",t.year=$(".page__title").text().match(/\[(\d+)\]/)[2];let n=$(`#group_torrent_header_${e}`);t.category=Ke();let i=S(o.find(".bbcode-table-guard")[0]);t.category==="concert"&&(i=$("#synopsis").text()+i);let{comparisonData:d,screenshots:u}=Ve(o);if(d){let Y=[];Object.keys(d).forEach(W=>{Y=Y.concat(d[W]),i=i.replace(W+":",""),i+=` +[b]`+W+`:[/b] +`+d[W].map($e=>`[img]${$e}[/img]`).join("")}),t.comparisonImgs=Y}t.description=i;let g=n.find("#PermaLinkedTorrentToggler").text().replace(/ /g,"").split("/"),[c,p,m,...f]=g,y=f.includes("Remux");t.videoType=m==="WEB"?"web":qe(p,y,c,m);let D=U(i),T=t.videoType.match(/bluray/i),_=T?B:w,C=T?D:t.mediaInfo,{videoCodec:v,audioCodec:b,fileName:x="",resolution:I,mediaTags:N}=_(C);t.videoCodec=v,t.audioCodec=b,t.resolution=I,t.tags=N;let A=x||n.data("releasename");A=H(A),t.title=A,t.source=ze(m,c,I),t.size=n.find(".nobr span").attr("title").replace(/[^\d]/g,""),t.screenshots=u;let L=[],K=$("#movieinfo div").text().match(/Country:\s+([^\n]+)/);return K&&K.length>0&&(L=K?.[1].replace(/(,)\s+/g,"$1").split(",")),t.area=E(L?.[0]),t},Ke=()=>{let e={"Feature Film":"movie","Short Film":"movie","Stand-up Comedy":"other",Miniseries:"tvPack","Live Performance":"concert","Movie Collection":"movie"},o=$("#torrent-table .basic-movie-list__torrent-edition__main").eq(0).text();return e[o]},Ve=()=>{let e=[],o={},a=$(".movie-page__torrent__panel"),s=a.find("a:contains(Show comparison)");for(let n=0;no.match(/BD100|BD66/i)||e.match(/Blu-ray/i)&&a.match(/2160P|4K/i)?"uhdbluray":e.replace(/-/g,"").toLowerCase(),qe=(e,o,a,s)=>{let r="";return o?r="remux":a.match(/BD50|BD25/ig)?r="bluray":a.match(/BD66|BD100/ig)?r="uhdbluray":s.match(/DVD/ig)&&e.match(/MKV|AVI/ig)?r="dvdrip":a.match(/DVD5|DVD9/ig)&&e.match(/VOB|ISO/ig)?r="dvd":e.match(/MKV|MP4/i)&&(r="encode"),r};var Ce=()=>{t.sourceSite=l,t.sourceSiteType=h.siteType;let{Category:e,Name:o,Source:a,Type:s,Size:r}=Ge();t.size=F(r),t.title=H(o);let n=k(t.title),i=$(".movie-heading a:last").text(),d=$(".movie-heading a:first").text();if(i)t.year=i;else{let x=t.title.match(/\s([12][90]\d{2})/);t.year=x?x[0]:""}let u=$(".panel-heading:contains(Description)").next(".panel-body").find(".forced-nfo"),g=S(u[0]);t.description=g;let{category:c,countries:p,imdbUrl:m}=je();t.movieName=d;let f=e.toLowerCase().replace(/s/,"");f=c==="Animation"?"cartoon":f,t.category=R(t,f),t.source=Ye(a,s),t.area=E(p),t.videoType=We(s);let y=t.videoType.match(/bluray/i),D=$("#stats-full code").text();t.mediaInfo=D;let T=y?B:w,{videoCodec:_,audioCodec:C,resolution:v,mediaTags:b}=T(D);return t.videoCodec=_,t.audioCodec=C,t.resolution=v,t.tags={...n,...b},t.imdbUrl=m,t.screenshots=Je(),t},Ge=()=>{let e={};return $(".dotborder").each((o,a)=>{let s=$(a).find("td:first").text(),r=$(a).find("td:last").text();e[s]=r.replace(/\n/g,"").trim()}),console.log(e),e},je=()=>{let e=$(".movie-details a"),o={};return e.each((a,s)=>{let r=$(s).attr("href").replace(/.+\?/g,"").split("=");if(r.length>1){let n=decodeURI(r[0]),i=r[1];n==="g[]"&&(n="category"),o[n]=i}else r?.[0].match(/tt\d+/)&&(o.imdbUrl=r[0])}),o},Je=()=>t.description.match(/\[url=.+?\]\[img\].+?\[\/img\]\[\/url]/g)??[],Ye=(e,o)=>o.match(/BD100|BD66/i)||e.match(/Blu-ray/i)&&o.match(/UHD/i)?"uhdbluray":e.match(/WEB|WEB-DL/i)?"web":e.replace(/-/g,"").toLowerCase(),We=e=>(e=e.replace(/\s/g,""),e.match(/Remux/i)?"remux":e.match(/BD50|BD25/i)?"bluray":e.match(/UHD50|UHD66|UHD100/i)?"uhdbluray":e.match(/DVD5|DVD9/i)?"dvd":e.match(/\d{3,4}p/i)?"encode":e);var Pe=()=>{let e=V("id");t.sourceSite=l,t.sourceSiteType=h.siteType;let o=$("#details tr").has("a:contains(Edit torrent)"),a=o.length>0?o.prev():$("#details tr").has(".js-tagcontent").prev(),s=S(a.find(">td")[0]);s=s.match(/\[quote\]((.|\n)+)\[\/quote\]/)?.[1]??"",t.description=s;let{size:r,category:n,videoType:i}=Qe(),d=$("h1").eq(0).text();t.title=H(d);let u=k(d),g=$(".contentlayout h1").length>0,c=g?$(".contentlayout h1"):$("#details .showlinks li").eq(1);if(g){let y=c.prop("lastChild").nodeValue.replace(/\s|\(|\)/g,""),D=c.find("a").text();if(t.movieName=D,y)t.year=y;else{let T=t.title.match(/\s([12][90]\d{2})/);t.year=T?T[0]:""}}t.imdbUrl=c.find("a").attr("href"),t.category=R(t,n),t.source=O(t.title),t.videoType=i;let p=t.videoType.match(/bluray/i),m=p?B:w,f=U(s);if(!p)t.bdinfo=f,Xe(e).then(y=>{if(y){t.mediaInfo=y;let{videoCodec:D,audioCodec:T,resolution:_,mediaTags:C}=m(t.mediaInfo);t.videoCodec=D,t.audioCodec=T,t.resolution=_,t.tags={...u,...C}}});else{t.mediaInfo=f;let{videoCodec:y,audioCodec:D,resolution:T,mediaTags:_}=m(f||s);t.videoCodec=y,t.audioCodec=D,t.resolution=T,t.tags={...u,..._}}t.size=r,t.screenshots=Ze(a)},Qe=()=>{let e={"Blu-ray/HD DVD":"bluray",Capture:"hdtv",Encode:"encode",Remux:"remux","WEB-DL":"web"},o=$("th:contains(Category)").next().text(),a=$("th:contains(Size)").eq(0).next().text(),s=o.split("("),r=s[0].trim().toLowerCase(),n=s[1].split(",")[0].toLowerCase().replace(/\./g,""),i=s[1].split(",")[1].replace(/\)/g,"").trim();return{size:F(a),category:r,videoCodec:n,videoType:e[i]}},Xe=e=>new Promise((o,a)=>{GM_xmlhttpRequest({method:"GET",url:`https://hdbits.org/details/mediainfo?id=${e}`,onload(s){let r=s.responseText;(s.status!==200||!r)&&a(new Error("\u8BF7\u6C42\u5931\u8D25")),o(r)}})}),Ze=e=>t.description.match(/\[url=.+?\]\[img\].+?\[\/img\]\[\/url]/g)??[];var Se=()=>{t.sourceSite=l,t.sourceSiteType=h.siteType;let e=$("#main_table h1").eq(0).text(),o=e.match(/[^[]+/)?.[0];t.title=H(o),t.subtitle=e.replace(o,"").replace(/\[|\]/g,"");let a=k(t.subtitle+t.title),s=oe("\u7C7B\u578B").text(),{category:r,area:n,videoType:i}=et(s);t.area=n,t.videoType=at(o,i);let d=t.title.match(/(18|19|20)\d{2}/g);t.year=d?d.pop():"",t.imdbUrl=oe("IMDB").find("a").attr("href"),t.source=O(t.title);let u=oe("\u5C3A\u5BF8").text().match(/\(((\d|,)+)\s*字节\)/i)?.[1];t.size=u.replaceAll(",","");let g=t.videoType.match(/bluray/i),c=g?B:w;window.onload=()=>{let p=$("#kt_d"),m=S(p[0]),f=m.match(/\[color=\w+\]本种子.+?\[\/color\]/)?.[0]??"";m.match&&(m=m.replace(f,"")),t.description=m;let y=m.match(/https:\/\/(movie\.)?douban.com\/subject\/\d+/)?.[0];y&&(t.doubanUrl=y);let D=m.match(/(产\s+地|国\s+家)\s+(.+)/)?.[2];D&&(t.area=E(D)),r?t.category=R(t,r):t.category=rt(m);let{bdinfo:T,mediaInfo:_}=tt(m),C=g?T:_;if(C){t.mediaInfo=C;let{videoCodec:v,audioCodec:b,resolution:x,mediaTags:I}=c(C);t.videoCodec=v,t.audioCodec=b,t.resolution=x,t.tags={...a,...I}}else{let v=t.title.match(/\d{3,4}(p|i)/i)?.[0];if(!v&&v.match(/4k|uhd/i)&&(v="2160p"),t.resolution=v,t.audioCodec=z(t.title),m.match(/VIDEO(\.| )*CODEC/i)){let b=m.match(/VIDEO(\.| )*CODEC\.*:?\s*([^\s_:]+)?/i)?.[2];if(b)t.videoCodec=b.replace(/\.|-/g,"").toLowerCase();else{let{title:x}=t;t.videoCodec=Q(x)}}if(m.match(/AUDIO\s*CODEC/i)){let b=m.match(/AUDIO\s*CODEC\.*:?\s*(.+)/i)?.[1];b&&(t.audioCodec=z(b))}}t.screenshots=ot(m),console.log(t)}},et=e=>{let o="",a="",s="";return e.match(/电影/)?o="movie":e.match(/剧包/)?o="tvPack":e.match(/剧/)?o="tv":e.match(/纪录/)?o="documentary":e.match(/综艺/)?o="variety":e.match(/体育/)?o="sport":e.match(/演唱会/)?o="concert":e.match(/动漫/)&&(o="cartoon"),e.match(/韩/)?a="KR":e.match(/日/)?a="JP":e.match(/华/)?a="CN":e.match(/欧/)&&(a="US"),e.match(/UHD原盘/i)?s="uhdbluray":e.match(/bluray原盘/i)?s="bluray":e.match(/DVD/i)&&(s="dvd"),{category:o,area:a,videoType:s}},tt=e=>{let o=e.match(/\[quote\](.|\n)+?\[\/quote\]/g),a="",s="";for(let r=0;re.replace(/\[(.+)\]?/g,"").replaceAll("\u200D",""),ot=e=>{if(e.match(/More\.Screens/i)){let o=e.match(/\.More\.Screens\[\/u\]\[\/color\]\n((.|\n)+\[\/(url|img)\])/)?.[1];return J(o)}else return J(e)},at=(e,o)=>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":o,oe=e=>$(`#main_table td.heading:contains(${e})`).next(),rt=e=>{let o="movie",{title:a,subtitle:s}=t;return a.match(/s0?\d{1,2}/i)||e.match(/集\s*数/)?a.match(/s0?\d{1,2}e0\d{1,2}/i)||s.match(/第[^\s]集/)?o="tv":o="tvPack":e.match(/动画/)?o="cartoon":e.match(/纪录/)&&(o="documentary"),o};var Ie=()=>{t.sourceSite=l,t.sourceSiteType=h.siteType;let{Category:e,Name:o,Type:a,Size:s,Resolution:r}=ct();t.size=F(s),t.title=H(o);let n=k(t.title),i=$(".movie-heading span:last").text(),d=$(".movie-heading span:first").text();if(i)t.year=i.replace(/\(|\)|\s/g,"");else{let b=t.title.match(/(19|20)\d{2}/g);t.year=b?.pop()??""}t.resolution=r;let u=$(".panel-heading:contains(Description)+div .panel-body"),g=S(u[0]);t.description=g;let c=$(".movie-details a:contains(IMDB)").attr("href");t.imdbUrl=c,t.movieName=d;let p=it(e);t.category=R(t,p),t.source=O(t.title),t.videoType=nt(a,r);let m=t.videoType.match(/bluray/i),f=$(".decoda-code code").text(),y=U(g),D=m?B:w,T=m?y:f,{videoCodec:_,audioCodec:C,mediaTags:v}=D(T);return t.mediaInfo=T,t.videoCodec=_,t.audioCodec=C,t.tags={...n,...v},t.screenshots=t.description.match(/\[url=.+?\]\[img\].+?\[\/img\]\[\/url]/g)??[],t},ct=()=>{let e={};return $("#vue+.panel table tr").each((o,a)=>{let s=$(a).find("td:first").text().replace(/\s|\n/g,""),r=$(a).find("td:last").text();e[s]=r.replace(/\n/g,"").trim()}),e},it=e=>({Movie:"movie","TV Show":"tv"})[e],nt=(e,o)=>(e=e.replace(/\s/g,""),e.match(/FullDisc/)?o.match(/2160p/i)?"uhdbluray":o.match(/1080/)?"bluray":"dvd":e.match(/Encode/i)?"encode":e.match(/web/i)?"web":e.match(/HDTV/i)?"hdtv":e);var we=()=>{let e=$("#top").text().split(/\s{3,}/)?.[0]?.trim(),o=$("td.rowhead:contains('\u57FA\u672C\u4FE1\u606F'), td.rowhead:contains('\u57FA\u672C\u8CC7\u8A0A')").next().text().replace(/:/g,":"),a=$("td.rowhead:contains('\u526F\u6807\u9898'), td.rowhead:contains('\u526F\u6A19\u984C')").next().text(),s=$("#kimdb>a").attr("href"),r=S($("#kdescr")[0]);if(l==="HDArea"&&(e=$("h1#top").text().split(/\s{3,}/)?.[0]?.trim()),l==="TJUPT"&&(e=(e.match(/\[((\w|\.|\d|-)+)\]/g).filter(I=>I.match(/\.| /))?.[0]??"").replace(/\[|\]/g,"")),l==="PTer"&&(r=$("#descrcopyandpaster").val()),l==="LemonHD"&&(r=r.replace(/\[b\]\[color=\w+\][^[]+?网上搜集[^[]+?\[\/color\]\[\/b\]/,"")),l==="HDChina"){let b=[];$("li:contains('\u57FA\u672C\u4FE1\u606F'):last").next("li").children("i").each(function(){b.push($(this).text().replace("\uFF1A",":"))}),o=b.join("\xA0\xA0\xA0"),a=$("#top").next("h3").text()}if(l==="OurBits"&&(s=$(".imdbnew2 a:first").attr("href"),t.doubanUrl=$("#doubaninfo .doubannew a").attr("href"),t.doubanUrl)){let b=S($(".doubannew2 .doubaninfo")?.[0]),x=`[img]${$("#doubaninfo .doubannew a img").attr("src")}[/img] +`;t.doubanInfo=x+b}if(l==="KEEPFRDS"&&([e,a]=[a,e],n=e.match(/(19|20)\d{2}/g)),l==="SSD"){t.doubanUrl=$(".douban_info a:contains('://movie.douban.com/subject/')").attr("href");let b=S($(".douban-info artical")?.[0]),x=$("#kposter").find("img")?.attr("src")??"",I=x?`[img]${x} [/img] +`:"";if(t.doubanInfo=I+b,r===""||r===void 0){let N=S($(".torrent-extra-text-container .extra-text")?.[0]);N=N?` +[quote]${N}[/quote] +`:"";let A=$(".screenshot").find("img").attr("src")?`[img]${$(".screenshot").find("img").attr("src")}[/img] +`:"",L=$("section[data-group='mediainfo'] .codemain").text(),K=` +[quote]${L}[/quote] +`;t.mediaInfo=L,r=N+K+A}s=$(".douban_info a:contains('://www.imdb.com/title/')").attr("href")}l==="LemonHD"&&(o+=$("td.rowhead:contains('\u8BE6\u7EC6\u4FE1\u606F')").next().text().replace(/:/g,":"),o.match(/分辨率:/)===null&&(o=o.replace("\u5206\u8FA8\u7387","\u5206\u8FA8\u7387:")));let n=e.match(/(19|20)\d{2}/g),{category:i,videoType:d,videoCodec:u,audioCodec:g,resolution:c,processing:p,size:m}=dt(o);t.sourceSite=l,t.sourceSiteType=h.siteType;let f=r.match(/https:\/\/(movie\.)?douban.com\/subject\/\d+/)?.[0];f&&(t.doubanUrl=f);let y=r.match(/http(s)?:\/\/www.imdb.com\/title\/tt\d+/)?.[0];if(y?t.imdbUrl=y:s&&(t.imdbUrl=s.match(/www.imdb.com\/title/)?s:""),t.year=n?n.pop():"",t.title=e,t.subtitle=a,t.description=r,!p||p.match(/raw/)){let b=r.match(/(产\s+地|国\s+家)】?\s*(.+)/)?.[2];b&&(t.area=E(b))}else t.area=E(p);let D=R(t,ut(i||r));t.category=D,t.videoType=mt(d||t.title),t.source=O(t.title),t.size=m?F(m):"",t.screenshots=J(r),t.tags=k(t.subtitle);let T=t.videoType.match(/bluray/i),{bdinfo:_,mediaInfo:C}=lt(r),v=T?_:t.mediaInfo||C;if(v){t.mediaInfo=v;let b=T?B:w,{videoCodec:x,audioCodec:I,resolution:N,mediaTags:A}=b(v);t.videoCodec=x,t.audioCodec=I,t.resolution=N,t.tags={...t.tags,...A}}else{if(l.match(/beitai/i)){if(r.match(/VIDEO\s*(\.)?CODEC/i)){let b=r.match(/VIDEO\s*(\.)?CODEC\.*:?\s*([^\s_,]+)?/i)?.[2];b&&(t.videoCodec=b.replace(/\.|-/g,"").toLowerCase())}}else t.videoCodec=Q(u||t.title);t.resolution=pt(c||t.title),t.audioCodec=z(g||t.title)}},dt=e=>{let o="\u5206\u8FA8\u7387|\u89E3\u6790\u5EA6|\u683C\u5F0F";l==="SSD"&&(o="\u5206\u8FA8\u7387|\u89E3\u6790\u5EA6");let a=q("\u7C7B\u578B|\u5206\u7C7B|\u985E\u5225",e),s=q("\u5A92\u4ECB|\u6765\u6E90|\u8D28\u91CF",e),r=q("\u7F16\u7801|\u7DE8\u78BC",e),n=q("\u97F3\u9891|\u97F3\u9891\u7F16\u7801",e),i=q(o,e),d=q("\u5904\u7406|\u8655\u7406|\u5730\u533A",e),u=q("\u5927\u5C0F",e);return console.log({category:a,videoType:s,videoCodec:r,audioCodec:n,resolution:i,processing:d,size:u}),{category:a,videoType:s,videoCodec:r,audioCodec:n,resolution:i,processing:d,size:u}},lt=e=>{let o=e.match(/\[quote\](.|\n)+?\[\/quote\]/g)??[],a="",s="";for(let r=0;re.replace(/\[(.+)\]?/g,"").replaceAll("\u200D",""),q=(e,o)=>{let a=`(${e}):\\s?([^\u4E00-\u9FA5]+)?`;e.match(/大小/)&&(a=`(${e}):\\s?((\\d|\\.)+\\s+(G|M|T|K)(i)?B)`),l.match(/KEEPFRDS|TJUPT|PTSBAO|PTHome|HDTime|BTSCHOOL/)&&e.match(/类型/)&&(a=`(${e}):\\s?([^\\s]+)?`),l==="PTer"&&e.match(/类型|地区/)&&(a=`(${e}):\\s?([^\\s]+)?`);let s=new RegExp(a),r=o.match(s,"i")?.[2];if(r)return r.replace(/\s/g,"").trim().toLowerCase()},mt=e=>e?(e=e.replace(/[.-]/g,"").toLowerCase(),e.match(/uhd|ultra/ig)?"uhdbluray":e.match(/remux/ig)?"remux":e.match(/blu/ig)?"bluray":e.match(/encode|x264|x265|bdrip|hdrip/ig)?"encode":e.match(/web/ig)?"web":e.match(/hdtv/ig)?"hdtv":e.match(/dvdr/ig)?"dvdrip":e.match(/dvd/ig)?"dvd":""):"",ut=e=>e?(e=e.replace(/[.-]/g,"").toLowerCase(),e.match(/movie|bd|ultra|电影/ig)?"movie":e.match(/tv|drama|剧集/ig)?"tv":e.match(/TVSeries/ig)?"tvPack":e.match(/综艺/ig)?"variety":e.match(/document|纪录|紀錄/ig)?"documentary":e.match(/sport|体育/ig)?"sport":e.match(/mv|演唱|concert/ig)?"concert":e.match(/anim|动(画|漫)/ig)?"cartoon":""):"",pt=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 G=_e;h?h.siteType==="NexusPHP"?G=we:l==="BeyondHD"?G=Ce:l==="HDBits"?G=Pe:l==="TTG"?G=Se:l==="Blutopia"&&(G=Ie):G=void 0;var Be=G;var oo=GM_addStyle(` .seed-dom h4{ text-align: center; margin: 0; @@ -138,24 +141,24 @@ #kdescr img{ max-width: 100%; } -`);var gt=e=>{let r=Object.keys(M).sort().map((c,l)=>{let{url:m,uploadPath:g}=M[c];return M[c].asTarget&&c!==d?`
  • - ${c} +`);var gt=e=>{let a=Object.keys(M).sort().map((i,d)=>{let{url:u,uploadPath:g}=M[i];return M[i].asTarget?`
  • + ${i} | -
  • `:""}),s=Object.keys(ee).map(c=>{let l=j(t.imdbUrl),m="",g=l||t.movieAkaName||t.movieName;return c==="TTG"&&l&&(g=g.replace("tt","imdb")),m=ee[c].replace("{imdbid}",g),m=m.replace("{searchArea}",l?"4":"0"),`
  • ${c} |
  • `}),a=h.needDoubanInfo?` + `:""}),s=Object.keys(Z).map(i=>{let d=j(t.imdbUrl),u="",g=d||t.movieAkaName||t.movieName;return i==="TTG"&&d&&(g=g.replace("tt","imdb")),u=Z[i].replace("{imdbid}",g),u=u.replace("{searchArea}",d?"4":"0"),`
  • ${i} |
  • `}),r=h.needDoubanInfo?`

    \u83B7\u53D6\u8C46\u74E3\u7B80\u4ECB

    -
    `:"",i=` + `:"",n=`

    \u4E00\u952E\u8F6C\u79CD

      - ${r.join("")} + ${a.join("")}
    - ${a} + ${r}

    \u8F6C\u7F29\u7565\u56FE

    @@ -173,11 +176,11 @@ ${s.join("")}
    - `;e.prepend(i)},ft=()=>{let e=$(".upload-section .upload-status"),o=t.screenshots.concat(t.comparisonImgs),r=o;if(r.length<1)throw new Error("\u83B7\u53D6\u56FE\u7247\u5217\u8868\u5931\u8D25");r=r.join(` -`);let s=$("#nsfw").is(":checked");e.text("\u8F6C\u6362\u4E2D..."),$("#img-transfer").attr("disabled",!0).addClass("is-disabled"),pe(r,s).then(a=>{if(a.length){let i=a.map(l=>`[url=${l.show_url}][img]${l.th_url}[/img][/url]`);t.screenshots=i.slice(0,t.screenshots.length);let{description:c}=t;o.forEach((l,m)=>{c.includes(l)&&(c=c.replace(`[img]${l}[/img]`,i[m]))}),t.description=c,e.text("\u8F6C\u6362\u6210\u529F\uFF01")}}).catch(a=>{e.text(a.message)}).finally(()=>{$("#img-transfer").removeAttr("disabled").removeClass("is-disabled")})},bt=()=>{let e=$(".page__title>a").attr("href");if(e&&e.match("movie.douban.com"))return t.doubanUrl=e,$e(),!1;let{imdbUrl:o,movieName:r}=t;ue(o,r).then(s=>{t.doubanUrl=s,$e()}).catch(s=>{throw new Error(s.message)})},$e=()=>{let{doubanUrl:e}=t,o=$(".douban-section .douban-status");try{e&&(o.text("\u83B7\u53D6\u4E2D..."),me(e).then(r=>{yt(r),o.text("\u83B7\u53D6\u6210\u529F")}).catch(r=>{throw new Error(r.message)}))}catch(r){o.text(r.message)}},yt=e=>{let o=e.format;t.doubanInfo=e.format,t.subtitle=ge(e);let r=o.match(/(产\s+地|国\s+家)\s+(.+)/)?.[2];r&&(t.area=E(r));let s=t.category;s==="movie"&&(o.match(/动画/)?s="cartoon":o.match(/纪录/)&&(s="documentary"),t.category=s)},vt=e=>{$("#imdb").val(e);let o=$('meta[name="csrf_token"]').attr("content");GM_xmlhttpRequest({method:"GET",url:`${h.url}/torrents/filter?imdb=${e}&_token=${o}&sorting=size&direction=desc`,onload(r){$("#facetedSearch").html(r.responseText)}})},re=location.hash&&location.hash.match(/(^|#)torrentInfo=([^#]*)(#|$)/),X=re&&re.length>0?re[2]:null;if(d){if(d==="Blutopia"){let e=L("imdb");e&&vt(e)}if(X&&h.asTarget&&(X=JSON.parse(decodeURIComponent(X)),Ce(X)),h.asSource&&!location.pathname.match(/upload/ig)){Ee(),console.log(t);let e=$(h.seedDomSelector);if(h.siteType==="NexusPHP"||d.match(/BeyondHD|TTG|Blutopia/)){let o=` + `;e.prepend(n)},ft=()=>{let e=$(".upload-section .upload-status"),o=t.screenshots.concat(t.comparisonImgs),a=o;if(a.length<1)throw new Error("\u83B7\u53D6\u56FE\u7247\u5217\u8868\u5931\u8D25");a=a.join(` +`);let s=$("#nsfw").is(":checked");e.text("\u8F6C\u6362\u4E2D..."),$("#img-transfer").attr("disabled",!0).addClass("is-disabled"),pe(a,s).then(r=>{if(r.length){let n=r.map(d=>`[url=${d.show_url}][img]${d.th_url}[/img][/url]`);t.screenshots=n.slice(0,t.screenshots.length);let{description:i}=t;o.forEach((d,u)=>{i.includes(d)&&(i=i.replace(`[img]${d}[/img]`,n[u]))}),t.description=i,e.text("\u8F6C\u6362\u6210\u529F\uFF01")}}).catch(r=>{e.text(r.message)}).finally(()=>{$("#img-transfer").removeAttr("disabled").removeClass("is-disabled")})},bt=()=>{let e=$(".page__title>a").attr("href");if(e&&e.match("movie.douban.com"))return t.doubanUrl=e,Ee(),!1;let{imdbUrl:o,movieName:a}=t;ue(o,a).then(s=>{t.doubanUrl=s,Ee()}).catch(s=>{throw new Error(s.message)})},Ee=()=>{let{doubanUrl:e}=t,o=$(".douban-section .douban-status");try{e&&(o.text("\u83B7\u53D6\u4E2D..."),me(e).then(a=>{yt(a),o.text("\u83B7\u53D6\u6210\u529F")}).catch(a=>{throw new Error(a.message)}))}catch(a){o.text(a.message)}},yt=e=>{let o=e.format;t.doubanInfo=e.format,t.subtitle=ge(e);let a=o.match(/(产\s+地|国\s+家)\s+(.+)/)?.[2];a&&(t.area=E(a));let s=t.category;s==="movie"&&(o.match(/动画/)?s="cartoon":o.match(/纪录/)&&(s="documentary"),t.category=s)},vt=e=>{$("#imdb").val(e);let o=$('meta[name="csrf_token"]').attr("content");GM_xmlhttpRequest({method:"GET",url:`${h.url}/torrents/filter?imdb=${e}&_token=${o}&sorting=size&direction=desc`,onload(a){$("#facetedSearch").html(a.responseText)}})},ae=location.hash&&location.hash.match(/(^|#)torrentInfo=([^#]*)(#|$)/),X=ae&&ae.length>0?ae[2]:null;if(l){if(l==="Blutopia"){let e=V("imdb");e&&vt(e)}if(X&&h.asTarget&&(X=JSON.parse(decodeURIComponent(X)),xe(X)),h.asSource&&!location.pathname.match(/upload/ig)){Be(),console.log(t);let e=$(h.seedDomSelector);if(h.siteType==="NexusPHP"||l.match(/BeyondHD|TTG|Blutopia/)){let o=` - `;e.after(o),e=$(".easy-seed-td")}if(d==="HDBits"){let o=` + `;e.after(o),e=$(".easy-seed-td")}if(l==="HDBits"){let o=` - `;e.after(o),e=$(".easy-seed-td")}if(d==="PTP"){let o=L("torrentid");e=$(`#torrent_${o} >td`)}gt(e),$(".site-list li>a").click(function(){let o=encodeURIComponent(JSON.stringify(t)),r=$(this).data("link");if(r.match(/lemonhd/)){let a={movie:"movie",tv:"tv",tvPack:"tv",variety:"tv",documentary:"doc",concert:"mv"}[t.category]||"movie";r=r.replace("upload_movie",`upload_${a}`)}r=r.replace(/(#torrentInfo=)(.+)/,`$1${o}`),window.open(r)}),$("#img-transfer")&&$("#img-transfer").click(()=>{ft()}),$("#douban-info")&&$("#douban-info").click(()=>{bt()})}}})(); + `;e.after(o),e=$(".easy-seed-td")}if(l==="PTP"){let o=V("torrentid");e=$(`#torrent_${o} >td`)}gt(e),$(".site-list li>a").click(function(){let o=encodeURIComponent(JSON.stringify(t)),a=$(this).data("link");if(a.match(/lemonhd/)){let r={movie:"movie",tv:"tv",tvPack:"tv",variety:"tv",documentary:"doc",concert:"mv"}[t.category]||"movie";a=a.replace("upload_movie",`upload_${r}`)}a=a.replace(/(#torrentInfo=)(.+)/,`$1${o}`),window.open(a)}),$("#img-transfer")&&$("#img-transfer").click(()=>{ft()}),$("#douban-info")&&$("#douban-info").click(()=>{bt()})}}})();