feat: enrich RSS items without IDs via TMDB title search
Some checks failed
Build / build (push) Failing after 13m30s

Items from RSS feeds that have no media ID (tmdb/imdb/tvdb) are now
enriched automatically using TMDB's search API. The release name is
parsed to extract a clean title and year, then searched against TMDB
to retrieve the TMDB ID before validation.

- Add media/tmdb package with SearchMovies, SearchShows, and
  ExtractTitleAndYear (parses torrent release names)
- Add EnrichFeedItemWithTmdbId to media.Client, called in rss/process.go
  before the ID validation switch
- Add --run-now flag to nabarr run to trigger all feeds immediately
- Wire media.Client through rss.Client and rssJob
- Merge feature/add-tag-option (tag support for Sonarr/Radarr)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
dev
2026-03-03 16:53:54 +00:00
parent 4e09b14318
commit 719528a06b
13 changed files with 257 additions and 9 deletions

View File

@@ -39,7 +39,9 @@ var (
Verbosity int `type:"counter" default:"0" short:"v" env:"APP_VERBOSITY" help:"Log level verbosity"`
// commands
Run struct{} `cmd help:"Run"`
Run struct {
RunNow bool `type:"bool" default:"0" short:"n" help:"Run all feeds immediately without waiting for cron"`
} `cmd help:"Run"`
Test struct {
Pvr string `type:"string" required:"1" help:"PVR to test item against" placeholder:"sonarr"`
Id string `type:"string" required:"1" help:"Metadata ID of item to test" placeholder:"tvdb:121361"`
@@ -171,7 +173,7 @@ func main() {
if ctx.Command() == "run" {
// rss
log.Trace().Msg("Initialising rss")
r := rss.New(cfg.Rss, c, pvrs)
r := rss.New(cfg.Rss, c, pvrs, m)
for _, feed := range cfg.Rss.Feeds {
if err := r.AddJob(feed); err != nil {
log.Error().
@@ -182,6 +184,10 @@ func main() {
}
rssState = r.Start()
if cli.Run.RunNow {
r.RunAll()
}
// wait for shutdown signal
waitShutdown()
} else {