From 03ca3ed49a05dc473fc7c83f67fa14ead008903f Mon Sep 17 00:00:00 2001 From: Ludvig Lundgren Date: Sat, 19 Feb 2022 20:23:27 +0100 Subject: [PATCH] feat(indexers): add danishbytes (#146) * feat(indexers): add danishbytes * docs: update supported indexers --- README.md | 4 +- internal/domain/release.go | 6 +- internal/indexer/definitions/danishbytes.yaml | 66 +++++++++++++++++++ 3 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 internal/indexer/definitions/danishbytes.yaml diff --git a/README.md b/README.md index 132ca98..10060ef 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ autobrr monitors IRC announce channels to get releases as soon as they are avail ## Features: * Single binary + config for easy setup -* Support for 21 trackers +* Support for 25 trackers * Easy to use UI * Available torrent actions: * qBittorrent @@ -29,6 +29,8 @@ Is your tracker missing? Add an issue to request it. * AnimeBytes * BeyondHD * BTN + * DanishBytes + * DigitalCore * EMP * FileList * GazelleGames diff --git a/internal/domain/release.go b/internal/domain/release.go index fb9dc98..ae7d079 100644 --- a/internal/domain/release.go +++ b/internal/domain/release.go @@ -935,7 +935,7 @@ func (r *Release) MapVars(varMap map[string]string) error { } if freeleech, err := getStringMapValue(varMap, "freeleech"); err == nil { - r.Freeleech = strings.EqualFold(freeleech, "freeleech") || strings.EqualFold(freeleech, "yes") + r.Freeleech = strings.EqualFold(freeleech, "freeleech") || strings.EqualFold(freeleech, "yes") || strings.EqualFold(freeleech, "1") } if freeleechPercent, err := getStringMapValue(varMap, "freeleechPercent"); err == nil { @@ -986,6 +986,10 @@ func (r *Release) MapVars(varMap map[string]string) error { r.ReleaseTags = releaseTags } + if resolution, err := getStringMapValue(varMap, "resolution"); err == nil { + r.Resolution = resolution + } + return nil } diff --git a/internal/indexer/definitions/danishbytes.yaml b/internal/indexer/definitions/danishbytes.yaml new file mode 100644 index 0000000..fa35337 --- /dev/null +++ b/internal/indexer/definitions/danishbytes.yaml @@ -0,0 +1,66 @@ +--- +#id: danishbytes +name: DanishBytes +identifier: danishbytes +description: DanishBytes is a private torrent tracker for HD MOVIES / TV +language: en-us +urls: + - https://danishbytes.club/ +privacy: private +protocol: torrent +supports: + - irc + - rss +source: UNIT3D +settings: + - name: passkey + type: secret + label: Passkey + help: "Go to your profile tab under safety, copy RSS Key (RID)" + +irc: + network: DanishBytes + server: irc.danishbytes.club + port: 6697 + tls: false + channels: + - "#Announce" + announcers: + - DBBot + settings: + - name: nickserv.account + type: text + required: true + label: NickServ Account + help: NickServ account. Make sure to group your user and bot. Eg. user|autodl + - name: nickserv.password + type: secret + required: false + label: NickServ Password + help: NickServ password + - name: invite_command + type: secret + default: "DBBot announce ircKey" + required: true + label: Invite command + help: Invite auth with DBBot. + +parse: + type: single + lines: + - test: + - ":[N]-[Movies]-[Encode]-[720p]-[797 MiB]-[Some.Old.Movie.1972.720p.BluRay.x264.AAC-GROUP]-[Anonymous]-[https://danishbytes.club/torrents/0000]-[FL: 0]-[DU: 0];" + pattern: ':\[N\]-\[(.*)\]-\[(.*)\]-\[(.*)\]-\[(.*)\]-\[(.*)\]-\[(.*)\]-\[(.*\/)(?:.*\/)(.*)\]-\[FL: (.*)\]-\[DU: .*\];' + vars: + - category + - releaseTags + - resolution + - torrentSize + - torrentName + - uploader + - baseUrl + - torrentId + - freeleech + + match: + torrenturl: "{{ .baseUrl }}torrent/download/{{ .torrentId }}.{{ .passkey }}"