diff --git a/Find Unique Titles/config/userscript.config.ts b/Find Unique Titles/config/userscript.config.ts index 60bf757..be92b46 100644 --- a/Find Unique Titles/config/userscript.config.ts +++ b/Find Unique Titles/config/userscript.config.ts @@ -28,40 +28,41 @@ export const UserScriptConfig: IWebpackUserScript = { namespace: "http://tampermonkey.net/", author: "Mea01", match: [ - "https://cinemageddon.net/browse.php*", - "https://karagarga.in/browse.php*", - "https://hdbits.org/browse.php*", - "https://passthepopcorn.me/torrents.php*", - "https://passthepopcorn.me/torrents.php?type=seeding", - "https://beyond-hd.me/library/*", - "https://beyond-hd.me/torrents*", - "https://cinemaz.to/movies*", + "https://aither.cc/torrents?*", "https://avistaz.to/movies*", + "https://beyond-hd.me/torrents*", + "https://beyond-hd.me/library/*", "https://blutopia.cc/torrents?*", - "https://aither.cc/torrents?*", - "https://www.torrentleech.org/torrents/browse*", - "https://secret-cinema.pw/torrents.php*", - "https://www.clan-sudamerica.net/invision/*", - "https://newinsane.info/browse.php*", "https://btarg.com.ar/tracker/browse.php*", + "https://js.chddiy.xyz/torrents.php*", + "https://ptchdbits.co/torrents.php*", + "https://cinemageddon.net/browse.php*", + "https://www.cinematik.net/browse.php*", + "https://cinemaz.to/movies*", "https://filelist.io/browse.php*", - "https://jptv.club/torrents*", + "https://www.clan-sudamerica.net/invision/*", + "https://greatposterwall.com/torrents.php*", + "https://hdbits.org/browse.php*", + "https://hdsky.me/torrents.php*", "https://hd-torrents.org/torrents.php*", "https://iptorrents.com/t*", + "https://jpopsuki.eu/torrents.php*", + "https://jptv.club/torrents*", + "https://karagarga.in/browse.php*", "https://kp.m-team.cc/*", + "https://lat-team.com/torrents*", + "https://www.morethantv.me/torrents/browse*", "https://ncore.pro/torrents.php*", - "https://greatposterwall.com/torrents.php*", - "https://ptchdbits.co/torrents.php*", - "https://js.chddiy.xyz/torrents.php*", - "https://hdsky.me/torrents.php*", - "https://www.cinematik.net/browse.php*", + "https://newinsane.info/browse.php*", + "https://passthepopcorn.me/torrents.php*", + "https://passthepopcorn.me/torrents.php?type=seeding", "https://pterclub.com/torrents.php*", + "https://secret-cinema.pw/torrents.php*", + "https://tntracker.org/*", + "https://www.torrentleech.org/torrents/browse*", "https://pterc.com/torrents.php*", "https://torrentseeds.org/torrents*", "https://torrentseeds.org/categories/*", - "https://www.morethantv.me/torrents/browse*", - "https://jpopsuki.eu/torrents.php*", - "https://tntracker.org/*", ], require: [ `https://cdn.jsdelivr.net/npm/jquery@${pkg.dependencies.jquery}/dist/jquery.min.js`, diff --git a/Find Unique Titles/dist/find.unique.titles.user.js b/Find Unique Titles/dist/find.unique.titles.user.js index de9f58d..9ec569c 100644 --- a/Find Unique Titles/dist/find.unique.titles.user.js +++ b/Find Unique Titles/dist/find.unique.titles.user.js @@ -37,6 +37,7 @@ // @match https://www.morethantv.me/torrents/browse* // @match https://jpopsuki.eu/torrents.php* // @match https://tntracker.org/* +// @match https://lat-team.com/torrents* // @downloadURL https://github.com/Moreasan/trackers-userscripts/blob/master/Find%20Unique%20Titles/dist/find.unique.titles.user.js // @grant GM.xmlHttpRequest // @grant GM.setValue @@ -2582,69 +2583,74 @@ try { __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, { - Aither: () => _Aither__WEBPACK_IMPORTED_MODULE_18__.default, - AvistaZ: () => _AvistaZ__WEBPACK_IMPORTED_MODULE_12__.default, - BHD: () => _BHD__WEBPACK_IMPORTED_MODULE_7__.default, - BLU: () => _BLU__WEBPACK_IMPORTED_MODULE_8__.default, - BTarg: () => _BTarg__WEBPACK_IMPORTED_MODULE_10__.default, - CG: () => _CG__WEBPACK_IMPORTED_MODULE_4__.default, - CHD: () => _CHD__WEBPACK_IMPORTED_MODULE_21__.default, - CLANSUD: () => _CLAN_SUD__WEBPACK_IMPORTED_MODULE_2__.default, - CinemaZ: () => _CinemaZ__WEBPACK_IMPORTED_MODULE_11__.default, - FL: () => _FL__WEBPACK_IMPORTED_MODULE_14__.default, - GPW: () => _GPW__WEBPACK_IMPORTED_MODULE_15__.default, - HDB: () => _HDB__WEBPACK_IMPORTED_MODULE_16__.default, - HDSky: () => _HDSky__WEBPACK_IMPORTED_MODULE_22__.default, - HDT: () => _HDT__WEBPACK_IMPORTED_MODULE_5__.default, - IPT: () => _IPT__WEBPACK_IMPORTED_MODULE_6__.default, - JPTV: () => _JPTV__WEBPACK_IMPORTED_MODULE_13__.default, - JPop: () => _JPop__WEBPACK_IMPORTED_MODULE_27__.default, - KG: () => _KG__WEBPACK_IMPORTED_MODULE_3__.default, - MTV: () => _MTV__WEBPACK_IMPORTED_MODULE_26__.default, - MTeam: () => _MTeam__WEBPACK_IMPORTED_MODULE_19__.default, - NewInsane: () => _NewInsane__WEBPACK_IMPORTED_MODULE_9__.default, - PTP: () => _PTP__WEBPACK_IMPORTED_MODULE_0__.default, - Pter: () => _Pter__WEBPACK_IMPORTED_MODULE_24__.default, - RED: () => _RED__WEBPACK_IMPORTED_MODULE_28__.default, - SC: () => _SC__WEBPACK_IMPORTED_MODULE_1__.default, - TL: () => _TL__WEBPACK_IMPORTED_MODULE_17__.default, + Aither: () => _Aither__WEBPACK_IMPORTED_MODULE_1__.default, + AvistaZ: () => _AvistaZ__WEBPACK_IMPORTED_MODULE_2__.default, + BHD: () => _BHD__WEBPACK_IMPORTED_MODULE_3__.default, + BLU: () => _BLU__WEBPACK_IMPORTED_MODULE_4__.default, + BTarg: () => _BTarg__WEBPACK_IMPORTED_MODULE_5__.default, + CG: () => _CG__WEBPACK_IMPORTED_MODULE_6__.default, + CHD: () => _CHD__WEBPACK_IMPORTED_MODULE_7__.default, + CLANSUD: () => _CLAN_SUD__WEBPACK_IMPORTED_MODULE_8__.default, + CinemaZ: () => _CinemaZ__WEBPACK_IMPORTED_MODULE_9__.default, + FL: () => _FL__WEBPACK_IMPORTED_MODULE_10__.default, + GPW: () => _GPW__WEBPACK_IMPORTED_MODULE_11__.default, + HDB: () => _HDB__WEBPACK_IMPORTED_MODULE_12__.default, + HDSky: () => _HDSky__WEBPACK_IMPORTED_MODULE_13__.default, + HDT: () => _HDT__WEBPACK_IMPORTED_MODULE_14__.default, + IPT: () => _IPT__WEBPACK_IMPORTED_MODULE_15__.default, + JPTV: () => _JPTV__WEBPACK_IMPORTED_MODULE_16__.default, + JPop: () => _JPop__WEBPACK_IMPORTED_MODULE_17__.default, + KG: () => _KG__WEBPACK_IMPORTED_MODULE_18__.default, + MTV: () => _MTV__WEBPACK_IMPORTED_MODULE_19__.default, + MTeam: () => _MTeam__WEBPACK_IMPORTED_MODULE_20__.default, + NewInsane: () => _NewInsane__WEBPACK_IMPORTED_MODULE_22__.default, + PTP: () => _PTP__WEBPACK_IMPORTED_MODULE_24__.default, + Pter: () => _Pter__WEBPACK_IMPORTED_MODULE_23__.default, + RED: () => _RED__WEBPACK_IMPORTED_MODULE_25__.default, + SC: () => _SC__WEBPACK_IMPORTED_MODULE_26__.default, + TL: () => _TL__WEBPACK_IMPORTED_MODULE_28__.default, TNT: () => _TNT__WEBPACK_IMPORTED_MODULE_29__.default, - TSeeds: () => _TSeeds__WEBPACK_IMPORTED_MODULE_25__.default, - TiK: () => _TiK__WEBPACK_IMPORTED_MODULE_23__.default, - nCore: () => _nCore__WEBPACK_IMPORTED_MODULE_20__.default + TSeeds: () => _TSeeds__WEBPACK_IMPORTED_MODULE_30__.default, + TiK: () => _TiK__WEBPACK_IMPORTED_MODULE_27__.default, + nCore: () => _nCore__WEBPACK_IMPORTED_MODULE_21__.default }); - var _Aither__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("./src/trackers/Aither.ts"); - var _AvistaZ__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("./src/trackers/AvistaZ.ts"); - var _BHD__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("./src/trackers/BHD.ts"); - var _BLU__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("./src/trackers/BLU.ts"); - var _BTarg__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("./src/trackers/BTarg.ts"); - var _CG__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./src/trackers/CG.ts"); - var _CHD__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__("./src/trackers/CHD.ts"); - var _CLAN_SUD__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./src/trackers/CLAN-SUD.ts"); - var _CinemaZ__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("./src/trackers/CinemaZ.ts"); - var _FL__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("./src/trackers/FL.ts"); - var _GPW__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("./src/trackers/GPW.ts"); - var _HDB__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("./src/trackers/HDB.ts"); - var _HDSky__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__("./src/trackers/HDSky.ts"); - var _HDT__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./src/trackers/HDT.ts"); - var _IPT__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("./src/trackers/IPT.ts"); - var _JPTV__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("./src/trackers/JPTV.ts"); - var _JPop__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__("./src/trackers/JPop.ts"); - var _KG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./src/trackers/KG.ts"); - var _MTV__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__("./src/trackers/MTV.ts"); - var _MTeam__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("./src/trackers/MTeam.ts"); - var _NewInsane__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("./src/trackers/NewInsane.ts"); - var _PTP__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./src/trackers/PTP.ts"); - var _Pter__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__("./src/trackers/Pter.ts"); - var _RED__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__("./src/trackers/RED.ts"); - var _SC__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./src/trackers/SC.ts"); - var _TL__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("./src/trackers/TL.ts"); + var _Aither__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./src/trackers/Aither.ts"); + var _AvistaZ__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./src/trackers/AvistaZ.ts"); + var _BHD__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./src/trackers/BHD.ts"); + var _BLU__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./src/trackers/BLU.ts"); + var _BTarg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./src/trackers/BTarg.ts"); + var _CG__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("./src/trackers/CG.ts"); + var _CHD__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("./src/trackers/CHD.ts"); + var _CLAN_SUD__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("./src/trackers/CLAN-SUD.ts"); + var _CinemaZ__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("./src/trackers/CinemaZ.ts"); + var _FL__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("./src/trackers/FL.ts"); + var _GPW__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("./src/trackers/GPW.ts"); + var _HDB__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("./src/trackers/HDB.ts"); + var _HDSky__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("./src/trackers/HDSky.ts"); + var _HDT__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("./src/trackers/HDT.ts"); + var _IPT__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("./src/trackers/IPT.ts"); + var _JPTV__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("./src/trackers/JPTV.ts"); + var _JPop__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("./src/trackers/JPop.ts"); + var _KG__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("./src/trackers/KG.ts"); + Object(function webpackMissingModule() { + var e = new Error("Cannot find module './LatTeam.js'"); + e.code = "MODULE_NOT_FOUND"; + throw e; + }()); + var _MTV__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("./src/trackers/MTV.ts"); + var _MTeam__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__("./src/trackers/MTeam.ts"); + var _NewInsane__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__("./src/trackers/NewInsane.ts"); + var _PTP__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__("./src/trackers/PTP.ts"); + var _Pter__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__("./src/trackers/Pter.ts"); + var _RED__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__("./src/trackers/RED.ts"); + var _SC__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__("./src/trackers/SC.ts"); + var _TL__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__("./src/trackers/TL.ts"); var _TNT__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__("./src/trackers/TNT.ts"); - var _TSeeds__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__("./src/trackers/TSeeds.ts"); - var _TiK__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__("./src/trackers/TiK.ts"); - var _nCore__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__("./src/trackers/nCore.ts"); - var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([ _PTP__WEBPACK_IMPORTED_MODULE_0__ ]); - _PTP__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0]; + var _TSeeds__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__("./src/trackers/TSeeds.ts"); + var _TiK__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__("./src/trackers/TiK.ts"); + var _nCore__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__("./src/trackers/nCore.ts"); + var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([ _PTP__WEBPACK_IMPORTED_MODULE_24__ ]); + _PTP__WEBPACK_IMPORTED_MODULE_24__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0]; __webpack_async_result__(); } catch (e) { __webpack_async_result__(e); diff --git a/Find Unique Titles/src/trackers/LatTeam.ts b/Find Unique Titles/src/trackers/LatTeam.ts new file mode 100644 index 0000000..c0b85ba --- /dev/null +++ b/Find Unique Titles/src/trackers/LatTeam.ts @@ -0,0 +1,93 @@ +import { + parseCodec, + parseResolution, + parseSize, + parseTags, + parseYearAndTitle, +} from "../utils/utils"; +import { Category, MetaData, Request, SearchResult, tracker } from "./tracker"; +import { addChild } from "common/dom"; + +const parseCategory = (element: Element) => { + const icon = element.querySelector(".torrent-search--list__category i"); + if (!icon) return Category.OTHER; + if (icon?.classList.contains("fa-film")) return Category.MOVIE; + if (icon?.classList.contains("fa-tv-retro")) return Category.TV; + + return Category.OTHER; +}; +export default class LatTeam implements tracker { + canBeUsedAsSource(): boolean { + return true; + } + + canBeUsedAsTarget(): boolean { + return false; + } + + canRun(url: string): boolean { + return url.includes("lat-team.com"); + } + + async *getSearchRequest(): AsyncGenerator { + const rows = document.querySelectorAll( + ".torrent-search--list__results tbody tr" + ); + let elements = Array.from(rows); + yield { + total: elements.length, + }; + for (let element of elements) { + const imdbId = element.getAttribute("data-imdb-id"); + let fullTitle = element + .querySelector("a.torrent-search--list__name") + ?.textContent?.trim(); + const { title, year } = parseYearAndTitle(fullTitle); + const size = parseSize( + element + .querySelector(".torrent-search--list__size") + ?.textContent?.trim() + ); + const tags = parseTags(fullTitle); + const category = parseCategory(element); + const resolution = parseResolution( + element + .querySelector(".torrent-search--list__resolution") + ?.textContent?.trim() + ); + + const request: Request = { + torrents: [ + { + dom: element, + size, + tags, + resolution, + container: parseCodec(fullTitle), + }, + ], + dom: [element], + imdbId, + title, + year, + category, + }; + yield request; + } + } + + name(): string { + return "LatTeam"; + } + + insertTrackersSelect(select: HTMLElement): void { + select.classList.add("form__select"); + select.style.width = "180px"; + addChild( + document.querySelector( + ".panelV2.torrent-search__results .panel__actions" + ) as HTMLElement, + select + ); + } +} diff --git a/Find Unique Titles/src/trackers/index.ts b/Find Unique Titles/src/trackers/index.ts index 5a91522..146afd3 100644 --- a/Find Unique Titles/src/trackers/index.ts +++ b/Find Unique Titles/src/trackers/index.ts @@ -16,6 +16,7 @@ import IPT from "./IPT"; import JPTV from "./JPTV"; import JPop from "./JPop"; import KG from "./KG"; +import LatTeam from "./LatTeam.js"; import MTV from "./MTV"; import MTeam from "./MTeam"; import NewInsane from "./NewInsane"; @@ -30,34 +31,35 @@ import TiK from "./TiK"; import nCore from "./nCore"; export { - PTP, - SC, - CLANSUD, - KG, - CG, - HDT, - IPT, + Aither, + AvistaZ, BHD, BLU, - NewInsane, BTarg, + CG, + CHD, + CLANSUD, CinemaZ, - AvistaZ, - JPTV, FL, GPW, HDB, - TL, - Aither, + HDSky, + HDT, + IPT, + JPTV, + JPop, + KG, + LatTeam, + MTV, MTeam, nCore, - CHD, - HDSky, - TiK, + NewInsane, Pter, - TSeeds, - MTV, - JPop, + PTP, RED, + SC, + TiK, + TL, TNT, + TSeeds, }; diff --git a/Find Unique Titles/src/utils/utils.ts b/Find Unique Titles/src/utils/utils.ts index 858d4d8..35b7bcc 100644 --- a/Find Unique Titles/src/utils/utils.ts +++ b/Find Unique Titles/src/utils/utils.ts @@ -35,7 +35,7 @@ export const parseImdbId = (text: string) => { return results[0]; }; -export const parseResolution = (text: string): Resolution | undefined => { +export const parseResolution = (text: string|undefined): Resolution | undefined => { if (!text) return undefined; const resolutionsAndAliases: Record = { SD: ["sd", "pal", "ntsc"],