mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
feat: add usenet support (#543)
* feat(autobrr): implement usenet support * feat(sonarr): implement usenet support * feat(radarr): implement usenet support * feat(announce): implement usenet support * announce: cast a line * feat(release): prevent unknown protocol transfer * release: lines for days. * feat: add newznab and sabnzbd support * feat: add category to sabnzbd * feat(newznab): map categories * feat(newznab): map categories --------- Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com> Co-authored-by: ze0s <ze0s@riseup.net>
This commit is contained in:
parent
b2d93d50c5
commit
13a74f7cc8
29 changed files with 1588 additions and 37 deletions
93
pkg/newznab/caps.go
Normal file
93
pkg/newznab/caps.go
Normal file
|
@ -0,0 +1,93 @@
|
|||
package newznab
|
||||
|
||||
import "encoding/xml"
|
||||
|
||||
type Server struct {
|
||||
Version string `xml:"version,attr"`
|
||||
Title string `xml:"title,attr"`
|
||||
Strapline string `xml:"strapline,attr"`
|
||||
Email string `xml:"email,attr"`
|
||||
URL string `xml:"url,attr"`
|
||||
Image string `xml:"image,attr"`
|
||||
}
|
||||
type Limits struct {
|
||||
Max string `xml:"max,attr"`
|
||||
Default string `xml:"default,attr"`
|
||||
}
|
||||
type Retention struct {
|
||||
Days string `xml:"days,attr"`
|
||||
}
|
||||
|
||||
type Registration struct {
|
||||
Available string `xml:"available,attr"`
|
||||
Open string `xml:"open,attr"`
|
||||
}
|
||||
|
||||
type Searching struct {
|
||||
Search Search `xml:"search"`
|
||||
TvSearch Search `xml:"tv-search"`
|
||||
MovieSearch Search `xml:"movie-search"`
|
||||
AudioSearch Search `xml:"audio-search"`
|
||||
BookSearch Search `xml:"book-search"`
|
||||
}
|
||||
|
||||
type Search struct {
|
||||
Available string `xml:"available,attr"`
|
||||
SupportedParams string `xml:"supportedParams,attr"`
|
||||
}
|
||||
|
||||
type CapCategories struct {
|
||||
Categories []Category `xml:"category"`
|
||||
}
|
||||
|
||||
type CapCategory struct {
|
||||
ID string `xml:"id,attr"`
|
||||
Name string `xml:"name,attr"`
|
||||
SubCategories []CapCategory `xml:"subcat"`
|
||||
}
|
||||
|
||||
type Groups struct {
|
||||
Group Group `xml:"group"`
|
||||
}
|
||||
type Group struct {
|
||||
ID string `xml:"id,attr"`
|
||||
Name string `xml:"name,attr"`
|
||||
Description string `xml:"description,attr"`
|
||||
Lastupdate string `xml:"lastupdate,attr"`
|
||||
}
|
||||
|
||||
type Genres struct {
|
||||
Genre Genre `xml:"genre"`
|
||||
}
|
||||
|
||||
type Genre struct {
|
||||
ID string `xml:"id,attr"`
|
||||
Categoryid string `xml:"categoryid,attr"`
|
||||
Name string `xml:"name,attr"`
|
||||
}
|
||||
|
||||
type Tags struct {
|
||||
Tag []Tag `xml:"tag"`
|
||||
}
|
||||
|
||||
type Tag struct {
|
||||
Name string `xml:"name,attr"`
|
||||
Description string `xml:"description,attr"`
|
||||
}
|
||||
|
||||
type CapsResponse struct {
|
||||
Caps Caps `xml:"caps"`
|
||||
}
|
||||
|
||||
type Caps struct {
|
||||
XMLName xml.Name `xml:"caps"`
|
||||
Server Server `xml:"server"`
|
||||
Limits Limits `xml:"limits"`
|
||||
Retention Retention `xml:"retention"`
|
||||
Registration Registration `xml:"registration"`
|
||||
Searching Searching `xml:"searching"`
|
||||
Categories CapCategories `xml:"categories"`
|
||||
Groups Groups `xml:"groups"`
|
||||
Genres Genres `xml:"genres"`
|
||||
Tags Tags `xml:"tags"`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue