// ==UserScript==
// @name easy-seed PT一键转种
// @namespace https://github.com/techmovie/easy-seed
// @version 1.0.5
// @description easy seeding for different trackers
// @author birdplane
// @require https://cdn.bootcss.com/jquery/1.7.1/jquery.min.js
// @match https://passthepopcorn.me/torrents.php?id=*
// @match http://*/details.php?id=*
// @match https://*/details.php?id=*
// @match https://totheglory.im/t/*
// @match https://beyond-hd.me/torrents/*
// @match https://lemonhd.org/upload_*
// @match https://lemonhd.org/details*
// @match https://blutopia.xyz/torrents/*
// @match https://blutopia.xyz/torrents?imdb=*
// @match https://blutopia.xyz/upload/*
// @match https://*/upload*
// @match http://*/upload*
// @match http://www.hd.ai/Torrents.upload
// @match https://broadcity.in/browse.php?imdb=*
// @grant GM_addStyle
// @grant GM_xmlhttpRequest
// ==/UserScript==
(()=>{var M={Bdc:{url:"https://broadcity.in",host:"broadcity.in",siteType:"Bdc",asSource:!1,asTarget:!1,uploadPath:"/upload.php"},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(3)",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:"2",vc1:"3",xvid:"",dvd:"4"}},audioCodec:{selector:'select[name="audiocodec_sel"]',map:{aac:"5",ac3:"4",dd:"4","dd+":"4",flac:"7",dts:"3",truehd:"2",lpcm:"6",dtshdma:"1",atmos:"3",dtsx:"3"}},videoType:{selector:'select[name="medium_sel"]',map:{uhdbluray:"1",bluray:"1",remux:"4",encode:"6",web:"7",hdtv:"5",dvd:"3",dvdrip:"10",other:""}},resolution:{selector:'select[name="standard_sel"]',map:{"2160p":"1","1080p":"2","1080i":"3","720p":"4","576p":"5","480p":"5"}},area:{selector:'select[name="source_sel"]',map:{CN:"1",US:"9",EU:"9",HK:"2",TW:"2",JP:"10",KR:"10",OT:"3"}}},HDHome:{url:"https://hdhome.org",host:"hdhome.org",siteType:"NexusPHP",asSource:!0,asTarget:!0,uploadPath:"/upload.php",searchPath:"/torrents.php",seedDomSelector:"#top+font>table:nth-child(1)>tbody>tr:nth-child(4)",searchKey:"search",searchParam:{search_area:"{key}",sort:"5",type:"desc"},name:{selector:"#name"},subtitle:{selector:'input[name="small_descr"]'},description:{selector:"#descr"},imdb:{selector:'input[name="url"][type="text"]'},douban:{selector:'input[name="douban_id"]'},anonymous:{selector:'input[name="uplver"]'},tags:{chineseAudio:"#tag_gy",DIY:"#tag_diy",cantoneseAudio:"#tag_yy",chineseSubtitle:"#tag_zz",HDR:"#tag_hdr10","HDR10+":"#tag_hdrm",DolbyVision:"#tag_db"},category:{selector:"#browsecat",map:{movie:["411","412","413","414","415","450","499","416"],tv:["425","426","471","427","428","429","430","452","431"],tvPack:["432","433","434","435","436","437","438","502"],documentary:["417","418","419","420","421","451","500","422"],concert:"441",sport:["442","443"],cartoon:["444","445","446","447","448","454","449","501"],variety:[]}},videoCodec:{selector:'select[name="codec_sel"]',map:{h264:"1",hevc:"12",x264:"1",x265:"2",h265:"2",mpeg2:"4",mpeg4:["5","412","418","426","433","445"],vc1:"3",xvid:"5",dvd:"5"}},source:{selector:'select[name="source_sel"]',map:{uhdbluray:"9",bluray:"1",hdtv:"4",dvd:"3",web:"7",vhs:"8",hddvd:"8"}},audioCodec:{selector:'select[name="audiocodec_sel"]',map:{aac:"6",ac3:"15",dd:"15","dd+":"15",dts:"3",truehd:"13",lpcm:"14",dtshdma:"11",atmos:"12",dtsx:"17"}},videoType:{selector:'select[name="medium_sel"]',map:{uhdbluray:["10","499","500","502","501"],bluray:["1","450","451","452","453","454"],remux:["3","415","421","430","437","448"],encode:["7","411","412","413","414","416","417","418","419","420","422","425","426","471","427","428","429","431","432","433","434","435","436","438","444","445","446","447","449"],web:["11","411","412","413","414","416","417","418","419","420","422","425","426","471","427","429","431","432","433","434","436","438","444","445","446","447","449"],hdtv:["5","412","413","416","418","419","422","424","426","471","427","428","431","433","434","435","438","442","443","445","446","449"],dvd:["","411","417","425","432","444"],dvdrip:["7","411","417","425","432","444"],other:""}},resolution:{selector:'select[name="standard_sel"]',map:{"2160p":["1","499","416","500","422","431","438","502","449","501"],"1080p":["2","414","420","429","436","447"],"1080i":["3","424","428","435","443"],"720p":["4","413","419","423","427","434","442","446"],"576p":["5","411","417","425","432","444"],"480p":["5","411","417","425","432","444"]}}},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(3)",searchKey:"search",searchParam:{search_area:"{key}",sort:"5",type:"desc"},name:{selector:"#name"},subtitle:{selector:'input[name="small_descr"]'},description:{selector:"#descr"},imdb:{selector:'input[name="url"][type="text"]'},douban:{selector:'input[name="douban_id"]'},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(3)",uploadPath:"/upload.php",searchPath:"/torrents.php",searchKey:"search",searchParam:{search_area:"{key}",sort:"5",type:"desc"},name:{selector:"#name"},subtitle:{selector:'input[name="small_descr"]'},description:{selector:"#descr"},imdb:{selector:'input[name="url"][type="text"]'},anonymous:{selector:'input[name="uplver"]'},category:{selector:"#browsecat",map:{movie:"622",tv:"623",tvPack:"623",documentary:"404",concert:"626",sport:"627",cartoon:"627",variety:"627"}},videoCodec:{selector:'select[name="codec_sel"]',map:{h264:"1",x264:"7",hevc:"8",x265:"6",h265:"8",mpeg2:"4",mpeg4:"1",vc1:"2",xvid:"3",dvd:"4"}},audioCodec:{selector:'select[name="audiocodec_sel"]',map:{aac:"6",ac3:"4",dd:"4","dd+":"4",flac:"1",dts:"3",truehd:"9",lpcm:"10",dtshdma:"8",atmos:"8",dtsx:"3"}},videoType:{selector:'select[name="medium_sel"]',map:{uhdbluray:"10",bluray:"1",remux:"5",encode:"11",web:"9",hdtv:"6",dvd:"7",dvdrip:"4",other:"0"}},resolution:{selector:'select[name="standard_sel"]',map:{"2160p":"5","1080p":"1","1080i":"2","720p":"3","576p":"4","480p":"4"}}},HDDolby:{url:"https://www.hddolby.com",host:"www.hddolby.com",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(3)",uploadPath:"/upload.php",searchPath:"/torrents.php",searchKey:"search",searchParam:{search_area:"{key}",sort:"5",type:"desc"},name:{selector:"#name"},subtitle:{selector:'input[name="small_descr"]'},description:{selector:"#descr"},imdb:{selector:'input[name="url"][type="text"]'},douban:{selector:'input[name="douban_id"]'},tags:{chineseAudio:"#tag_gy",DIY:"#tag_diy",chineseSubtitle:"#tag_zz",cantoneseAudio:"#tag_yy",HDR:"#tag_hdr10","HDR10+":"#tag_hdrm",DolbyVision:"#tag_db"},anonymous:{selector:'input[name="uplver"]'},category:{selector:"#browsecat",map:{movie:"401",tv:"402",tvPack:"402",documentary:"404",concert:"406",sport:"407",cartoon:"405",variety:"403"}},videoCodec:{selector:'select[name="codec_sel"]',map:{h264:"1",x264:"3",hevc:"2",x265:"4",h265:"2",mpeg2:"6",mpeg4:"0",vc1:"5",xvid:"0",dvd:"0"}},videoType:{selector:'select[name="medium_sel"]',map:{uhdbluray:"1",bluray:"2",remux:"3",encode:"10",web:"6",hdtv:"5",dvd:"8",dvdrip:"8",other:"0"}},resolution:{selector:'select[name="standard_sel"]',map:{"2160p":"1","1080p":"2","1080i":"3","720p":"4","576p":"5","480p":"5"}}},HDArea:{url:"https://www.hdarea.co",host:"www.hdarea.co",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(3)",uploadPath:"/upload.php",searchPath:"/torrents.php",searchKey:"search",searchParam:{search_area:"{key}",sort:"5",type:"desc"},name:{selector:"#name"},subtitle:{selector:'input[name="small_descr"]'},description:{selector:"#descr"},imdb:{selector:'input[name="url"][type="text"]'},douban:{selector:'input[name="dburl"]'},anonymous:{selector:'input[name="uplver"]'},category:{selector:"#browsecat",map:{movie:["300","401","415","416","410","411","414","412","413","417"],tv:["402","403"],tvPack:"402",documentary:"404",concert:"406",sport:"407",cartoon:"405",variety:"403"}},videoCodec:{selector:'select[name="codec_sel"]',map:{h264:"7",x264:"7",hevc:"6",x265:"6",h265:"6",mpeg2:"4",mpeg4:"1",vc1:"2",xvid:"0",dvd:"0"}},audioCodec:{selector:'select[name="audiocodec_sel"]',map:{aac:"6",ac3:"11",dd:"5","dd+":"4",flac:"1",dts:"3",truehd:"7",lpcm:"8",dtshdma:"4",atmos:"10",dtsx:"0"}},videoType:{selector:'select[name="medium_sel"]',map:{uhdbluray:["1","300"],bluray:["1","401"],remux:["3","415"],encode:"7",web:["9","412"],hdtv:["5","413"],dvd:["2","414"],dvdrip:"6",other:"0"}},resolution:{selector:'select[name="standard_sel"]',map:{"2160p":"5","1080p":["1","410"],"1080i":"2","720p":["3","411"],"576p":"4","480p":"4"}}},BTSCHOOL:{url:"https://pt.btschool.club",host:"pt.btschool.club",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(3)",uploadPath:"/upload.php",searchPath:"/torrents.php",searchKey:"search",searchParam:{search_area:"{key}",sort:"5",type:"desc"},name:{selector:"#name"},subtitle:{selector:'input[name="small_descr"]'},description:{selector:"#descr"},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(3)",uploadPath:"/upload.php",searchPath:"/torrents.php",searchKey:"search",searchParam:{search_area:"{key}",sort:"5",type:"desc"},name:{selector:"#name"},subtitle:{selector:'input[name="small_descr"]'},description:{selector:"#descr"},anonymous:{selector:'input[name="uplver"]'},category:{selector:"#browsecat",map:{movie:"401",tv:"402",tvPack:"402",documentary:"404",concert:"406",sport:"407",cartoon:"405",variety:"403"}},videoCodec:{selector:'select[name="codec_sel"]',map:{h264:"1",hevc:"14",x264:"16",x265:"14",h265:"14",mpeg2:"18",mpeg4:"18",vc1:"2",xvid:"3",dvd:"18"}},audioCodec:{selector:'select[name="audiocodec_sel"]',map:{aac:"6",ac3:"2",dd:"2","dd+":"2",flac:"7",dts:"4",truehd:"3",lpcm:"11",dtshdma:"1",atmos:"17",dtsx:"16"}},videoType:{selector:'select[name="medium_sel"]',map:{uhdbluray:"11",bluray:"1",remux:"3",encode:"7",web:"10",hddvd:"2",hdtv:"5",dvd:"6",dvdrip:"6",other:"0"}},resolution:{selector:'select[name="standard_sel"]',map:{"2160p":"5","1080p":"1","1080i":"2","720p":"3","576p":"4","480p":"4"}},area:{selector:'select[name="processing_sel"]',map:{CN:"1",US:"2",EU:"2",HK:"3",TW:"3",JP:"4",KR:"5",IND:"6",SEA:"8",OT:"7"}}},HDAtmos:{url:"https://hdatmos.club",host:"hdatmos.club",siteType:"NexusPHP",asSource:!1,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(3)",uploadPath:"/upload.php",searchPath:"/torrents.php",searchKey:"search",searchParam:{search_area:"{key}",sort:"5",type:"desc"},name:{selector:"#name"},subtitle:{selector:'input[name="small_descr"]'},description:{selector:'textarea[name="descr"]'},imdb:{selector:'input[name="url"][type="text"]'},category:{selector:"#browsecat",map:{movie:"401",tv:"402",tvPack:"402",documentary:"404",cartoon:"405",sport:"407",concert:"406"}},videoCodec:{selector:'select[name="codec_sel"]',map:{h264:"1",hevc:"10",h265:"10",x264:"1",x265:"10",mpeg2:"4",mpeg4:"1",vc1:"2",xvid:"3"}},audioCodec:{selector:'select[name="audiocodec_sel"]',map:{aac:"20",ac3:"22",dd:"23","dd+":"23",flac:"17",dts:"14",truehd:"13",lpcm:"15",dtshdma:"10",atmos:"11",dtsx:"12"}},videoType:{selector:'select[name="medium_sel"]',map:{uhdbluray:"1",bluray:"1",remux:"3",encode:"7",web:"10",hdtv:"5",dvd:"6",hddvd:"2",dvdrip:"13",other:"13"}},resolution:{selector:'select[name="standard_sel"]',map:{"4320p":"15","2160p":"10","1080p":"11","1080i":"12","720p":"13","576p":"14","480p":"14"}},area:{selector:'select[name="processing_sel"]',map:{CN:"3",US:"4",EU:"8",HK:"5",TW:"3",JP:"5",KR:"6",OT:"9"}},source:{selector:'select[name="source_sel"]',map:{uhdbluray:"6",bluray:"6",hdtv:"3",dvd:"8",web:"2",vhs:"12",hddvd:"7"}}},TLF:{url:"https://pt.eastgame.org",host:"eastgame.org",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(3)",uploadPath:"/upload.php",searchPath:"/torrents.php",searchKey:"search",searchParam:{search_area:"{key}",sort:"5",type:"desc"},name:{selector:"#name"},subtitle:{selector:'input[name="small_descr"]'},description:{selector:'textarea[name="descr"]'},imdb:{selector:'input[name="url"][type="text"]'},douban:{selector:'input[name="douban_url"]'},category:{selector:"#browsecat",map:{movie:"438",tv:"440",tvPack:"440",documentary:"443",cartoon:"442",sport:"444",concert:"445",variety:"441"}},videoCodec:{selector:'select[name="codec_sel"]',map:{h264:"1",hevc:"6",h265:"6",x264:"1",x265:"6",mpeg2:"4",mpeg4:"0",vc1:"2",xvid:"3"}},audioCodec:{selector:'select[name="audiocodec_sel"]',map:{aac:"6",ac3:"9",dd:"9","dd+":"9",flac:"1",dts:"10",truehd:"14",lpcm:"12",dtshdma:"11",atmos:"13",dtsx:"10"}},videoType:{selector:'select[name="medium_sel"]',map:{uhdbluray:"10",bluray:"1",remux:"3",encode:"7",web:"4",hdtv:"5",dvd:"6",hddvd:"1",dvdrip:"6",other:"9"}},resolution:{selector:'select[name="standard_sel"]',map:{"2160p":"6","1080p":"1","1080i":"2","720p":"3","576p":"4","480p":"4"}},area:{selector:'select[name="processing_sel"]',map:{CN:"1",US:"2",EU:"2",HK:"3",TW:"3",JP:"4",KR:"5",OT:"6"}}},DISCFAN:{url:"https://discfan.net",host:"discfan.net",siteType:"NexusPHP",asSource:!0,asTarget:!0,seedDomSelector:"#top+table>tbody>tr:nth-child(3)",uploadPath:"/upload.php",searchPath:"/torrents.php",searchKey:"search",searchParam:{search_area:"{key}",sort:"5",type:"desc"},name:{selector:"#name"},subtitle:{selector:'input[name="small_descr"]'},description:{selector:'textarea[name="descr"]'},imdb:{selector:'input[name="url"][type="text"]'},douban:{selector:'input[name="douban_url"]'},category:{selector:"#browsecat1",map:{tv:"411",tvPack:"411",documentary:"413",cartoon:"419",sport:"417",concert:"414",variety:"416"}},videoType:{selector:'select[name="source_sel"]',map:{uhdbluray:"2",bluray:"3",remux:"0",encode:"0",web:"9",hdtv:"1",dvd:"4",hddvd:"4",dvdrip:"10",other:"0"}},area:{selector:"#browsecat",map:{CN:"401",US:"410",EU:"410",HK:"404",TW:"405",JP:"403",KR:"406"}}},HDAI:{url:"http://www.hd.ai",host:"hd.ai",siteType:"NexusPHP",asSource:!0,asTarget:!0,uploadPath:"/Torrents.upload",searchPath:"/torrents.php",seedDomSelector:"#top+table>tbody>tr:nth-child(3)",searchKey:"search",searchParam:{search_area:"{key}",sort:"5",type:"desc"},name:{selector:"#name"},subtitle:{selector:'input[name="small_descr"]'},description:{selector:"#descr"},imdb:{selector:'input[name="url"][type="text"]'},mediaInfo:{selector:'textarea[name="nfo"]'},screenshots:{selector:'textarea[name="screenshot"]'},tags:{chineseAudio:'input[type="checkbox"][name="tag[cn]"]',chineseSubtitle:'input[type="checkbox"][name="tag[zz]"]'},category:{selector:'select[name="type"]',map:{movie:"1",tv:"2",tvPack:"2",documentary:"4",concert:"6",sport:"7",cartoon:"5",variety:"3"}},videoCodec:{selector:'select[name="codec_sel"]',map:{h264:"2",hevc:"1",x264:"2",x265:"1",h265:"1",mpeg2:"5",mpeg4:"2",vc1:"3",xvid:"4",dvd:"5"}},audioCodec:{selector:'select[name="audiocodec_sel"]',map:{aac:"10",ac3:"11",dd:"11","dd+":"11",flac:"7",dts:"5",truehd:"4",lpcm:"6",dtshdma:"2",atmos:"3",dtsx:"1"}},videoType:{selector:'select[name="medium_sel"]',map:{uhdbluray:"1",bluray:"2",remux:"3",encode:"5",web:"4",hdtv:"6",dvd:"7",dvdrip:"10",other:"0"}},resolution:{selector:'select[name="standard_sel"]',map:{"4320p":"1","2160p":"2","1080p":"3","1080i":"4","720p":"5","576p":"6","480p":"6"}},area:{selector:'select[name="source_sel"]',map:{CN:"1",US:"2",EU:"2",HK:"3",TW:"3",JP:"4",KR:"5",OT:"6"}}}};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://kp.m-team.cc/torrents.php?incldead=0&spstate=0&inclbookmarked=0&search={imdbid}&search_area={searchArea}&search_mode=0",TTG:"https://totheglory.im/browse.php?search_field={imdbid}&c=M&sort=5&type=desc",CHD:"https://chdbits.co/torrents.php?incldead=0&spstate=0&inclbookmarked=0&search={imdbid}&search_area=4&search_mode=0",BHD:"https://beyond-hd.me/torrents/all?doSearch=Search&imdb={imdbid}&sorting=size&direction=desc",BLU:"https://blutopia.xyz/torrents?imdb={imdbid}",SSD:"https://springsunday.net/torrents.php?incldead=0&spstate=0&inclbookmarked=0&search={imdbid}&search_area={searchArea}&search_mode=0",HDT:"https://hd-torrents.org/torrents.php?search={imdbid}&active=0&options=2&order=size&by=DESC",KG:"https://karagarga.in/browse.php?search={imdbid}&search_type=imdb",FL:"https://filelist.io/browse.php?search={imdbid}&cat=0&searchin=3&sort=3","nzb.in":"https://nzbs.in/search/{imdbid}?t=-1&ob=size_desc",Bdc:"https://broadcity.in/browse.php?imdb={imdbid}"};var se="https://omit.mkrobot.org/movie/infos",ce="https://media.pttool.workers.dev",ie="https://api.themoviedb.org",ne="3d62cb1443c6b34b61262ab332aaf78c",$e=e=>{let o="";try{return Object.keys(M).forEach(a=>{let s=M[a].host,r=new RegExp(s,"i");s&&e.match(r)&&(o=a)}),o}catch(a){a.message!=="end loop"&&console.log(a)}};var 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"],l=$e(location.host),h=M[l];var k=e=>e.replace(/(?<!(([^\d]+\d{1})|([^\w]+H)))(\.)/ig," ").replace(/\.(?!(\d+))/," ").trim(),le=e=>new Promise((o,a)=>{try{if(e)GM_xmlhttpRequest({method:"GET",url:`${ce}?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)}}),me=(e,o)=>new Promise((a,s)=>{try{let r=" https://movie.douban.com/subject/",n=W(e);n&&GM_xmlhttpRequest({method:"GET",url:`${se}/${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")}})}catch(r){s(r.message)}}),ue=(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)}}),A=(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},z=e=>{let o=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),a=location.search.substr(1).match(o);return a?unescape(a[2]):""},q=e=>e?(e=e.replace(/:|-|\s/g,""),e.match(/atoms/i)?"atoms":e.match(/dtshdma/i)?"dtshdma":e.match(/dtsx/i)?"dtsx":e.match(/dts/i)?"dts":e.match(/truehd/i)?"truehd":e.match(/lpcm/i)?"lpcm":e.match(/flac/i)?"flac":e.match(/aac/i)?"aac":e.match(/DD\+|DDP|DolbyDigitalPlus/i)?"dd+":e.match(/DD|DolbyDigital/i)?"dd":e.match(/ac3/i)?"ac3":""):"",Q=e=>(e=e.replace(/\.|-/g,""),e.match(/x264/i)?"x264":e.match(/h264|AVC/i)?"h264":e.match(/x265/i)?"x265":e.match(/hevc|h265/i)?"hevc":e.match(/vc-?1/i)?"vc1":e.match(/mpeg-?2/i)?"mpeg2":e.match(/mpeg-?4/i)?"mpeg4":""),Y=e=>{let 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",he=e=>{let o=e.trans_title.join("/"),{director:a=[]}=e,s=a.map(d=>pe(d.name)),r=e.cast.slice(0,2).map(d=>pe(d.name)),n=s.length>0?`|\u5BFC\u6F14: ${s.join(" ")}`:"",i=r.length>0?`|\u4E3B\u6F14:${r.join(" ")}`:"";return o+n+i},pe=e=>e.replace(/\s+[A-Za-z\s]+/,""),N=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"},ge=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"},fe=e=>{try{return new Promise((o,a)=>{GM_xmlhttpRequest({method:"GET",url:`${ie}/3/find/${e}?api_key=${ne}&language=en&external_source=imdb_id`,onload(s){let r=JSON.parse(s.responseText),n=r.movie_results&&r.movie_results.length>0,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)}},W=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")),p=C("Complete name",a).replace(/\.avi|\.mkv|\.mp4|\.ts/i,""),g=F(C("File size",a)),{videoCodec:c,isHdr:u,isDV:m}=He(s,a,r),{audioCodec:f,channelName:y,languageArray:D}=ke(n,i),T=d.map(v=>C("Language",v)),_=be(f,y,D,T,u,m),P=Ne(s);return{fileName:p,fileSize:g,videoCodec:c,audioCodec:f,resolution:P,mediaTags:_}},C=(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]:""},Ne=e=>{let o=parseInt(C("Height",e).replace(/\s/g,"")),a=parseInt(C("Width",e).replace(/\s/g,"")),s=C("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}`},be=(e,o,a,s,r,n)=>{let i=a.includes("Chinese"),d=s.includes("Chinese"),p={};return i&&(p.chineseAudio=!0),a.includes("Cantonese")&&(p.cantoneseAudio=!0),d&&(p.chineseSubtitle=!0),r&&(r.match(/HDR10\+/i)?p["HDR10+"]=!0:p.HDR=!0),n&&(p.DolbyVision=!0),e.match(/dtsx|atmos/ig)&&(p[e]=!0),p},He=(e,o,a)=>{let s=C("Format",o),r=C("Format",e),n=C("Format version",e),i=C("Codec ID",e),d=C("HDR format",e),p=a.length>0&&C("HDR format",a[0]).includes("Dolby Vision"),g=!!C("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:p}},ke=(e,o=[])=>{let a=C("Format",e),s=C("Channel(s)",e),r=C("Commercial name",e),n=[e,...o].map(g=>C("Language",g)),i="",d="",p=parseInt(s);return p&&p>=6?i=`${p-1}.1`:i=`${p}.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),p=e.match(/Disc\s*Size:\s*((\d|,| )+)bytes/)?.[1]?.replaceAll(",",""),g=!e.match(/PLAYLIST REPORT/i),c=ee(a,2),[u="",m=""]=c,f=u.match(/2160/)?"hevc":"h264",y=u.match(/\/\s*HDR(\d)*(\+)*\s*\//i)?.[0],D=!!m.match(/\/\s*Dolby\s*Vision\s*/i),T=ee(d,2),_=ee(n,3),P=u.match(/\d{3,4}(p|i)/)?.[0],{audioCodec:v="",channelName:b="",languageArray:x=[]}=Ae(T,g),I=_.map(E=>{let K=E.match(/(\w+)\s*\//)?.[1],L=E.match(/Graphics\s*(\w+)\s*(\d|\.)+\s*kbps/i)?.[1];return g?K:L}),H=be(v,b,x,I,y,D);return{fileSize:p,videoCodec:f,audioCodec:v,resolution:P,mediaTags:H}},ee=(e,o)=>e?.[o]?.split(`
`).filter(a=>!!a)??[],Ae=(e,o)=>{if(e.length<1)return{};let a=e.sort((c,u)=>{let m=parseInt(c.match(/\/\s*(\d+)\s*kbps/i)?.[1]);return parseInt(u.match(/\/\s*(\d+)\s*kbps/i)?.[1])-m}),[s,r]=a,n=q(s),i=q(r),d=n,p=s.match(/\d\.\d/)?.[0];n==="lpcm"&&i==="dtshdma"&&(d=i,p=s.match(/\d\.\d/)?.[0]);let g=a.map(c=>{let u=c.match(/(\w+)\s*\//)?.[1],m=c.match(/Audio\s*(\w+)\s*\d+\s*kbps/)?.[1];return o?u:m});return{audioCodec:d,channelName:p,languageArray:g}},Re=({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 ye(e).replace(/\[quote\]((.|\n)*?)\[\/quote\]/g,function(a,s){return s&&s.match(/温馨提示|郑重|PT站|网上搜集|本种子|商业盈利|带宽|寬帶|法律责任|Quote:|正版|商用|转载|注明|后果|负责/)?"":a})},Ue=e=>(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),e&&e.length===4?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""),ve=e=>/rgba?/.test(e)?Ue(e):e,ye=e=>{let o=[],a=[],s=[],r=Re.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":{r(`
`,`
`);break}case"BR":{r(`
`);break}case"SPAN":{r(null,null);break}case"BLOCKQUOTE":case"PRE":case"FIELDSET":{let{tagName:c,className:u}=e;if(c==="BLOCKQUOTE"&&l==="PTP"&&u.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:u}=e,m=e.getAttribute("data-src")||e.getAttribute("data-echo");if(m)c=m.match(/(http(s)?:)?\/\//)?m:location.origin+"/"+m;else if(u&&!u.match(/ico_\w+.gif|jinzhuan/))c=u;else return"";return`[img]${c}[/img]`}case"FONT":{let{color:c}=e;c&&r(`[color=${ve(c)}]`,"[/color]");break}case"A":{let{href:c,textContent:u}=e;if(c&&c.length>0){if(c.match(/javascript:void/))return"";if(l==="PTP"&&u.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:p,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]"),p==="underline"&&r("[u]","[/u]"),g&&g.trim()!==""&&r(`[color=${ve(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=ye(n);d&&o.push(d)}),a.concat(o).concat(s).join("")},R=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 De=e=>{console.log(e),l==="PTSBAO"&&localStorage.getItem("autosave")&&localStorage.removeItem("autosave");let o=W(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})/,(u,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:u}=e,m=c;l==="TTG"&&(m+=`[${u}]`),$(h.name.selector).val(m)}Fe(),["subtitle","douban","area","audioCodec"].forEach(c=>{let u=h[c];if(u&&u.selector){let m=e[c];c==="douban"?m=e.doubanUrl:(c==="area"||c==="audioCodec")&&(m=u.map[e[c]]),$(u.selector).val(m)}});let n=e.mediaInfo,i="";if(e.description)if(i=e.description,te(h.siteType)&&l!=="SSD"){let{doubanInfo:c}=e;c&&(i=c+i)}else{let{sourceSiteType:c}=e;te(c)&&(i=Me(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)),l==="HDAI"){$(h.imdb.selector).val(e.doubanUrl||e.imdbUrl),$(h.screenshots.selector).val(s.join(`
`)),a&&$('input[type="checkbox"][name="tag[o]"]').attr("checked",!0);let c=(e.description+e.doubanInfo).match(/\[img\](http.+?poster.+?)\[\/img\]/);c&&c[1]&&$('input[name="poster"]').val(c[1])}if($(h.description.selector).val(Oe(e)+i.trim()),l.match(/BeyondHD|Blutopia/)){let c=l==="Blutopia"?o.replace("tt",""):o;if($(h.imdb.selector).val(c),fe(o).then(u=>{$(h.tmdb.selector).val(u)}),l==="BeyondHD"){let{category:u,videoType:m}=e;if(e.category=m,e.videoType=u,a){let f=ge(e.size);m==="uhdbluray"&&f==="BD50"&&(f="uhd50"),e.category=f}}}let d=h.category.map[e.category],p=["videoCodec","videoType","resolution","source","area"],g=[];if(Array.isArray(d)?(g=[...d],p.forEach(c=>{g=Te(h,e,c,g),g.length===1&&$(h.category.selector).val(g[0])})):[...p,"category"].forEach(c=>{Te(h,e,c,g)}),l.match(/HDHome|PTHome/i)&&$(h.category.selector).change(),h.anonymous){let{selector:c,value:u=""}=h.anonymous;u?$(c).val(u):$(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:u,videoType:m,category:f}=e,y=f.match(/tv/);m==="remux"&&(u==="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")}},Te=(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},Fe=()=>{let e=h.name.selector;if(e.match(/^#\w+/)){let o=$(e).clone().attr("name","").hide();$(e).attr("id","").after(o)}},Me=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},Oe=e=>{let o=te(h.siteType),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=>e.match(/NexusPHP|TTG/);var xe=()=>{let e=z("torrentid");if(!e)return!1;t.sourceSite=l,t.sourceSiteType=h.siteType;let o=$(`#torrent_${e}`),a=$(".page__title").text().match(/]?([^[]+)/)[1]?.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:p}=Le(o);if(d){let V=[];Object.keys(d).forEach(J=>{V=V.concat(d[J]),i=i.replace(J+":",""),i+=`
[b]`+J+`:[/b]
`+d[J].map(re=>`[img]${re}[/img]`).join("")}),t.comparisonImgs=V}t.description=i;let g=n.find("#PermaLinkedTorrentToggler").text().replace(/ /g,"").split("/"),[c,u,m,...f]=g,y=f.includes("Remux");t.videoType=m==="WEB"?"web":ze(u,y,c,m);let D=U(i),T=t.videoType.match(/bluray/i),_=T?B:w,P=T?D:t.mediaInfo,{videoCodec:v,audioCodec:b,fileName:x="",resolution:I,mediaTags:H}=_(P);t.videoCodec=v,t.audioCodec=b,t.resolution=I,t.tags=H;let E=x||n.data("releasename");E=k(E),t.title=E,t.source=Ve(m,c,I),t.size=n.find(".nobr span").attr("title").replace(/[^\d]/g,""),t.screenshots=p;let K=[],L=$("#movieinfo div").text().match(/Country:\s+([^\n]+)/);return L&&L.length>0&&(K=L?.[1].replace(/(,)\s+/g,"$1").split(",")),t.area=N(K?.[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]},Le=()=>{let e=[],o={},a=$(".movie-page__torrent__panel"),s=a.find("a:contains(Show comparison)");for(let n=0;n<s.length;n++){let i=s[n].getAttribute("onclick");if(i&&i.match(/BBCode.ScreenshotComparisonToggleShow/))try{let d=i.match(/\((.+)\)/)?.[1]??"",[p="null",g="null"]=d.match(/\[.+?\]/g),c=JSON.parse(p)?.join(",")??"",u=JSON.parse(g);o[c]=u}catch(d){o=null}}let r=a.find(".bbcode__image");for(let n=0;n<r.length;n++)e.push(r[n].getAttribute("src"));return{screenshots:e,comparisonData:o}},Ve=(e,o,a)=>o.match(/BD100|BD66/i)||e.match(/Blu-ray/i)&&a.match(/2160P|4K/i)?"uhdbluray":e.replace(/-/g,"").toLowerCase(),ze=(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 _e=()=>{t.sourceSite=l,t.sourceSiteType=h.siteType;let{Category:e,Name:o,Source:a,Type:s,Size:r}=qe();t.size=F(r),t.title=k(o);let n=R(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 p=$(".panel-heading:contains(Description)").next(".panel-body").find(".forced-nfo"),g=S(p[0]);t.description=g;let{category:c,countries:u,imdbUrl:m}=Ge();t.movieName=d;let f=e.toLowerCase().replace(/s/,"");f=c==="Animation"?"cartoon":f,t.category=A(t,f),t.source=Je(a,s),t.area=N(u),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:P,resolution:v,mediaTags:b}=T(D);return t.videoCodec=_,t.audioCodec=P,t.resolution=v,t.tags={...n,...b},t.imdbUrl=m,t.screenshots=je(),t},qe=()=>{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},Ge=()=>{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)??[],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=z("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}=Ye(),d=$("h1").eq(0).text();t.title=k(d);let p=R(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=A(t,n),t.source=O(t.title),t.videoType=i;let u=t.videoType.match(/bluray/i),m=u?B:w,f=U(s);if(!u)t.bdinfo=f,Qe(e).then(y=>{if(y){t.mediaInfo=y;let{videoCodec:D,audioCodec:T,resolution:_,mediaTags:P}=m(t.mediaInfo);t.videoCodec=D,t.audioCodec=T,t.resolution=_,t.tags={...p,...P}}});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={...p,..._}}t.size=r,t.screenshots=Xe(a)},Ye=()=>{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]}},Qe=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)}})}),Xe=e=>t.description.match(/\[url=.+?\]\[img\].+?\[\/img\]\[\/url]/g)??[];var Ce=()=>{t.sourceSite=l,t.sourceSiteType=h.siteType;let e=$("#main_table h1").eq(0).text(),o=e.match(/[^[]+/)?.[0];t.title=k(o),t.subtitle=e.replace(o,"").replace(/\[|\]/g,"");let a=R(t.subtitle+t.title),s=oe("\u7C7B\u578B").text(),{category:r,area:n,videoType:i}=Ze(s);t.area=n,t.videoType=ot(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 p=oe("\u5C3A\u5BF8").text().match(/\(((\d|,)+)\s*字节\)/i)?.[1];t.size=p.replaceAll(",","");let g=t.videoType.match(/bluray/i),c=g?B:w;window.onload=()=>{let u=$("#kt_d"),m=S(u[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=N(D)),r?t.category=A(t,r):t.category=at(m);let{bdinfo:T,mediaInfo:_}=et(m),P=g?T:_;if(P){t.mediaInfo=P;let{videoCodec:v,audioCodec:b,resolution:x,mediaTags:I}=c(P);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=q(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=q(b))}}t.screenshots=tt(m),console.log(t)}},Ze=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}},et=e=>{let o=e.match(/\[quote\](.|\n)+?\[\/quote\]/g),a="",s="";for(let r=0;r<o.length;r++){let n=rt(o[r]);n.match(/Disc\s?Size|\.mpls/i)&&(a+=n),n.match(/Unique ID/i)&&(s+=n)}return a||(a=U(e)),{bdinfo:a,mediaInfo:s}},rt=e=>e.replace(/\[(.+)\]?/g,"").replaceAll("\u200D",""),tt=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)},ot=(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: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 Se=()=>{t.sourceSite=l,t.sourceSiteType=h.siteType;let{Category:e,Name:o,Type:a,Size:s,Resolution:r}=st();t.size=F(s),t.title=k(o);let n=R(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 p=$(".panel-heading:contains(Description)+div .panel-body"),g=S(p[0]);t.description=g;let c=$(".movie-details a:contains(IMDB)").attr("href");t.imdbUrl=c,t.movieName=d;let u=ct(e);t.category=A(t,u),t.source=O(t.title),t.videoType=it(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:P,mediaTags:v}=D(T);return t.mediaInfo=T,t.videoCodec=_,t.audioCodec=P,t.tags={...n,...v},t.screenshots=t.description.match(/\[url=.+?\]\[img\].+?\[\/img\]\[\/url]/g)??[],t},st=()=>{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},ct=e=>({Movie:"movie","TV Show":"tv"})[e],it=(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 Ie=()=>{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]),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.replace(/\n{2,}/g,`
`),r===""||r===void 0){let H=S($(".torrent-extra-text-container .extra-text")?.[0]);H=H?`
[quote]${H}[/quote]
`:"";let E=$(".screenshot").find("img"),K=[];E&&E.each((re,Ee)=>{K.push(`[img]${$(Ee).attr("src").trim()}[/img]`)});let L=K.join(""),V=$("section[data-group='mediainfo'] .codemain").text(),J=`
[quote]${V}[/quote]
`;t.mediaInfo=V,r=H+J+L}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:p,audioCodec:g,resolution:c,processing:u,size:m}=nt(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,!u||u.match(/raw/)){let b=r.match(/(产\s+地|国\s+家)】?\s*(.+)/)?.[2];b&&(t.area=N(b))}else t.area=N(u);let D=A(t,mt(i||r));t.category=D,t.videoType=lt(d||t.title),t.source=O(t.title),t.size=m?F(m):"",t.screenshots=Y(r),t.tags=R(t.subtitle);let T=t.videoType.match(/bluray/i),{bdinfo:_,mediaInfo:P}=dt(r),v=T?_:t.mediaInfo||P;if(v){t.mediaInfo=v;let b=T?B:w,{videoCodec:x,audioCodec:I,resolution:H,mediaTags:E}=b(v);t.videoCodec=x,t.audioCodec=I,t.resolution=H,t.tags={...t.tags,...E}}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(p||t.title);t.resolution=ut(c||t.title),t.audioCodec=q(g||t.title)}},nt=e=>{let o="\u5206\u8FA8\u7387|\u89E3\u6790\u5EA6|\u683C\u5F0F",a="\u5A92\u4ECB|\u6765\u6E90|\u8D28\u91CF";l==="SSD"&&(o="\u5206\u8FA8\u7387|\u89E3\u6790\u5EA6",a="\u683C\u5F0F"),l.match(/TLF|HDAI/i)&&(a="\u5A92\u4ECB");let s=G("\u7C7B\u578B|\u5206\u7C7B|\u985E\u5225",e),r=G(a,e),n=G("\u7F16\u7801|\u7DE8\u78BC",e),i=G("\u97F3\u9891|\u97F3\u9891\u7F16\u7801",e),d=G(o,e),p=G("\u5904\u7406|\u8655\u7406|\u5730\u533A",e),g=G("\u5927\u5C0F",e);return console.log({category:s,videoType:r,videoCodec:n,audioCodec:i,resolution:d,processing:p,size:g}),{category:s,videoType:r,videoCodec:n,audioCodec:i,resolution:d,processing:p,size:g}},dt=e=>{let o=e.match(/\[quote\](.|\n)+?\[\/quote\]/g)??[],a="",s="";for(let r=0;r<o.length;r++){let n=pt(o[r]);n.match(/Disc\s?Size|\.mpls/i)&&(a+=n),n.match(/Unique ID/i)&&(s+=n)}return a||(a=U(e)),{bdinfo:a,mediaInfo:s}},pt=e=>e.replace(/\[(.+)\]?/g,"").replaceAll("\u200D",""),G=(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|TLF|HDAI/)&&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()},lt=e=>e?(e=e.replace(/[.-]/g,"").toLowerCase(),e.match(/encode|x264|x265|bdrip|hdrip/ig)?"encode":e.match(/remux/ig)?"remux":e.match(/uhd|ultra/ig)?"uhdbluray":e.match(/blu/ig)?"bluray":e.match(/webdl/ig)?"web":e.match(/hdtv/ig)?"hdtv":e.match(/dvdr/ig)?"dvdrip":e.match(/dvd/ig)?"dvd":""):"",mt=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":""):"",ut=e=>(e=e===void 0?"":e.toLowerCase(),e.match(/4k|2160|UHD/ig)?"2160p":e.match(/1080(p)?/ig)?"1080p":e.match(/1080i/ig)?"1080i":e.match(/720(p)?/ig)?"720p":e.match(/sd/ig)?"480p":e);var j=xe;h?h.siteType==="NexusPHP"?j=Ie:l==="BeyondHD"?j=_e:l==="HDBits"?j=Pe:l==="TTG"?j=Ce:l==="Blutopia"&&(j=Se):j=void 0;var we=j;var oo=GM_addStyle(`
.seed-dom h4{
text-align: center;
margin: 0;
font-size: 14px;
font-weight: 500;
margin-bottom: 15px;
}
.site-list,.search-list{
margin: 0;
padding: 0;
list-style: none;
display: flex;
justify-content: center;
margin-bottom: 15px;
flex-wrap: wrap;
}
.seed-dom li,.search-list li {
margin-top: 0;
margin-bottom: 0;
margin-left: 0;
margin-right: 5px;
line-height: 24px;
}
.seed-dom li:last-child span{
display: none;
}
.search-list li:last-child span{
display: none;
}
.seed-dom li a{
font-weight: 600;
}
.seed-dom .function-list{
display: flex;
justify-content: space-around;
}
.upload-section,.douban-section{
display: flex;
justify-content: center;
margin-bottom: 15px;
align-items: center;
}
.upload-section .upload-status,.douban-section .douban-status{
margin-left: 5px;
font-size: 14px;
font-weight: 600;
}
#img-transfer,#douban-info{
line-height: 1;
white-space: nowrap;
cursor: pointer;
background: #fff;
border: 1px solid #dcdfe6;
color: #606266;
-webkit-appearance: none;
text-align: center;
box-sizing: border-box;
outline: none;
transition: .1s;
font-weight: 500;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
padding: 8px 20px;
font-size: 14px;
border-radius: 4px;
margin:0;
margin-right: 5px;
}
#img-transfer:hover,#douban-info:hover {
background: #fff;
border-color: #409eff;
color: #409eff
}
#img-transfer.is-disabled, #img-transfer.is-disabled:hover,#douban-info.is-disabled, #douban-info.is-disabled:hover {
color: #c0c4cc;
cursor: not-allowed;
background-image: none;
background-color: #fff;
border-color: #ebeef5;
}
.upload-section #nsfw{
margin-left: 0;
position: static;
}
.upload-section label{
padding-left: 0;
}
#kdescr img{
max-width: 100%;
}
`);var ht=e=>{let a=Object.keys(M).sort().map((i,d)=>{let{url:p,uploadPath:g}=M[i];return M[i].asTarget?`<li>
<a href="javascript:void(0);" data-link="${p}${g}#torrentInfo=null">${i} </a>
<span>|</span>
</li>`:""}),s=Object.keys(Z).map(i=>{let d=W(t.imdbUrl),p="",{movieAkaName:g,movieName:c}=t,u=d||g||c;return i==="TTG"&&d&&(u=u.replace("tt","imdb")),i==="nzb.in"&&(g||c)&&(u=g||c),p=Z[i].replace("{imdbid}",u),p=p.replace("{searchArea}",d?"4":"0"),`<li><a href="${p}" target="_blank">${i}</a> <span>|</span></li>`}),r=h.needDoubanInfo?`
<div class="function-list-item">
<h4>\u83B7\u53D6\u8C46\u74E3\u7B80\u4ECB</h4>
<div class="douban-section">
<button id="douban-info">\u5F00\u59CB\u83B7\u53D6</button>
<div class="douban-status"></div>
</div>
</div>`:"",n=`
<div class="seed-dom movie-page__torrent__panel">
<h4>\u4E00\u952E\u8F6C\u79CD</h4>
<ul class="site-list">
${a.join("")}
</ul>
<section class="function-list">
${r}
<div class="function-list-item">
<h4>\u8F6C\u7F29\u7565\u56FE</h4>
<div class="upload-section">
<button id="img-transfer">\u5F00\u59CB\u8F6C\u6362</button>
<div class="checkbox">
<input type="checkbox" id="nsfw">
<label for="nsfw">\u662F\u5426\u5305\u542BNSFW</label>
</div>
<div class="upload-status"></div>
</div>
</div>
</section>
<h4>\u5FEB\u901F\u68C0\u7D22</h4>
<ul class="search-list">
${s.join("")}
</ul>
</div>
`;e.prepend(n)},gt=()=>{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"),ue(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,p)=>{i.includes(d)&&(i=i.replace(`[img]${d}[/img]`,n[p]))}),t.description=i,e.text("\u8F6C\u6362\u6210\u529F\uFF01")}}).catch(r=>{e.text(r.message)}).finally(()=>{$("#img-transfer").removeAttr("disabled").removeClass("is-disabled")})},ft=()=>{let e=$(".page__title>a").attr("href");if(e&&e.match("movie.douban.com"))return t.doubanUrl=e,Be(),!1;let{imdbUrl:o,movieName:a}=t;me(o,a).then(s=>{t.doubanUrl=s,Be()}).catch(s=>{throw new Error(s.message)})},Be=()=>{let{doubanUrl:e}=t,o=$(".douban-section .douban-status");try{e&&(o.text("\u83B7\u53D6\u4E2D..."),le(e).then(a=>{bt(a),o.text("\u83B7\u53D6\u6210\u529F")}).catch(a=>{throw new Error(a.message)}))}catch(a){o.text(a.message)}},bt=e=>{let o=e.format;t.doubanInfo=e.format,t.subtitle=he(e);let a=o.match(/(产\s+地|国\s+家)\s+(.+)/)?.[2];a&&(t.area=N(a));let s=t.category;s==="movie"&&(o.match(/动画/)?s="cartoon":o.match(/纪录/)&&(s="documentary"),t.category=s)},yt=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)}})},vt=()=>{let e=z("imdb");e&&(l==="Blutopia"?yt(e):l==="Bdc"&&($("#tsstac").val(e),$("#search_type").val("t_genre")))},ae=location.hash&&location.hash.match(/(^|#)torrentInfo=([^#]*)(#|$)/),X=ae&&ae.length>0?ae[2]:null;if(l&&(vt(),X&&h.asTarget&&(X=JSON.parse(decodeURIComponent(X)),De(X)),h.asSource&&!location.pathname.match(/upload/ig))){we(),console.log(t);let e=$(h.seedDomSelector);if(h.siteType==="NexusPHP"||l.match(/BeyondHD|TTG|Blutopia/)){let o=`<tr>
<td class="rowhead nowrap">
</td>
<td class="rowfollow easy-seed-td"></td>
</tr>`;e.after(o),e=$(".easy-seed-td")}if(l==="HDBits"){let o=`<tr>
<td class="rowfollow easy-seed-td"></td>
</tr>`;e.after(o),e=$(".easy-seed-td")}if(l==="PTP"){let o=z("torrentid");e=$(`#torrent_${o} >td`)}ht(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}`)}if(l==="TTG"&&!t.description){alert("\u8BF7\u7B49\u5F85\u9875\u9762\u52A0\u8F7D\u5B8C\u6210");return}a=a.replace(/(#torrentInfo=)(.+)/,`$1${o}`),window.open(a)}),$("#img-transfer")&&$("#img-transfer").click(()=>{gt()}),$("#douban-info")&&$("#douban-info").click(()=>{ft()})}})();