Skip to content

Commit

Permalink
torznab tmdbid in results. (#386)
Browse files Browse the repository at this point in the history
* torznab tmdbid

* transformSerachResults - similar blocks of code co-located

---------

Co-authored-by: mgdigital <[email protected]>
  • Loading branch information
rraymondgh and mgdigital authored Mar 2, 2025
1 parent 9f2d9bf commit bd94493
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 @@ -285,6 +285,12 @@ func (a adapter) transformSearchResult(req torznab.SearchRequest, res search.Tor
AttrValue: item.ReleaseGroup.String,
})
}
if tmdbid, ok := item.Content.Identifier("tmdb"); ok {
attrs = append(attrs, torznab.SearchResultItemTorznabAttr{
AttrName: torznab.AttrTmdb,
AttrValue: tmdbid,
})
}
if imdbId, ok := item.Content.Identifier("imdb"); ok {
attrs = append(attrs, torznab.SearchResultItemTorznabAttr{
AttrName: torznab.AttrImdb,
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 bd94493

Please sign in to comment.