Skip to content

Commit

Permalink
Merge pull request #1790 from cewert/sync-branches
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert authored Jul 12, 2024
2 parents cf4a614 + 50d5d2a commit 5ad10e3
Show file tree
Hide file tree
Showing 27 changed files with 423 additions and 293 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/roku-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
- name: Build app for production
if: env.BRANCH_NAME == 'master'
run: npm run build-prod
- name: Use Java 21
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4
- name: Setup Java
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4
with:
distribution: "temurin"
java-version: "21"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# If you want to get_images, you'll also need convert from ImageMagick
##########################################################################

VERSION := 2.0.5
VERSION := 2.0.7

## usage

Expand Down
13 changes: 9 additions & 4 deletions bsconfig-tdd-sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,17 @@
"dest": "source"
}
],
"diagnosticFilters": ["node_modules/**/*", "**/roku_modules/**/*"],
"diagnosticFilters": [
"node_modules/**/*",
"**/roku_modules/**/*"
],
"autoImportComponentScript": true,
"createPackage": false,
"stagingFolderPath": "build",
"stagingDir": "build",
"retainStagingDir": true,
"plugins": ["rooibos-roku"],
"plugins": [
"rooibos-roku"
],
"rooibos": {
"isRecordingCodeCoverage": false,
"testsFilePattern": null,
Expand All @@ -45,4 +50,4 @@
"sendHomeOnFinish": false
},
"sourceMap": true
}
}
13 changes: 9 additions & 4 deletions bsconfig-tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@
},
"manifest"
],
"diagnosticFilters": ["node_modules/**/*", "**/roku_modules/**/*"],
"diagnosticFilters": [
"node_modules/**/*",
"**/roku_modules/**/*"
],
"autoImportComponentScript": true,
"stagingFolderPath": "build",
"stagingDir": "build",
"retainStagingDir": true,
"plugins": ["rooibos-roku"],
"plugins": [
"rooibos-roku"
],
"rooibos": {
"isRecordingCodeCoverage": false,
"testsFilePattern": null,
Expand All @@ -36,4 +41,4 @@
"sendHomeOnFinish": false
},
"sourceMap": true
}
}
17 changes: 8 additions & 9 deletions components/WhatsNewDialog.bs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sub init()

m.top.id = "OKDialog"
m.top.height = 900
m.top.title = m.global.app.version + " - " + tr("What's New?")
m.top.title = tr("Welcome to version") + " " + m.global.app.version
m.top.buttons = [tr("OK")]

dialogStyles = {
Expand All @@ -14,21 +14,20 @@ sub init()
"fontUri": "font:SystemFontFile",
"color": "#EFEFEFFF"
},
"author": {
"url": {
"fontSize": 27,
"fontUri": "font:SystemFontFile",
"color": "#00a4dcFF"
}
}

whatsNewList = ParseJSON(ReadAsciiFile("pkg:/source/static/whatsNew/" + m.global.app.version.ToStr().trim() + ".json"))

for each item in whatsNewList
textLine = m.content.CreateChild("StdDlgMultiStyleTextItem")
textLine.drawingStyles = dialogStyles
textLine.text = "• " + item.description + " <author>" + item.author + "</author>"
end for
' empty line for spacing
textLine = m.content.CreateChild("StdDlgMultiStyleTextItem")
textLine.text = ""

textLine = m.content.CreateChild("StdDlgMultiStyleTextItem")
textLine.drawingStyles = dialogStyles
textLine.text = tr("To view a complete list of changes visit") + " <url>https://github.com/jellyfin/jellyfin-roku/releases/tag/v" + m.global.app.version + "</url>"
end sub

sub setPalette()
Expand Down
39 changes: 37 additions & 2 deletions components/home/HomeRows.bs
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,25 @@ sub createLatestInRows()
' create a "Latest In" row for each library
for each lib in m.filteredLatest
if lib.collectionType <> "boxsets" and lib.collectionType <> "livetv" and lib.json.CollectionType <> "Program"
sectionName = `${tr("Latest in")} ${lib.name} >`

imagesize = homeRowItemSizes.WIDE_POSTER

if isValid(lib.json.CollectionType)
if LCase(lib.json.CollectionType) = "movies"
imagesize = homeRowItemSizes.MOVIE_POSTER
else if LCase(lib.json.CollectionType) = "music"
imagesize = homeRowItemSizes.MUSIC_ALBUM
end if
end if

if not sectionExists(sectionName)
nextUpRow = m.top.content.CreateChild("HomeRow")
nextUpRow.title = sectionName
nextUpRow.imageWidth = imagesize[0]
nextUpRow.cursorSize = imagesize
end if

loadLatest = createObject("roSGNode", "LoadItemsTask")
loadLatest.itemsToLoad = "latest"
loadLatest.itemId = lib.id
Expand Down Expand Up @@ -375,13 +394,31 @@ end function
' createLiveTVRow: Creates a row displaying the live tv now on section
'
sub createLiveTVRow()
sectionName = tr("On Now")

