Current Code

This commit is contained in:
Andrew Roach 2023-08-30 17:18:24 -04:00
parent e084c829f9
commit 9d48b0fc50
23 changed files with 114 additions and 266 deletions

View File

@ -29,13 +29,12 @@ function init()
m.server_setup = m.top.findNode("server_setup")
m.sidebar = m.top.findNode("sidebar")
m.videoplayer = m.top.findNode("videoplayer")
m.top.backgroundColor = "0x00000000"
m.top.backgroundURI = ""
set_setting("server", "https://vod.newellijay.tv")
m.content_contains = "config_videos"
m.searchResultsReceived = false
m.ConfigComplete = false
m.search_task = invalid
m.server_url = "vod.newellijay.tv"
m.DeepLinkContentId = Invalid
m.DeepLinkMediaType = Invalid
@ -56,7 +55,7 @@ function init()
' Flag that we need to send a launch complete signal beacon
'
m.launchCompleteSent = false
set_setting("server", "https://vod.newellijay.tv")
loadConfig()
end function
@ -137,11 +136,7 @@ function onKeyEvent(key, press) as Boolean
m.sidebar.setFocus(false)
handled = true
else if m.content_screen.visible
if (key="left")
enterSideBar()
m.sidebar.setFocus(true)
handled = true
else if (key="back")
if (key="back")
rslt = popContent()
?"[home_scene] onKeyPress result from popContent: ";rslt
if (rslt)
@ -289,12 +284,7 @@ end sub
sub loadVideoInfo(uuid)
m.url_task = createObject("roSGNode", "load_video_info_task")
m.url_task.observeField("response", "onVideoInfoResponse")
m.url_task.url.test = get_setting("server","") + "/api/v1/videos/" + uuid
if m.url_task.url.test <> invalid
m.url_task.url = m.url_task.url.test
else
m.url_task.url = get_setting("server","") +/api/v1/video-playlists" + uuid
end if
m.url_task.url = get_setting("server","") + "/api/v1/videos/" + uuid
m.url_task.control = "RUN"
end sub
@ -435,6 +425,10 @@ sub preBufferVideo(item)
content.streamformat = "hls"
end if
content.sdbifurl = "https://live.newellijay.tv/api/bifs/"+ item.uuid + ".bif"
content.hdbifurl = "https://live.newellijay.tv/api/bifs/"+ item.uuid + ".bif"
content.fhdbifurl = "https://live.newellijay.tv/api/bifs/"+ item.uuid + ".bif"
'
' Build list of subtitle/captions available on video
'
@ -458,7 +452,6 @@ sub preBufferVideo(item)
content.SubtitleTracks = captions
end if
end if
m.videoplayer.content = content
m.videoplayer.control = "prebuffer"
end sub
@ -470,6 +463,7 @@ sub initializeVideoPlayer()
m.videoplayer.notificationInterval=1
m.videoplayer.observeFieldScoped("position", "onPlayerPositionChanged")
m.videoplayer.observeFieldScoped("state", "onPlayerStateChanged")
end sub
sub onPlayerPositionChanged(obj)
@ -521,7 +515,7 @@ sub onServerUpdatePressed(obj)
m.sidebar.setFocus(true)
else
'? "[onServerUpdatePressed] new server: ";new_url
set_setting("server", new_url)
set_setting("server", "https://vod.newellijay.tv")
loadConfig()
end if
end if
@ -711,7 +705,7 @@ sub onConfigResponse(obj)
m.strings = settings.strings
m.iso639_1 = settings.iso639_1
m.overhang.Title = settings.instance_name
'
' Various screens need the configuration too to setup

View File

@ -50,10 +50,10 @@ SPDX-License-Identifier: MIT
visible="true"
translation="[0,0]"
logoUri="pkg:/images/logo.png"
title = "PeerVue"
showOptions="false"
logoBaselineOffset="25"
height="115"
showClock="false"
/>
<sidebar

View File

