From facb5b25e5376dbf4a7c2f88f97b65665d4e6936 Mon Sep 17 00:00:00 2001 From: Kyle Henfrey Date: Wed, 3 Apr 2024 12:30:36 +0100 Subject: [PATCH] feat(indexers): Nyaa add trusted, remake and batch tags (#1482) * add trusted/remake/batch tags * add tags as empty string to expect --- internal/indexer/definitions/nyaa.yaml | 29 ++++++++++++++++++-------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/internal/indexer/definitions/nyaa.yaml b/internal/indexer/definitions/nyaa.yaml index e32c495..829e189 100644 --- a/internal/indexer/definitions/nyaa.yaml +++ b/internal/indexer/definitions/nyaa.yaml @@ -44,28 +44,39 @@ irc: type: single lines: - tests: - - line: '[Live Action - Raw] - 見て、お母さん、私は日本語が書けます! - (220.30MiB) - https://nyaa.si/view/000000/torrent' + - line: "[Live Action - Raw] - 見て、お母さん、私は日本語が書けます! - (220.30MiB) - https://nyaa.si/view/000000/torrent" expect: category: Live Action - Raw - torrentName: '見て、お母さん、私は日本語が書けます!' + torrentName: "見て、お母さん、私は日本語が書けます!" torrentSize: 220.30MiB baseUrl: https://nyaa.si/ - torrentId: '000000' - - - line: '[Anime - English-translated] - [GROUP] Woah [1080p BD AV1] - (3.60GiB) - https://nyaa.si/view/000001/torrent' + torrentId: "000000" + tags: "" + - line: "[Anime - English-translated] - [GROUP] Woah [1080p BD AV1] - (3.60GiB) - https://nyaa.si/view/000001/torrent" expect: - category: Anime - English-translated - torrentName: '[GROUP] Woah [1080p BD AV1]' + category: Anime - English-translated + torrentName: "[GROUP] Woah [1080p BD AV1]" torrentSize: 3.60GiB baseUrl: https://nyaa.si/ - torrentId: '000001' - pattern: '\[(.*)\] - (.*) - \((\d+\.?\d*[KMGTP]?iB)\) - (https?:\/\/.*\/)view\/(\d+)\/torrent' + torrentId: "000001" + tags: "" + - line: "[Anime - English-translated] - [GROUP] Woah [1080p x265] - (123.23GiB) - https://nyaa.si/view/000002/torrent trusted" + expect: + category: Anime - English-translated + torrentName: "[GROUP] Woah [1080p x265]" + torrentSize: 123.23GiB + baseUrl: https://nyaa.si/ + torrentId: "000002" + tags: trusted + + pattern: '\[(.*)\] - (.*) - \((\d+\.?\d*[KMGTP]?iB)\) - (https?:\/\/.*\/)view\/(\d+)\/torrent\s*(trusted|remake|batch)?' vars: - category - torrentName - torrentSize - baseUrl - torrentId + - tags match: infourl: "/view/{{ .torrentId }}"