mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-08 14:26:37 +08:00
fix: align scraped media naming and release sorting
This commit is contained in:
@@ -15,6 +15,7 @@ type MediaMetadataUpdate struct {
|
||||
PosterURL *string `json:"poster_url"`
|
||||
BackdropURL *string `json:"backdrop_url"`
|
||||
Year *int `json:"year"`
|
||||
ReleaseDate *string `json:"release_date"`
|
||||
Rating *float32 `json:"rating"`
|
||||
SeasonNum *int `json:"season_num"`
|
||||
EpisodeNum *int `json:"episode_num"`
|
||||
@@ -64,6 +65,9 @@ func (s *MediaService) UpdateMetadata(ctx context.Context, id string, req MediaM
|
||||
if req.Year != nil {
|
||||
updates["year"] = clampNonNegativeInt(*req.Year)
|
||||
}
|
||||
if req.ReleaseDate != nil {
|
||||
updates["release_date"] = normalizeReleaseDate(*req.ReleaseDate)
|
||||
}
|
||||
if req.Rating != nil {
|
||||
updates["rating"] = clampRating(*req.Rating)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user