mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix(feeds): torznab newznab category parsing (#775)
This commit is contained in:
parent
0d6e23f278
commit
81d494ec5c
5 changed files with 12 additions and 12 deletions
|
@ -18,13 +18,13 @@ func (f Feed) Len() int {
|
|||
}
|
||||
|
||||
type Channel struct {
|
||||
Title string `xml:"title"`
|
||||
Items []FeedItem `xml:"item"`
|
||||
Title string `xml:"title"`
|
||||
Items []*FeedItem `xml:"item"`
|
||||
}
|
||||
|
||||
type Response struct {
|
||||
Channel struct {
|
||||
Items []FeedItem `xml:"item"`
|
||||
Items []*FeedItem `xml:"item"`
|
||||
} `xml:"channel"`
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ type Enclosure struct {
|
|||
Type string `xml:"type,attr"`
|
||||
}
|
||||
|
||||
func (f FeedItem) MapCategoriesFromAttr() {
|
||||
func (f *FeedItem) MapCategoriesFromAttr() {
|
||||
for _, attr := range f.Attributes {
|
||||
if attr.Name == "category" {
|
||||
catId, err := strconv.Atoi(attr.Value)
|
||||
|
@ -82,7 +82,7 @@ func (f FeedItem) MapCategoriesFromAttr() {
|
|||
}
|
||||
}
|
||||
|
||||
func (f FeedItem) MapCustomCategoriesFromAttr(categories []Category) {
|
||||
func (f *FeedItem) MapCustomCategoriesFromAttr(categories []Category) {
|
||||
for _, attr := range f.Attributes {
|
||||
if attr.Name == "category" {
|
||||
catId, err := strconv.Atoi(attr.Value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue