fix: align scraped media naming and release sorting

This commit is contained in:
ShukeBta
2026-07-03 02:55:33 +08:00
parent 78de029ef3
commit b610dda098
48 changed files with 544 additions and 42 deletions
+2
View File
@@ -105,6 +105,7 @@ func (t *TMDbProvider) movieSearchResultToMatch(r tmdbMovieSearchResult) *Match
if r.BackdropPath != "" {
m.BackdropURL = t.imgCDN + "/w1280" + r.BackdropPath
}
m.ReleaseDate = normalizeReleaseDate(r.ReleaseDate)
if len(r.ReleaseDate) >= 4 {
_, _ = fmt.Sscanf(r.ReleaseDate[:4], "%d", &m.Year)
}
@@ -184,6 +185,7 @@ func (t *TMDbProvider) tvSearchResultToMatch(r tmdbTVSearchResult) *Match {
if r.BackdropPath != "" {
m.BackdropURL = t.imgCDN + "/w1280" + r.BackdropPath
}
m.ReleaseDate = normalizeReleaseDate(r.FirstAirDate)
if len(r.FirstAirDate) >= 4 {
_, _ = fmt.Sscanf(r.FirstAirDate[:4], "%d", &m.Year)
}