mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
feat(indexers): add animebytes (#87)
* feat: Added support for AB indexer. * docs: Changed readme to inlcude all the supported trackers. * feat: improve releasetags parsing and regex
This commit is contained in:
parent
284a2f9590
commit
8ff8e6bbb0
4 changed files with 127 additions and 6 deletions
|
@ -7,7 +7,7 @@ autobrr monitors IRC announce channels to get releases as soon as they are avail
|
||||||
## Features:
|
## Features:
|
||||||
|
|
||||||
* Single binary + config for easy setup
|
* Single binary + config for easy setup
|
||||||
* Support for 15 trackers
|
* Support for 21 trackers
|
||||||
* Easy to use UI
|
* Easy to use UI
|
||||||
* Available torrent actions:
|
* Available torrent actions:
|
||||||
* qBittorrent
|
* qBittorrent
|
||||||
|
@ -26,6 +26,7 @@ Is your tracker missing? Add an issue to request it.
|
||||||
<summary>Trackers</summary>
|
<summary>Trackers</summary>
|
||||||
|
|
||||||
* AlphaRatio
|
* AlphaRatio
|
||||||
|
* AnimeBytes
|
||||||
* BeyondHD
|
* BeyondHD
|
||||||
* BTN
|
* BTN
|
||||||
* EMP
|
* EMP
|
||||||
|
@ -33,11 +34,16 @@ Is your tracker missing? Add an issue to request it.
|
||||||
* GazelleGames
|
* GazelleGames
|
||||||
* HD-Torrents
|
* HD-Torrents
|
||||||
* IPTorrents
|
* IPTorrents
|
||||||
|
* Milkie
|
||||||
|
* MoreThanTV
|
||||||
* Nebulance
|
* Nebulance
|
||||||
* Orpheus
|
* Orpheus
|
||||||
* PTP
|
* PTP
|
||||||
* RED
|
* RED
|
||||||
* Superbits
|
* Superbits
|
||||||
|
* TorrentDay
|
||||||
* TorrentLeech
|
* TorrentLeech
|
||||||
|
* TorrentSeeds
|
||||||
|
* TranceTraffic
|
||||||
* UHDBits
|
* UHDBits
|
||||||
</details>
|
</details>
|
|
@ -190,6 +190,19 @@ func (r *Release) extractResolution() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *Release) extractResolutionFromTags(tag string) error {
|
||||||
|
if r.Resolution != "" {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
v, err := findLast(tag, `\b(([0-9]{3,4}p|i))\b`)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
r.Resolution = v
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (r *Release) extractSource() error {
|
func (r *Release) extractSource() error {
|
||||||
v, err := findLast(r.TorrentName, `(?i)\b(((?:PPV\.)?[HP]DTV|(?:HD)?CAM|B[DR]Rip|(?:HD-?)?TS|(?:PPV )?WEB-?DL(?: DVDRip)?|HDRip|DVDRip|DVDRIP|CamRip|WEB|W[EB]BRip|Blu-?Ray|DvDScr|telesync|CD|DVD|Vinyl|DAT|Cassette))\b`)
|
v, err := findLast(r.TorrentName, `(?i)\b(((?:PPV\.)?[HP]DTV|(?:HD)?CAM|B[DR]Rip|(?:HD-?)?TS|(?:PPV )?WEB-?DL(?: DVDRip)?|HDRip|DVDRip|DVDRIP|CamRip|WEB|W[EB]BRip|Blu-?Ray|DvDScr|telesync|CD|DVD|Vinyl|DAT|Cassette))\b`)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -214,7 +227,21 @@ func (r *Release) extractSourceFromTags(tag string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Release) extractCodec() error {
|
func (r *Release) extractCodec() error {
|
||||||
v, err := findLast(r.TorrentName, `(?i)\b(HEVC|[hx]\.?26[45]|xvid|divx|AVC|MPEG-?2|AV1|VC-?1|VP9|WebP)\b`)
|
v, err := findLast(r.TorrentName, `(?i)\b(HEVC|[hx]\.?26[45] 10-bit|[hx]\.?26[45]|xvid|divx|AVC|MPEG-?2|AV1|VC-?1|VP9|WebP)\b`)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
r.Codec = v
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *Release) extractCodecFromTags(tag string) error {
|
||||||
|
if r.Codec != "" {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
v, err := findLast(tag, `(?i)\b(HEVC|[hx]\.?26[45] 10-bit|[hx]\.?26[45]|xvid|divx|AVC|MPEG-?2|AV1|VC-?1|VP9|WebP)\b`)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -305,6 +332,19 @@ func (r *Release) extractGroup() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *Release) extractAnimeGroupFromTags(tag string) error {
|
||||||
|
if r.Group != "" {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
v, err := findLast(tag, `(?:RAW|Softsubs|Hardsubs)\s\((.+)\)`)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
r.Group = v
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (r *Release) extractRegion() error {
|
func (r *Release) extractRegion() error {
|
||||||
v, err := findLast(r.TorrentName, `(?i)\b(R([0-9]))\b`)
|
v, err := findLast(r.TorrentName, `(?i)\b(R([0-9]))\b`)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -392,7 +432,7 @@ func (r *Release) extractFreeleechFromTags(tag string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start with the basic most common ones
|
// Start with the basic most common ones
|
||||||
v, err := findLast(tag, `Freeleech!`)
|
v, err := findLast(tag, `(Freeleech!|Freeleech)`)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -469,16 +509,21 @@ func (r *Release) extractReleaseTags() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
tags := SplitAny(r.ReleaseTags, ",|/ ")
|
tags := SplitAny(r.ReleaseTags, ",|/")
|
||||||
|
|
||||||
for _, t := range tags {
|
for _, t := range tags {
|
||||||
|
t = strings.Trim(t, " ")
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
err = r.extractAudioFromTags(t)
|
err = r.extractAudioFromTags(t)
|
||||||
|
err = r.extractResolutionFromTags(t)
|
||||||
|
err = r.extractCodecFromTags(t)
|
||||||
err = r.extractContainerFromTags(t)
|
err = r.extractContainerFromTags(t)
|
||||||
err = r.extractSourceFromTags(t)
|
err = r.extractSourceFromTags(t)
|
||||||
err = r.extractFreeleechFromTags(t)
|
err = r.extractFreeleechFromTags(t)
|
||||||
err = r.extractLogScoreFromTags(t)
|
err = r.extractLogScoreFromTags(t)
|
||||||
err = r.extractBitrateFromTags(t)
|
err = r.extractBitrateFromTags(t)
|
||||||
|
err = r.extractAnimeGroupFromTags(t)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
continue
|
continue
|
||||||
|
|
66
internal/indexer/definitions/animebytes.yaml
Normal file
66
internal/indexer/definitions/animebytes.yaml
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
---
|
||||||
|
#id: animebytes
|
||||||
|
name: AnimeBytes
|
||||||
|
identifier: animebytes
|
||||||
|
description: AnimeBytes (AB) is a private torrent tracker for Anime, Manga, J-Music, OSTS, Hentai, Games and Light Novel.
|
||||||
|
language: en-us
|
||||||
|
urls:
|
||||||
|
- https://animebytes.tv/
|
||||||
|
privacy: private
|
||||||
|
protocol: torrent
|
||||||
|
supports:
|
||||||
|
- irc
|
||||||
|
- rss
|
||||||
|
source: gazelle
|
||||||
|
settings:
|
||||||
|
- name: passkey
|
||||||
|
type: secret
|
||||||
|
label: PassKey
|
||||||
|
help: Settings -> Account -> Passkey.
|
||||||
|
|
||||||
|
irc:
|
||||||
|
network: AnimeBytes-IRC
|
||||||
|
server: irc.animebytes.tv
|
||||||
|
port: 7000
|
||||||
|
tls: true
|
||||||
|
channels:
|
||||||
|
- "#announce"
|
||||||
|
announcers:
|
||||||
|
- Satsuki
|
||||||
|
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: "/msg Satsuki enter #announce {AB username} ircKey"
|
||||||
|
required: true
|
||||||
|
label: Invite command
|
||||||
|
help: Invite auth with Satsuki, animebytes.tv/irc
|
||||||
|
|
||||||
|
parse:
|
||||||
|
type: single
|
||||||
|
lines:
|
||||||
|
- test:
|
||||||
|
- "Other Show! 3rd Season - TV Series [2020] :: Blu-ray / MKV / h265 10-bit / 1080p / FLAC 5.0 / RAW (LoliHouse) / Freeleech || https://animebytes.tv/torrents.php?id=000000&torrentid=00000000 || music || Uploaded by: Anonymous"
|
||||||
|
- "Show 1 - TV Series [2004] :: DVD / MKV / h264 10-bit / 712x478 / FLAC 2.0 / Dual Audio / Softsubs (WSE) || https://animebytes.tv/torrents.php?id=0000&torrentid=000000 || coming.of.age, romance, seinen, slice.of.life, tragedy || Uploaded by: Uploader"
|
||||||
|
- "Artist - Album! Original Sound Track [2011] :: MP3 / V0 (VBR) / CD || https://animebytes.tv/torrents2.php?id=000000&torrentid=0000000 || soundtrack || Uploaded by: Test-Uploader"
|
||||||
|
pattern: '(.*) \[(\d+)\] :: (.*) \|\| (https.*)\/torrents.*\?id=\d+&torrentid=(\d+) \|\| (.+?(?:(?:\|\| Uploaded by|$))?)(?:\|\| Uploaded by: (.*))?$'
|
||||||
|
vars:
|
||||||
|
- torrentName
|
||||||
|
- year
|
||||||
|
- releaseTags
|
||||||
|
- baseUrl
|
||||||
|
- torrentId
|
||||||
|
- tags
|
||||||
|
- uploader
|
||||||
|
|
||||||
|
match:
|
||||||
|
torrenturl: "{{ .baseUrl }}/torrent/{{ .torrentId }}/download/{{ .passkey }}"
|
|
@ -25,17 +25,22 @@ export const codecs = [
|
||||||
"h265",
|
"h265",
|
||||||
"x264",
|
"x264",
|
||||||
"x265",
|
"x265",
|
||||||
|
"h264 10-bit",
|
||||||
|
"h265 10-bit",
|
||||||
|
"x264 10-bit",
|
||||||
|
"x265 10-bit",
|
||||||
"XviD"
|
"XviD"
|
||||||
];
|
];
|
||||||
|
|
||||||
export const CODECS_OPTIONS = codecs.map(v => ({ value: v, label: v, key: v}));
|
export const CODECS_OPTIONS = codecs.map(v => ({ value: v, label: v, key: v}));
|
||||||
|
|
||||||
export const sources = [
|
export const sources = [
|
||||||
|
"WEB-DL",
|
||||||
|
"BluRay",
|
||||||
"BD5",
|
"BD5",
|
||||||
"BD9",
|
"BD9",
|
||||||
"BDr",
|
"BDr",
|
||||||
"BDRip",
|
"BDRip",
|
||||||
"BluRay",
|
|
||||||
"BRRip",
|
"BRRip",
|
||||||
"CAM",
|
"CAM",
|
||||||
"DVDR",
|
"DVDR",
|
||||||
|
@ -48,7 +53,6 @@ export const sources = [
|
||||||
"HDTV",
|
"HDTV",
|
||||||
"Mixed",
|
"Mixed",
|
||||||
"SiteRip",
|
"SiteRip",
|
||||||
"WEB-DL",
|
|
||||||
"Webrip"
|
"Webrip"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue