feat: imdbid support

This commit is contained in:
Simon Ding
2024-08-08 14:10:26 +08:00
parent d746032114
commit 1bb16a8a66
4 changed files with 20 additions and 8 deletions

View File

@@ -139,6 +139,7 @@ func (s *Server) AddTv2Watchlist(c *gin.Context) (interface{}, error) {
}
m := &ent.Media{
TmdbID: int(detail.ID),
ImdbID: detail.IMDbID,
MediaType: media.MediaTypeTv,
NameCn: nameCn,
NameEn: nameEn,
@@ -210,6 +211,7 @@ func (s *Server) AddMovie2Watchlist(c *gin.Context) (interface{}, error) {
r, err := s.db.AddMediaWatchlist(&ent.Media{
TmdbID: int(detail.ID),
ImdbID: detail.IMDbID,
MediaType: media.MediaTypeMovie,
NameCn: nameCn,
NameEn: nameEn,