File tree 3 files changed +22
-3
lines changed
3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 1
1
import "pkg:/source/utils/misc.bs"
2
2
import "pkg:/source/utils/config.bs"
3
+ import "pkg:/source/api/Image.bs"
3
4
4
5
sub init ()
5
6
m .extrasGrp = m .top .findnode ("extrasGrp" )
@@ -100,7 +101,19 @@ sub itemContentChanged()
100
101
userSettings = m .global .session .user .settings
101
102
itemData = item .json
102
103
m .top .id = itemData .id
103
- m .top .findNode ("moviePoster" ).uri = m .top .itemContent .posterURL
104
+
105
+ posterUrl = item .posterURL
106
+
107
+ ' Really need to update TvShowDetails to include the options for changing audio tracks etc
108
+ ' so that we can use that instead of MovieDetails when a user clicks on a TV Show in "Next Up"
109
+ if LCase (itemData .type ) = "episode" and IsValid (itemData .ImageTags )
110
+ m .moviePoster .width = 464
111
+ m .moviePoster .height = 261
112
+ params = { "Tag" : itemData .ImageTags .Primary , "maxHeight" : 261 , "maxWidth" : 464 }
113
+ posterUrl = ImageURL (itemData .id , "Primary" , params )
114
+ end if
115
+
116
+ m .moviePoster .uri = posterUrl
104
117
105
118
' Set default video source if user hasn't selected one yet
106
119
if m .top .selectedVideoStreamId = "" and isValid (itemData .MediaSources )
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ sub updateSize()
36
36
m .top .itemSpacing = [0 , 105 ]
37
37
38
38
m .top .rowItemSize = [itemWidth , itemHeight ]
39
- m .top .rowItemSpacing = [0 , 0 ]
39
+ m .top .rowItemSpacing = [40 , 0 ]
40
40
m .top .numRows = 2
41
41
m .top .translation = "[12,18]"
42
42
end sub
@@ -84,10 +84,16 @@ function getData()
84
84
end function
85
85
86
86
sub addRow (data , title , type_filter )
87
+ startDate = createObject ("roDateTime " )
88
+
87
89
itemData = m .top .itemData
88
90
row = data .CreateChild ("ContentNode" )
89
91
row .title = title
90
92
for each item in itemData .Items
93
+ if LCase (item .type ) = "program" and isValid (item .json .StartDate )
94
+ startDate .FromISO8601String (item .json .StartDate )
95
+ item .title += " - " + startDate .AsDateString ("short-date" ) + " " + startDate .AsTimeStringLoc ("short" )
96
+ end if
91
97
if item .type = type_filter
92
98
row .appendChild (item )
93
99
end if
Original file line number Diff line number Diff line change @@ -565,7 +565,7 @@ sub Main (args as dynamic) as void
565
565
m .global .queueManager .callFunc ("playQueue" )
566
566
else if node .type = "Person"
567
567
group = CreatePersonView (node )
568
- else if node .type = "TvChannel"
568
+ else if node .type = "TvChannel" or node . type = "Program"
569
569
group = CreateVideoPlayerGroup (node .id )
570
570
sceneManager .callFunc ("pushScene" , group )
571
571
else if node .type = "Episode"
You can’t perform that action at this time.
0 commit comments