@ -32,13 +32,12 @@ SPDX-License-Identifier: MIT
<children>
<ScrollingLabel
<Label
id="Title"
color="0xFFFFFF"
text=""
maxWidth="800">
text="" >
<Font role = "font" uri = "pkg:/fonts/UKIJCJK.ttf" size = "32" />
</ScrollingLabel>
</Label>
<Label
id="ReleaseDate"
@ -53,7 +52,7 @@ SPDX-License-Identifier: MIT
height="120"
lineSpacing="7"
text=""
width="800"
width="1500"
wrap="true" >
<Font role = "font" uri = "pkg:/fonts/UKIJCJK.ttf" size = "32" />
</Label>

View File

@ -25,8 +25,7 @@ SPDX-License-Identifier: MIT
<children>
<Rectangle
id="backgroundColor"
color="ffffff"/>
id="backgroundColor"/>
<Poster
id="oldBackground"/>
<Poster
@ -35,7 +34,7 @@ SPDX-License-Identifier: MIT
<Rectangle
id="shade"
color="0x000000"
opacity="0"/>
opacity="0.65"/>
<Animation
id="fadeoutAnimation"

View File

@ -36,10 +36,9 @@ SPDX-License-Identifier: MIT
<children>
<background
id="Background"
width="915"
height="525"
color="ffffff"
translation="[990, 15]"
width="1920"
height="1080"
color="0xAAAAAA"
/>
<side_icons
@ -48,16 +47,16 @@ SPDX-License-Identifier: MIT
<RowList
id="rowList"
itemSize="[1760, 269]"
itemSpacing="[22, 0]"
itemSize="[1760, 327]"
itemSpacing="[20, 0]"
numRows="2"
rowFocusAnimationStyle="floatingFocus"
rowItemSize="[[393, 220]]"
rowItemSpacing="[[25, 15]]"
rowLabelOffset="[[0, 8]]"
showRowCounter="false"
rowItemSpacing="[[25, 4.5]]"
rowLabelOffset="[[60, 35]]"
showRowCounter="true"
showRowLabel="true"
translation="[160, 540]"
translation="[160, 375]"
/>
<Poster
@ -69,7 +68,6 @@ SPDX-License-Identifier: MIT
<SummaryDisplay
id="summary"
translation="[160, 145]"
width="800"
itemSpacings="[10,25]"
/>

View File

@ -101,7 +101,7 @@ sub setContent(item)
m.description.text = ""
end if
m.thumbnail.uri = get_setting("server", "") + item.thumbnailPath
m.thumbnail.uri = get_setting("server", "") + item.previewPath
'
' Show duration as h:mm:ss

View File

@ -80,23 +80,26 @@ SPDX-License-Identifier: MIT
text="Play"
showFocusFootprint="true"
translation="[160, 700]"
minWidth="150"
minWidth="450"
iconUri=""
/>
<Button
id="related_button"
text="Related Videos"
text="MORE VIDEOS"
showFocusFootprint="true"
translation="[160, 800]"
minWidth="150"
minWidth="450"
iconUri=""
/>
<ScrollingLabel
id="title"
maxWidth="900"
color="0xFFFFFF"
text=""
translation="[800,200]" >
maxWidth="1000"
translation="[800,200]"
>
<Font role = "font" uri = "pkg:/fonts/UKIJCJK.ttf" size = "48" />
</ScrollingLabel>
@ -106,7 +109,7 @@ SPDX-License-Identifier: MIT
wrap="true"
width="1000"
text=""
translation="[800,265]" >
translation="[800,250]" >
<Font role = "font" uri = "pkg:/fonts/UKIJCJK.ttf" size = "24" />
</Label>

View File

