feat(indexers): DigitalCore include size (#2094)

* feat(indexers): DigitalCore include size

* fix: missing double quotes

* fix: regex

* fix(indexers): properly escape in regex pattern with double quotes

* fix(indexers): simplify regex pattern and avoid double quotes with excessive escapes

* fix(indexers): add EOF

---------

Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
This commit is contained in:
ze0s 2025-06-10 20:56:21 +02:00 committed by GitHub
parent a8b4ca69a2
commit 4067940cbd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,3 @@
---
#id: digitalcore #id: digitalcore
name: DigitalCore name: DigitalCore
identifier: digitalcore identifier: digitalcore
@ -58,15 +57,7 @@ irc:
type: single type: single
lines: lines:
- tests: - tests:
- line: 'NEW TORRENT in Movies/XviD :: This.is.my.Movie.2019.BRRip.XviD.AC3-iND :: https://digitalcore.club/api/v1/torrents/download/00000' - line: 'NEW TORRENT in Movies/XviD :: This.is.my.Movie.2019.BRRip.XviD.AC3-iND :: https://digitalcore.club/api/v1/torrents/download/00000 :: Tags: [p2p,unrar] :: Size: [1.23 GiB]'
expect:
category: Movies/XviD
torrentName: This.is.my.Movie.2019.BRRip.XviD.AC3-iND
baseUrl: https://digitalcore.club/api/v1/torrents/
torrentId: "00000"
tags: ""
releaseTags: ""
- line: 'NEW TORRENT in Movies/XviD :: This.is.my.Movie.2019.BRRip.XviD.AC3-iND :: https://digitalcore.club/api/v1/torrents/download/00000 :: Tags: [p2p,unrar]'
expect: expect:
category: Movies/XviD category: Movies/XviD
torrentName: This.is.my.Movie.2019.BRRip.XviD.AC3-iND torrentName: This.is.my.Movie.2019.BRRip.XviD.AC3-iND
@ -74,7 +65,8 @@ irc:
torrentId: "00000" torrentId: "00000"
tags: "" tags: ""
releaseTags: p2p,unrar releaseTags: p2p,unrar
- line: 'NEW TORRENT in Movies/1080p :: This.is.my.Movie.2019.BRRip.XviD.AC3-iND :: https://digitalcore.club/api/v1/torrents/download/00000 :: Tags: [p2p,unrar] :: Genre: [Drama, Fantasy, Horror]' torrentSize: 1.23 GiB
- line: 'NEW TORRENT in Movies/1080p :: This.is.my.Movie.2019.BRRip.XviD.AC3-iND :: https://digitalcore.club/api/v1/torrents/download/00000 :: Tags: [p2p,unrar] :: Genre: [Drama, Fantasy, Horror] :: Size: [1.23 GiB]'
expect: expect:
category: Movies/1080p category: Movies/1080p
torrentName: This.is.my.Movie.2019.BRRip.XviD.AC3-iND torrentName: This.is.my.Movie.2019.BRRip.XviD.AC3-iND
@ -82,15 +74,17 @@ irc:
torrentId: "00000" torrentId: "00000"
tags: "Drama, Fantasy, Horror" tags: "Drama, Fantasy, Horror"
releaseTags: p2p,unrar releaseTags: p2p,unrar
- line: 'NEW TORRENT in Movies/1080p :: This.is.my.Movie.2019.BRRip.XviD.AC3-iND :: https://digitalcore.club/api/v1/torrents/download/00000 :: Genre: [Drama, Fantasy, Horror]' torrentSize: 1.23 GiB
- line: "NEW TORRENT in Games/PC :: STAR.WARS.Episode.I.Jedi.Power.Battles.Update.1-RUNE :: https://digitalcore.club/api/v1/torrents/download/1726693 :: Tags: [new] :: Genre: [Platform, Hack and slash/Beat 'em up, Adventure, Arcade] :: Size: [65.98 MiB]"
expect: expect:
category: Movies/1080p category: Games/PC
torrentName: This.is.my.Movie.2019.BRRip.XviD.AC3-iND torrentName: STAR.WARS.Episode.I.Jedi.Power.Battles.Update.1-RUNE
baseUrl: https://digitalcore.club/api/v1/torrents/ baseUrl: https://digitalcore.club/api/v1/torrents/
torrentId: "00000" torrentId: "1726693"
tags: "Drama, Fantasy, Horror" tags: "Platform, Hack and slash/Beat 'em up, Adventure, Arcade"
releaseTags: "" releaseTags: new
pattern: 'NEW TORRENT in (.+) :: (.+) :: (https:\/\/.+\/).+\/([0-9a-zA-Z]+)(?: :: Tags: )?(?:\[([0-9a-zA-Z ,\-&]+)\])?(?: :: Genre: )?(?:\[([0-9a-zA-Z ,\-&]+)\])?' torrentSize: 65.98 MiB
pattern: 'NEW TORRENT in (.+) :: (.+) :: (https:\/\/.+\/)download\/(\d+) :: Tags: \[(.+?)\](?: :: Genre: )?(?:\[(.+?)\])? :: Size: \[(.+)\]'
vars: vars:
- category - category
- torrentName - torrentName
@ -98,6 +92,7 @@ irc:
- torrentId - torrentId
- releaseTags - releaseTags
- tags - tags
- torrentSize
match: match:
infourl: "/torrent/{{ .torrentId }}/" infourl: "/torrent/{{ .torrentId }}/"