This commit is contained in:
Simon Ding
2024-07-10 22:07:56 +08:00
parent a81b68b236
commit 171eef57cc
7 changed files with 80 additions and 39 deletions

View File

@@ -28,8 +28,8 @@ func (s *Server) SearchTvSeries(c *gin.Context) (interface{}, error) {
}
type addWatchlistIn struct {
TmdbID int `json:"id" binding:"required"`
StorageID int `json:"folder"`
TmdbID int `json:"id" binding:"required"`
StorageID int `json:"storage_id"`
}
func (s *Server) AddWatchlist(c *gin.Context) (interface{}, error) {
@@ -53,8 +53,6 @@ func (s *Server) AddWatchlist(c *gin.Context) (interface{}, error) {
}
}
var epIds []int
for _, season := range detail.Seasons {
seasonId := season.SeasonNumber
@@ -92,7 +90,6 @@ func (s *Server) GetWatchlist(c *gin.Context) (interface{}, error) {
return list, nil
}
func (s *Server) GetTvDetails(c *gin.Context) (interface{}, error) {
ids := c.Param("id")
id, err := strconv.Atoi(ids)
@@ -101,4 +98,4 @@ func (s *Server) GetTvDetails(c *gin.Context) (interface{}, error) {
}
detail := s.db.GetSeriesDetails(id)
return detail, nil
}
}