@ -5,21 +5,16 @@
function init()
m.clear_button = m.top.FindNode("clear_button")
m.enter_button = m.top.FindNode("enter_button")
m.keyboard = m.top.FindNode("keyboard")
m.prompt_text = m.top.FindNode("prompt_text")
m.server_name = m.top.FindNode("server_name")
m.server_url = "vod.newellijay.tv"
m.instances = []
m.server_url = m.top.FindNode("server_url")
m.instances = "https://vod.newellijay.tv"
m.keyboard.text = "vod.newellijay.tv"
m.top.observeField("visible", "onVisibleChange")
m.clear_button.observeField("buttonSelected", "onClearButtonPressed")
m.enter_button.setFocus(true)
end function
sub onVisibleChange()
@ -31,16 +26,11 @@ sub onVisibleChange()
end if
m.server_url.text = current_server
m.server_name.text = current_name
m.keyboard.text = current_name
m.keyboard.setFocus(false)
updateServerInfo(m.keyboard.text)
m.enter_button.setFocus(true)
end if
end sub
sub onClearButtonPressed()
end sub
function updateConfig(settings)
@ -52,30 +42,29 @@ function onKeyEvent(key, press) as Boolean
if (press)
if (key="down") and not m.enter_button.hasFocus()
m.keyboard.setFocus(false)
m.clear_button.setFocus(false)
updateServerInfo("https://vod.newellijay.tv")
m.enter_button.setFocus(true)
updateServerInfo(m.keyboard.text)
handled = true
else if (key="up") and not m.keyboard.hasFocus()
else if (key="up")
updateServerInfo("https://vod.newellijay.tv")
m.enter_button.setFocus(true)
m.clear_button.setFocus(false)
m.keyboard.setFocus(false)
updateServerInfo(m.keyboard.text)
handled = true
handled = true
else if (key="right" or key="left") and m.enter_button.hasFocus()
m.clear_button.setFocus(false)
updateServerInfo("https://vod.newellijay.tv")
m.enter_button.setFocus(true)
handled = true
updateServerInfo(m.keyboard.text)
handled = true
else if (key="right" or key="left") and m.clear_button.hasFocus()
m.clear_button.setFocus(false)
updateServerInfo("https://vod.newellijay.tv")
m.enter_button.setFocus(true)
handled = true
updateServerInfo(m.keyboard.text)
handled = true
end if
else if (key="OK")
updateServerInfo(m.keyboard.text)
m.enter_button.setFocus(true)
updateServerInfo("https://vod.newellijay.tv")
end if
return handled
end function
@ -86,7 +75,7 @@ function serverName(url) as String
return inst.name
end if
end for
return ""
return "New Ellijay TV"
end function
function updateServerInfo(pattern)
@ -95,9 +84,10 @@ function updateServerInfo(pattern)
match1 = Instr(1,LCase(inst.name),lc_pat)
match2 = Instr(1,LCase(inst.alt_name),lc_pat)
if (match1 > 0) or (match2 > 0)
m.server_url.text = inst.url
m.server_name.text = inst.name
m.server_url.text = "https://vod.newellijay.tv"
m.server_name.text = "New Ellijay TV"
return 0
end if
end for
end function

View File

