diff --git a/internal/domain/release.go b/internal/domain/release.go index 4038d97..f0b84d9 100644 --- a/internal/domain/release.go +++ b/internal/domain/release.go @@ -488,6 +488,13 @@ func (r *Release) MapVars(def *IndexerDefinition, varMap map[string]string) erro } } + if internal, err := getStringMapValue(varMap, "internal"); err == nil { + i := StringEqualFoldMulti(internal, "internal", "yes", "1") + if i { + r.Origin = "INTERNAL" + } + } + if yearVal, err := getStringMapValue(varMap, "year"); err == nil { year, err := strconv.Atoi(yearVal) if err != nil { diff --git a/internal/domain/release_test.go b/internal/domain/release_test.go index b5a3649..7bbdac7 100644 --- a/internal/domain/release_test.go +++ b/internal/domain/release_test.go @@ -243,6 +243,25 @@ func TestRelease_Parse(t *testing.T) { Other: []string{"HYBRiD", "REMUX"}, }, }, + { + name: "parse_title_1", + fields: Release{ + TorrentName: "The Peripheral (2022) S01 (2160p AMZN WEB-DL H265 HDR10+ DDP 5.1 English - GROUP1)", + }, + want: Release{ + TorrentName: "The Peripheral (2022) S01 (2160p AMZN WEB-DL H265 HDR10+ DDP 5.1 English - GROUP1)", + Title: "The Peripheral", + Resolution: "2160p", + Source: "WEB-DL", + Codec: []string{"H.265"}, + HDR: []string{"HDR10+"}, + Audio: []string{"DDP"}, + AudioChannels: "5.1", + Year: 2022, + Group: "GROUP1", + Season: 1, + }, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { diff --git a/internal/indexer/definitions/huno.yaml b/internal/indexer/definitions/huno.yaml new file mode 100644 index 0000000..46f0f06 --- /dev/null +++ b/internal/indexer/definitions/huno.yaml @@ -0,0 +1,69 @@ +--- +#id: huno +name: Huno +identifier: huno +description: Hawke-Uno (HUNO) is a private torrent tracker for MOVIES / TV. +language: en-us +urls: + - https://hawke.uno +privacy: private +protocol: torrent +supports: + - irc + - rss +source: UNIT3D +settings: + - name: rsskey + type: secret + required: true + label: RSS key (RID) + help: "Go to your profile, My Security / RSS Key (RID) and copy your Current RID" + +irc: + network: Hawke-Uno + server: irc.hawke.uno + port: 6697 + tls: true + channels: + - "#huno_announce" + announcers: + - Luwin + settings: + - name: nick + type: text + required: true + label: Nick + help: Bot nick. Eg. user_bot + + - name: auth.account + type: text + required: true + label: NickServ Account + help: NickServ account. Make sure to group your user and bot. + + - name: auth.password + type: secret + required: true + label: NickServ Password + help: NickServ password + +parse: + type: single + lines: + - test: + - "New in [Movie]: Old Movie (1981) (1080p BluRay x265 SDR DD 2.0 English - group1) [4.5 GiB] [FL: No] [INTERNAL: Yes] [https://hawke.uno/torrents/0000] by: [anon]" + - "New in [TV]: Popular show (2022) S01E09 (1080p DSNP WEB-DL x265 SDR DDP Atmos 5.1 English - GROUP)[REPACK] [955.97 MiB] [FL: Yes] [INTERNAL: Yes] [https://hawke.uno/torrents/0000] by: [uploader]" + pattern: 'New in \[(.*)\]: ((.*) \(\d+\)(?: S\d+E\d+)? \((.*)\))(?:\[(?:REPACK2|REPACK|PROPER)\])? \[(.*)\] \[FL: (Yes|No)\] \[Internal: (Yes|No)\] \[(https://.+)/torrents/(\d+)\] by: \[(.*)\]' + vars: + - category + - torrentName + - title + - torrentSize + - freeleech + - internal + - baseUrl + - torrentId + - uploader + + match: + torrenturl: "{{ .baseUrl }}/torrent/download/{{ .torrentId }}.{{ .rsskey }}"