Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update master branch with new bugfixe #1790

Merged
merged 44 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
b65b3a2
Prevent crash when homesection setting is invalid
1hitsong Feb 13, 2024
bfc5400
Use variable for session user value
1hitsong Feb 13, 2024
cb2d27e
Merge pull request #1705 from 1hitsong/fixHomeSectionCrash
cewert Feb 13, 2024
89bb03a
Bump build version
jellyfin-bot Feb 13, 2024
fe49ea0
Merge pull request #1710 from jellyfin/bump-bugfix-to-205
cewert Feb 13, 2024
88e5399
Fix app crash by ensuring node is valid
cewert Feb 14, 2024
d2834c5
Validate global before using
cewert Feb 14, 2024
126f04d
Prevent crash by validating var before using
cewert Feb 14, 2024
2410769
Merge pull request #1712 from cewert/fix-crashlog
cewert Feb 14, 2024
76c4110
restore code that was removed by mistake
cewert Feb 14, 2024
c9f8be1
Merge branch '2.0.z' into fix-crashlog2
cewert Feb 14, 2024
1b0e644
change if statement styling
cewert Feb 14, 2024
bd7e66a
Merge pull request #1714 from cewert/fix-crashlog3
cewert Feb 15, 2024
d4d716e
Merge pull request #1713 from cewert/fix-crashlog2
cewert Feb 15, 2024
124e6e2
Auto stash before checking out "jellyfin/2.0.z"
1hitsong Feb 15, 2024
347a12a
Check length of property path
1hitsong Feb 16, 2024
41fdde7
Add unit tests for new helper functions
1hitsong Feb 17, 2024
9e5ec2f
Check if there is a next episode
1hitsong Feb 20, 2024
1861dea
Merge pull request #1718 from 1hitsong/noNextEpisode
cewert Feb 20, 2024
11ec2b4
Update Whats New Content for 2.0.5
1hitsong Feb 20, 2024
d077f9b
Merge pull request #1719 from 1hitsong/whatsNew
cewert Feb 20, 2024
4e57e06
Bump build version
jellyfin-bot Feb 20, 2024
af348b0
Merge pull request #1721 from jellyfin/bump-bugfix-to-206
cewert Feb 20, 2024
e7e485d
Merge pull request #1715 from 1hitsong/chainIsValid
1hitsong Feb 22, 2024
59c4abf
Pre-create rows to prevent race condition
1hitsong Mar 10, 2024
cdded49
Merge pull request #1740 from 1hitsong/homeRowOrder
1hitsong Mar 11, 2024
feb7f2c
Set resume start for TV Season list of episodes
1hitsong Feb 14, 2024
dec14de
Review Feedback
1hitsong Mar 16, 2024
b3549da
Use existing API call instead of new function. Set queue starting point
1hitsong Mar 16, 2024
bdb88d7
Merge pull request #1749 from 1hitsong/setTVEpisodeResumeValue
1hitsong Mar 19, 2024
02f4fa0
refresh movie detail screen
cewert Apr 7, 2024
04ffb0b
use java version 21
cewert Apr 11, 2024
c366db6
automate whatsnewdialog
cewert Apr 11, 2024
bedfb56
Merge pull request #1771 from cewert/refreshMovieDetail
cewert Apr 11, 2024
6f1a3ba
Merge pull request #1773 from cewert/fix-static-anal
cewert Apr 12, 2024
e12417b
Use scaleToZoom for user profile iamge
cewert Apr 24, 2024
5b20e79
Merge pull request #1782 from cewert/fix-user-profile-image
cewert Apr 26, 2024
e5c1261
Merge pull request #1774 from cewert/automate-whatsnew
cewert Apr 26, 2024
1ee307a
Bump build version
jellyfin-bot Apr 26, 2024
c5de5f5
Check if Queue contains Items
BotBlake Apr 27, 2024
29d2de1
Merge pull request #1785 from jellyfin/bump-bugfix-to-207
cewert Apr 27, 2024
091dcbc
Merge pull request #1787 from BotBlake/fix-freeze-on-actor-card-1789
cewert Apr 27, 2024
bd16624
Merge remote-tracking branch 'upstream/2.0.z' into master
cewert Apr 28, 2024
50d5d2a
Merge branch 'master' into sync-branches
cewert Jul 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading