Skip to content
This repository was archived by the owner on Feb 10, 2023. It is now read-only.

Commit 273647c

Browse files
fix overflow on 32 bit sytems
1 parent 96f0d8c commit 273647c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

internal/ui/nodeV2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func (s *UIState) v2ContentNode(v f1tv.ContentContainer, meta cmd.MetaData) *tvi
2323

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

2828
streamNode.SetSelectedFunc(func() {
2929
streamNode.SetSelectedFunc(nil)

pkg/f1tv/v2/api.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func (f *F1TV) GetLiveVideoContainers() ([]ContentContainer, error) {
158158
return nil, err
159159
}
160160
var live []ContentContainer
161-
ids := make(map[int]struct{})
161+
ids := make(map[int64]struct{})
162162
for _, vidContainers := range topContainers {
163163
for _, v := range vidContainers.RetrieveItems.ResultObj.Containers {
164164
_, ok := ids[v.Metadata.ContentID]
@@ -172,7 +172,7 @@ func (f *F1TV) GetLiveVideoContainers() ([]ContentContainer, error) {
172172
return live, nil
173173
}
174174

175-
func (f *F1TV) ContentDetails(contentID int) (TopContainer, error) {
175+
func (f *F1TV) ContentDetails(contentID int64) (TopContainer, error) {
176176
reqURL, err := assembleURL(contentDetailsPath, BIG_SCREEN_HLS, contentID)
177177
if err != nil {
178178
return TopContainer{}, err
@@ -210,7 +210,7 @@ func (f *F1TV) GetPerspectivePlaybackURL(format StreamType, path string) (string
210210
return f.playbackURL(reqURL.String())
211211
}
212212

213-
func (f *F1TV) GetPlaybackURL(format StreamType, contentID int) (string, error) {
213+
func (f *F1TV) GetPlaybackURL(format StreamType, contentID int64) (string, error) {
214214
reqURL, err := assembleURL(playbackRequestPath, format, contentID)
215215
if err != nil {
216216
return "", nil

pkg/f1tv/v2/models.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ type Metadata struct {
128128
Genres []string `json:"genres"`
129129
ContentSubtype ContentSubType `json:"contentSubtype"`
130130
PcLevel int `json:"pcLevel"`
131-
ContentID int `json:"contentId"`
131+
ContentID int64 `json:"contentId"`
132132
StarRating int `json:"starRating"`
133133
PictureURL string `json:"pictureUrl"`
134134
ContentType ContentType `json:"contentType"`
@@ -206,7 +206,7 @@ type TopContainer struct {
206206

207207
// only in content details
208208
PlatformVariants []PlatformVariants `json:"platformVariants"`
209-
ContentID int `json:"contentId"`
209+
ContentID int64 `json:"contentId"`
210210
Containers struct {
211211
Bundles []Bundles `json:"bundles"`
212212
Categories []Categories `json:"categories"`

0 commit comments

Comments
 (0)