From 28172cfba6e1f551a828f78200075706e939559c Mon Sep 17 00:00:00 2001 From: soup Date: Sat, 4 May 2024 13:14:34 +0200 Subject: [PATCH] feat(indexers): add HD-Only (#1525) * feat(indexers): add HD-Only * fix optional captures * fix: remove accidental whitespace * feat(indexers): adapt hdonly regex for new announce format * feat(indexers): fix tests * feat(indexers): fix miscapturing of FL when no GROUP is announced --------- Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com> --- internal/indexer/definitions/hdonly.yaml | 124 +++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 internal/indexer/definitions/hdonly.yaml diff --git a/internal/indexer/definitions/hdonly.yaml b/internal/indexer/definitions/hdonly.yaml new file mode 100644 index 0000000..02cd24a --- /dev/null +++ b/internal/indexer/definitions/hdonly.yaml @@ -0,0 +1,124 @@ +--- +#id: hdonly +name: HD-Only +identifier: hdonly +description: HD-Only (HD-O) is a FRENCH Private Torrent Tracker for HD MOVIES / TV +language: fr +urls: + - https://hd-only.org/ +privacy: private +protocol: torrent +supports: + - irc + - rss +# source: gazelle +settings: + - name: torrent_pass + type: secret + required: true + label: Torrent pass + help: Right click DL on a torrent and get the torrent_pass. + +irc: + network: HD-Only + server: irc.hd-only.org + port: 6697 + tls: true + channels: + - "#announce" + announcers: + - HD-Bot + settings: + - name: nick + type: text + required: true + label: Nick + help: Bot nick. Must be like username|bot + + - name: auth.account + type: text + required: false + label: NickServ Account + help: NickServ account. Make sure to group your user and bot. + + - name: auth.password + type: secret + required: false + label: NickServ Password + help: NickServ password + + - name: invite_command + type: secret + default: "HD-Bot enter #announce USERNAME IRCKEY" + required: true + label: Invite command + help: Invite auth with HD-Bot. Replace USERNAME and IRCKEY. + + parse: + type: single + lines: + - tests: + - line: "Movie Title [2002] [Film] - WEB / AVC / 1080p / VO / stFR / VFI - Movie.Title.2002.1080p.WEB.H264 - https://hd-only.org/torrents.php?torrentid=00000 / https://hd-only.org/torrents.php?action=download&id=00000 - Aventure, Fantastique" + expect: + title: "Movie Title" + year: 2002 + category: Film + releaseTags: "WEB / AVC / 1080p / VO / stFR / VFI" + freeleech: "" + releaseGroup: "" + torrentName: "Movie.Title.2002.1080p.WEB.H264" + baseUrl: https://hd-only.org/ + torrentId: "00000" + tags: Aventure, Fantastique + - line: "Movie Title [2002] [Film] - WEB / AVC / 1080p / VO / stFR / VFI - FL - Movie.Title.2002.1080p.WEB.H264 - https://hd-only.org/torrents.php?torrentid=00000 / https://hd-only.org/torrents.php?action=download&id=00000 - Aventure, Fantastique" + expect: + title: "Movie Title" + year: 2002 + category: Film + releaseTags: "WEB / AVC / 1080p / VO / stFR / VFI" + freeleech: "FL" + releaseGroup: "" + torrentName: "Movie.Title.2002.1080p.WEB.H264" + baseUrl: https://hd-only.org/ + torrentId: "00000" + tags: Aventure, Fantastique + - line: "Movie Title [2002] [Film] - WEB / AVC / 1080p / VO / stFR / VFI / Scene - GROUP - Movie.Title.2002.1080p.WEB.H264-GROUP - https://hd-only.org/torrents.php?torrentid=00000 / https://hd-only.org/torrents.php?action=download&id=00000 - Aventure, Fantastique" + expect: + title: "Movie Title" + year: 2002 + category: Film + releaseTags: "WEB / AVC / 1080p / VO / stFR / VFI / Scene" + freeleech: "" + releaseGroup: "GROUP" + torrentName: "Movie.Title.2002.1080p.WEB.H264-GROUP" + baseUrl: https://hd-only.org/ + torrentId: "00000" + tags: Aventure, Fantastique + - line: "Movie Title [2002] [Film] - WEB / AVC / 1080p / VO / stFR / VFI / Scene - FL - GROUP - Movie.Title.2002.1080p.WEB.H264-GROUP - https://hd-only.org/torrents.php?torrentid=00000 / https://hd-only.org/torrents.php?action=download&id=00000 - Aventure, Fantastique" + expect: + title: "Movie Title" + year: 2002 + category: Film + releaseTags: "WEB / AVC / 1080p / VO / stFR / VFI / Scene" + freeleech: "FL" + releaseGroup: "GROUP" + torrentName: "Movie.Title.2002.1080p.WEB.H264-GROUP" + baseUrl: https://hd-only.org/ + torrentId: "00000" + tags: Aventure, Fantastique + pattern: '(.*?) \[(\d{4})\] \[(.*?)\] - (.*?)(?: - (FL))?(?: - (.*?))? - (.*?) - (https:\/\/hd-only\.org\/).*torrentid=(\d+).* - (.*)' + vars: + - title + - year + - category + - releaseTags + - freeleech + - releaseGroup + - torrentName + - baseUrl + - torrentId + - tags + + match: + infourl: "/torrents.php?torrentid={{ .torrentId }}" + torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&torrent_pass={{ .torrent_pass }}"