Skip to content

Commit

Permalink
torznab tmdbid
Browse files Browse the repository at this point in the history
  • Loading branch information
rraymondgh committed Feb 10, 2025
1 parent 8c4a5c3 commit e16dba0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/torznab/adapter/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,12 @@ func (a adapter) transformSearchResult(req torznab.SearchRequest, res search.Tor
AttrValue: item.PublishedAt.Format(torznab.RssDateDefaultFormat),
},
}
if tmdbid, ok := item.Content.Identifier("tmdb"); ok {
attrs = append(attrs, torznab.SearchResultItemTorznabAttr{
AttrName: torznab.AttrTmdb,
AttrValue: tmdbid,
})
}
seeders := item.Torrent.Seeders()
leechers := item.Torrent.Leechers()
if seeders.Valid {
Expand Down
1 change: 1 addition & 0 deletions internal/torznab/attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ const (
AttrResolution = "resolution"
AttrTeam = "team"
AttrImdb = "imdb"
AttrTmdb = "tmdb"
)

0 comments on commit e16dba0

Please sign in to comment.