if not sectionExists(sectionName)
nextUpRow = m.top.content.CreateChild("HomeRow")
nextUpRow.title = sectionName
nextUpRow.imageWidth = homeRowItemSizes.WIDE_POSTER[0]
nextUpRow.cursorSize = homeRowItemSizes.WIDE_POSTER
end if

m.LoadOnNowTask.observeField("content", "updateOnNowItems")
m.LoadOnNowTask.control = "RUN"
end sub

' createContinueWatchingRow: Creates a row displaying items the user can continue watching
'
sub createContinueWatchingRow()
sectionName = tr("Continue Watching")

if not sectionExists(sectionName)
nextUpRow = m.top.content.CreateChild("HomeRow")
nextUpRow.title = sectionName
nextUpRow.imageWidth = homeRowItemSizes.WIDE_POSTER[0]
nextUpRow.cursorSize = homeRowItemSizes.WIDE_POSTER
end if

' Load the Continue Watching Data
m.LoadContinueWatchingTask.observeField("content", "updateContinueWatchingItems")
m.LoadContinueWatchingTask.control = "RUN"
Expand Down Expand Up @@ -478,8 +515,6 @@ sub updateContinueWatchingItems()
return
end if

sectionName = tr("Continue Watching")

' remake row using the new data
row = CreateObject("roSGNode", "HomeRow")
row.title = sectionName
Expand Down
2 changes: 1 addition & 1 deletion components/login/UserItem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<component name="UserItem" extends="Group">
<children>
<LayoutGroup layoutDirection="vert">
<Poster id="profileImage" width="300" height="300" />
<Poster id="profileImage" width="300" height="300" loadDisplayMode="scaleToZoom" />
<Label id="profileName" horizAlign="center" vertAlign="center" font="font:SmallBoldSystemFont" color="#EBEBEB" height="64" width="300" />
</LayoutGroup>
</children>
Expand Down
1 change: 1 addition & 0 deletions components/manager/QueueManager.bs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ end sub

' Set starting point for top item in the queue
sub setTopStartingPoint(positionTicks)
if getCount() = 0 then return
m.queue[0].startingPoint = positionTicks
end sub

Expand Down
42 changes: 42 additions & 0 deletions components/movies/MovieDetails.bs
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,58 @@ sub init()
m.buttonGrp.setFocus(true)
m.top.lastFocus = m.buttonGrp

m.isFirstRun = true
m.top.observeField("itemContent", "itemContentChanged")

' Animation used to swap out posters on reloads
m.moviePosterSwapAnimation = m.top.findNode("moviePosterSwapAnimation")
m.moviePosterSwapAnimation.observeField("state", "onMoviePosterSwapAnimationStateChange")

m.top.observeField("newPosterImageURI", "onNewPosterImageURIChange")

m.moviePoster = m.top.findNode("moviePoster")
m.moviePosterSwap = m.top.findNode("moviePosterSwap")
m.moviePosterSwap.observeField("loadStatus", "onPosterLoadStatusChanged")
end sub

' onNewPosterImageURIChange: Handler for newPosterImageURI param change
'
sub onNewPosterImageURIChange()
m.moviePosterSwap.uri = m.top.newPosterImageURI
end sub

' onPosterLoadStatusChanged: Handler for changes to m.moviePosterSwap.loadStatus
'
sub onPosterLoadStatusChanged()
if LCase(m.moviePosterSwap.loadStatus) <> "ready" then return
m.moviePosterSwapAnimation.control = "start"
end sub

' onMoviePosterSwapAnimationStateChange: Handler for changes to m.moviePosterSwapAnimation.state
'
sub onMoviePosterSwapAnimationStateChange()
if LCase(m.moviePosterSwapAnimation.state) <> "stopped" then return
m.moviePoster.uri = m.moviePosterSwap.uri
m.moviePoster.opacity = 1
m.moviePosterSwap.opacity = 0
m.moviePosterSwap.uri = ""
end sub

' OnScreenShown: Callback function when view is presented on screen
'
sub OnScreenShown()
' set focus to button group
if m.extrasGrp.opacity = 1
m.top.lastFocus.setFocus(true)
else
m.buttonGrp.setFocus(true)
end if

if m.isFirstRun
m.isFirstRun = false
else
m.top.refreshMovieDetailsData = not m.top.refreshMovieDetailsData
end if
end sub

sub trailerAvailableChanged()
Expand Down
9 changes: 9 additions & 0 deletions components/movies/MovieDetails.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<component name="MovieDetails" extends="JFScreen">
<children>
<Poster id="moviePosterSwap" translation="[96,175]" width="300" height="450" />

<LayoutGroup id="main_group" layoutDirection="horiz" itemSpacings="[30]">
<Poster id="moviePoster" translation="[250,150]" width="300" height="450" />
<LayoutGroup layoutDirection="vert" translation="[455, 150]" itemSpacings="[25]" id="details">
Expand Down Expand Up @@ -43,12 +45,19 @@

<!-- "Cast and Crew" row -->
<extrasSlider id="movieExtras" />