@ -5,102 +5,24 @@ SPDX-FileCopyrightText: 2020 Tod Fitch <tod@fitchfamily.org>
SPDX-License-Identifier: MIT
-->
<component name="server_select" extends="Group" >
<component name="server_select" extends="Group">
<interface>
<field id="enter_button_pressed" type="int" alwaysnotify="true" alias="enter_button.buttonSelected"/>
<field id="server_url" type="string" alias="server_url.text"/>
<function name="updateConfig"/>
</interface>
<script type="text/brightscript" uri="pkg:/components/screens/server_select/server_select.brs"/>
<script type="text/brightscript" uri="pkg:/source/utils/config.brs"/>
<children>
<Label id="server_name" text="" width="1500" translation="[250,125]">
<Font role="font" uri="pkg:/fonts/UKIJCJK.ttf" size="48"/>
</Label>
<interface>
<field id="enter_button_pressed"
type="int"
alwaysnotify="true"
alias="enter_button.buttonSelected" />
<Label id="server_url" text="Server Address:" font="font:SmallestSystemFont" width="1500" translation="[250,200]"/>
<Label id="prompt_text" text="Server Name:" font="font:MediumSystemFont" width="1500" translation="[250,300]"/>
<field id="server_url"
type="string"
alias="server_url.text" />
<function name="updateConfig" />
</interface>
<script type="text/brightscript" uri="pkg:/components/screens/server_select/server_select.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<children>
<Label
id="server_name"
text=""
width="1500"
translation="[250,125]"
visible="false">
<Font role = "font" uri = "pkg:/fonts/UKIJCJK.ttf" size = "48" />
</Label>
<Label
id="server_url"
text="Server Address:"
font="font:SmallestSystemFont"
width="1500"
translation="[250,200]"
visible="false"
/>
<Label
id="prompt_text"
text="Welcome to New Ellijay TV!"
font="font:MediumSystemFont"
width="800"
translation="[250,300]"
/>
<Label
id="press"
text="Brought to you by the Ellijay Makerspace!"
font="font:MediumSystemFont"
width="900"
translation="[250,400]"
/>
<Label
id="press"
text="Local first, community produced television and video on demand."
font="font:MediumSystemFont"
width="1200"
translation="[250,350]"
/>
<Label
id="press"
text=""
font="font:MediumSystemFont"
width="900"
translation="[250,450]"
/>
<Label
id="press"
text="Press Start"
font="font:MediumSystemFont"
width="900"
translation="[250,525]"
/>
<Keyboard
id="keyboard"
translation="[250, 350]"
visible="false"
/>
<Button
id="enter_button"
text="Start"
showFocusFootprint="true"
translation="[250, 600]"
minWidth="250"
/>
<Button
id="clear_button"
text="Clear"
showFocusFootprint="true"
translation="[750, 800]"
minWidth="150"
visible="false"
/>
</children>
<Button id="enter_button" text="Update" showFocusFootprint="true" translation="[250, 800]" minWidth="150"/>
<Button id="clear_button" text="Clear" showFocusFootprint="true" translation="[750, 800]" minWidth="150"/>
</children>
</component>

View File

@ -7,21 +7,5 @@ SPDX-License-Identifier: MIT
<component name="side_icons" extends="Group" >
<children>
<Poster
width="50"
height="50"
translation="[10,0]"
uri="pkg:/images/settings-icon.png"
/>
<Poster
width="50"
height="50"
translation="[10,100]"
uri="pkg:/images/search-icon.png"
/>
</children>
</component>

View File

@ -23,9 +23,9 @@ function init()
' into an attribute in the XML
'
crlf = chr(13)+chr(10)
about_text = tr("New Ellijay TV is a community run Streaming and Video on Demand Service from Ellijay, GA.") + " "
about_text = about_text + tr("Source for this channel is at https://ellijaymakerspace.org/code") + crlf + crlf
about_text = about_text + tr("For information about New Ellijay TV see https://newellijay.tv/") + crlf + crlf
about_text = tr("PeerVue is an open source channel to view content hosted by a PeerTube instance.") + " "
about_text = about_text + tr("Source for this channel is at https://github.com/n76/PeerVue") + crlf + crlf
about_text = about_text + tr("For information about PeerTube see https://https://joinpeertube.org/") + crlf + crlf
about_text = about_text + tr("UKIJCKJ font") + " ©2017 Tursun Sultan https://fontlibrary.org/en/font/ukij-cjk" + crlf + crlf
about_text = about_text + tr("Search and gear icons") + " ©2020 Remix-Design https://github.com/Remix-Design/RemixIcon" + crlf + crlf
m.about_info.text = about_text

View File

