Skip to content

Commit

Permalink
fix overflow on 32 bit sytems
Browse files Browse the repository at this point in the history
  • Loading branch information
SoMuchForSubtlety committed May 22, 2021
1 parent 96f0d8c commit 273647c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion internal/ui/nodeV2.go
Expand Up @@ -23,7 +23,7 @@ func (s *UIState) v2ContentNode(v f1tv.ContentContainer, meta cmd.MetaData) *tvi

streamNode := tview.NewTreeNode(meta.EpisodeTitle).
SetColor(activeTheme.ItemNodeColor).
SetReference(&NodeMetadata{nodeType: StreamNode, id: strconv.Itoa(v.Metadata.ContentID), metadata: meta})
SetReference(&NodeMetadata{nodeType: StreamNode, id: strconv.FormatInt(v.Metadata.ContentID, 10), metadata: meta})

streamNode.SetSelectedFunc(func() {
streamNode.SetSelectedFunc(nil)
Expand Down
6 changes: 3 additions & 3 deletions pkg/f1tv/v2/api.go
Expand Up @@ -158,7 +158,7 @@ func (f *F1TV) GetLiveVideoContainers() ([]ContentContainer, error) {
return nil, err
}
var live []ContentContainer
ids := make(map[int]struct{})
ids := make(map[int64]struct{})
for _, vidContainers := range topContainers {
for _, v := range vidContainers.RetrieveItems.ResultObj.Containers {
_, ok := ids[v.Metadata.ContentID]
Expand All @@ -172,7 +172,7 @@ func (f *F1TV) GetLiveVideoContainers() ([]ContentContainer, error) {
return live, nil
}

func (f *F1TV) ContentDetails(contentID int) (TopContainer, error) {
func (f *F1TV) ContentDetails(contentID int64) (TopContainer, error) {
reqURL, err := assembleURL(contentDetailsPath, BIG_SCREEN_HLS, contentID)
if err != nil {
return TopContainer{}, err
Expand Down Expand Up @@ -210,7 +210,7 @@ func (f *F1TV) GetPerspectivePlaybackURL(format StreamType, path string) (string
return f.playbackURL(reqURL.String())
}

func (f *F1TV) GetPlaybackURL(format StreamType, contentID int) (string, error) {
func (f *F1TV) GetPlaybackURL(format StreamType, contentID int64) (string, error) {
reqURL, err := assembleURL(playbackRequestPath, format, contentID)
if err != nil {
return "", nil
Expand Down
4 changes: 2 additions & 2 deletions pkg/f1tv/v2/models.go
Expand Up @@ -128,7 +128,7 @@ type Metadata struct {
Genres []string `json:"genres"`
ContentSubtype ContentSubType `json:"contentSubtype"`
PcLevel int `json:"pcLevel"`
ContentID int `json:"contentId"`
ContentID int64 `json:"contentId"`
StarRating int `json:"starRating"`
PictureURL string `json:"pictureUrl"`
ContentType ContentType `json:"contentType"`
Expand Down Expand Up @@ -206,7 +206,7 @@ type TopContainer struct {

// only in content details
PlatformVariants []PlatformVariants `json:"platformVariants"`
ContentID int `json:"contentId"`
ContentID int64 `json:"contentId"`
Containers struct {
Bundles []Bundles `json:"bundles"`
Categories []Categories `json:"categories"`
Expand Down

0 comments on commit 273647c

Please sign in to comment.