<Animation id="moviePosterSwapAnimation" duration="1" repeat="false" easeFunction="linear">
<FloatFieldInterpolator id="fadeinLoading" key="[0.0, 1.0]" keyValue="[ 0.00, 1.00 ]" fieldToInterp="moviePosterSwap.opacity" />
<FloatFieldInterpolator id="fadeoutLoaded" key="[0.0, 1.0]" keyValue="[ 1.00, 0.00 ]" fieldToInterp="moviePoster.opacity" />
</Animation>
</children>
<interface>
<field id="itemContent" type="node" />
<field id="trailerAvailable" type="bool" onChange="trailerAvailableChanged" value="false" />
<field id="selectedAudioStreamIndex" type="integer" />
<field id="selectedVideoStreamId" type="string" />
<field id="newPosterImageURI" type="string" />
<field id="quickPlayNode" type="node" alwaysNotify="true" />
<field id="refreshMovieDetailsData" type="bool" alwaysNotify="true" />
</interface>
</component>
16 changes: 16 additions & 0 deletions components/tvshows/TVEpisodes.bs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ sub init()
m.unplayedEpisodeCount = m.top.findNode("unplayedEpisodeCount")

m.rows.observeField("doneLoading", "updateSeason")

m.isFirstRun = true
end sub

sub setSeasonLoading()
Expand All @@ -36,6 +38,8 @@ sub updateSeason()
if m.top.seasonData.UserData.UnplayedItemCount > 0
m.unplayedCount.visible = true
m.unplayedEpisodeCount.text = m.top.seasonData.UserData.UnplayedItemCount
else
m.unplayedCount.visible = false
end if
end if
end if
Expand Down Expand Up @@ -66,6 +70,18 @@ function getFocusedItem() as dynamic
return invalid
end function

' OnScreenShown: Callback function when view is presented on screen
'
sub OnScreenShown()
if m.isFirstRun
m.isFirstRun = false
return
end if

m.tvEpisodeRow.setFocus(true)
m.top.refreshSeasonDetailsData = not m.top.refreshSeasonDetailsData
end sub

' Handle navigation input from the remote and act on it
function onKeyEvent(key as string, press as boolean) as boolean
if key = "left" and m.tvEpisodeRow.hasFocus()
Expand Down
4 changes: 3 additions & 1 deletion components/tvshows/TVEpisodes.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<component name="TVEpisodes" extends="JFGroup">
<component name="TVEpisodes" extends="JFScreen">
<children>
<Poster id="seasonPoster" width="300" height="450" translation="[95,175]">
<Rectangle id="unplayedCount" visible="false" width="90" height="60" color="#00a4dcFF" translation="[210, 0]">
Expand All @@ -12,11 +12,13 @@
</children>
<interface>
<field id="episodeSelected" alias="picker.itemSelected" />
<field id="refreshSeasonDetailsData" type="bool" alwaysNotify="true" />
<field id="selectedItem" type="node" alwaysNotify="true" />
<field id="quickPlayNode" type="node" />
<field id="seasonData" type="assocarray" onChange="setSeasonLoading" />
<field id="objects" alias="picker.objects" />
<field id="episodeObjects" type="assocarray" />
<field id="extrasObjects" type="assocarray" onChange="setExtraButtonVisibility" />
<function name="updateSeason" />
</interface>
</component>
5 changes: 5 additions & 0 deletions components/tvshows/TVListDetails.bs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ sub itemContentChanged()
' Add checkmark in corner (if applicable)
if isValid(itemData.UserData) and isValid(itemData.UserData.Played) and itemData.UserData.Played = true
m.playedIndicator.visible = true
else
m.playedIndicator.visible = false
end if

' Add progress bar on bottom (if applicable)
Expand All @@ -93,6 +95,9 @@ sub itemContentChanged()
progressWidthInPixels = int(m.progressBackground.width * itemData.UserData.PlayedPercentage / 100)
m.progressBar.width = progressWidthInPixels
m.progressBar.visible = true
else
m.progressBackground.visible = false
m.progressBar.visible = false
end if

' Display current video_codec and check if there is more than one video to choose from...
Expand Down
11 changes: 8 additions & 3 deletions locale/en_US/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1242,9 +1242,14 @@
<extracomment>User Setting - Setting description</extracomment>
</message>
<message>
<source>What's New?</source>
<translation>What's New?</translation>
<extracomment>Popup title - Popup displays all the major changes to the app since the last version</extracomment>
<source>Welcome to version</source>
<translation>Welcome to version</translation>
<extracomment>WhatsNewDialog title - Welcome to version 2.0.0</extracomment>
</message>
<message>
<source>To view a complete list of changes visit</source>
<translation>To view a complete list of changes visit</translation>
<extracomment>WhatsNewDialog body text preceding the changelog URL</extracomment>
</message>
<message>
<source>Random</source>
Expand Down
2 changes: 1 addition & 1 deletion manifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
title=Jellyfin
major_version=2
minor_version=0
build_version=5
build_version=7

### Main Menu Icons / Channel Poster Artwork

Expand Down
Loading

0 comments on commit 5ad10e3

Please sign in to comment.