@ -6,60 +6,5 @@ SPDX-License-Identifier: MIT
-->
<component name="sidebar" extends="Group" >
<interface>
<field id="selected_item" type="String" />
<field id="language_set" type="String" />
<!-- Row item focused handler -->
<field id="categoryFocused" type="intarray" alias="category_list.itemFocused" onChange="onCategoryFocused"/>
<field id="settingFocused" type="intarray" alias="setting_list.itemFocused" onChange="onSettingFocused"/>
<function name="updateConfig" />
</interface>
<script type="text/brightscript" uri="pkg:/components/screens/sidebar/sidebar.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<children>
<LabelList
id="category_list"
translation="[50, 150]"
itemSize="[400,48]">
<ContentNode id = "categories" role = "content" >
<category_node title = "Search..." cat_type="search"/>
<category_node title = "Settings" cat_type="xSettings"/>
<category_node title = "About" cat_type="xAbout"/>
</ContentNode>
</LabelList>
<LabelList
id="setting_list"
translation="[550, 150]"
itemSize="[400,48]">
<ContentNode id = "categories" role = "content" >
<category_node title = "PeerTube Server" cat_type="server"/>
<category_node title = "Video Language" cat_type="xLanguage"/>
</ContentNode>
</LabelList>
<RadioButtonList
id="language_list"
translation="[1150, 150]"
itemSize="[400,48]" >
<Font role = "font" uri = "pkg:/fonts/UKIJCJK.ttf" size = "32" />
<Font role = "focusedFont" uri = "pkg:/fonts/UKIJCJK.ttf" size = "32" />
</RadioButtonList>
<Label
id="about_info"
visible="false"
font="font:MediumSystemFont"
color="0xFFFFFF"
wrap="true"
width="1100"
height="800"
translation="[550,150]" />
</children>
</component>

View File

@ -23,7 +23,7 @@ function load()
configuration.iso639_1 = json.iso639_1
configuration.instances = json.instances
server = "https://vod.newellijay.tv"
server = "vod.newellijay.tv"
configuration.instance_name = "New Ellijay TV "
'

View File

@ -8,7 +8,7 @@ sub init()
end sub
function request()
url = m.top.url
url = "https://vod.newellijay.tv/"
? "[load_url_task]: ";url
json = getFeed(url)
if (json <> invalid)
@ -16,3 +16,4 @@ function request()
end if
return 0
end function

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 KiB

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -3,7 +3,7 @@
# SPDX-License-Identifier: MIT
## Channel Details
title=New Ellijay TV
title=PeerVue
## Channel Icons
#### Per: https://developer.roku.com/docs/developer-program/getting-started/architecture/channel-manifest.md
@ -30,6 +30,6 @@ screensaver_title=PeerVue
supports_input_launch=1
## Channel version
major_version=2
minor_version=13
major_version=1
minor_version=12
# build_number generated by make file

View File

@ -6,20 +6,32 @@
},
{
"title": "NEW",
"path": "/api/v1/videos/?nsfw=false&start=0&count=30&sort=-publishedAt"
"path": "/api/v1/videos/?isLive=false&nsfw=false&start=0&count=30&sort=-publishedAt"
},
{
"title": "Local TV",
"path": "/api/v1/video-channels/newellijaytv/videos/?nsfw=false&start=0&count=100&filter=local"
},
{
"title": "Music",
"path": "/api/v1/video-channels/music/videos?nsfw=false&start=0&count=100"
},
{
"title": "NE TV ORIGINALS",
"path": "/api/v1/video-channels/newellijaytv/videos/?nsfw=false&start=0&count=30&sort=-publishedAt"
"title": "Archives",
"Path" : "/api/v1/video-channels/archives/videos?start=0&count=100"
},
{
"title": "Film Festival",
"Path" : "/api/v1/video-channels/filmfestival/videos?nsfw=false&start=0&count=100"
},
{
"title": "Slow TV",
"Path" : "/api/v1/video-channels/slowtv/videos?nsfw=false&start=0&count=100"
},
{
"title": "ANALOG REVOLUTION",
"path": "/api/v1/video-channels/music/videos/?nsfw=false&start=0&count=30&sort=-publishedAt"
},
{
"title": "ARCHIVES",
"path": "/api/v1/video-channels/archives/videos/?nsfw=false&start=0&count=30&sort=-publishedAt"
"title": "WHat's Popular?",
"path": "/api/v1/videos/?nsfw=false&start=0&count=100&sort=-trending"
}
],
"iso639_1": {
@ -761,10 +773,11 @@
}
},
"instances": [
{
"name": "New Ellijay TV",
"alt_name": "New Ellijay TV",
{
"name": "New Ellijay Television",
"alt_name": "vod.newellijay.tv",
"url": "https://vod.newellijay.tv"
}
]
]
}