Skip to content

Commit

Permalink
Merge branch 'unstable' into CreateUnitTestSuite
Browse files Browse the repository at this point in the history
  • Loading branch information
1hitsong authored Feb 1, 2023
2 parents 538d915 + c300e18 commit d8bc511
Show file tree
Hide file tree
Showing 75 changed files with 10,218 additions and 581 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ on:
- 'locale/**'
jobs:
run:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
node-version: "14.12.0"
node-version: "18.13.0"
- run: npm ci
- run: npx ropm install
- run: make dev
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
with:
name: Jellyfin-Roku-dev-${{ github.sha }}
path: ${{ github.workspace }}/out/staging
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/master-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ on:

jobs:
test-build-release:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "14.12.0"
node-version: "18.13.0"
- run: npm ci
- run: npx ropm install
- run: npm run validate
Expand All @@ -22,7 +22,7 @@ jobs:
run: awk 'BEGIN { FS="=" } /^minor_version/ { print "MINOR="$2; }' manifest >> $GITHUB_ENV
- name: "Find and save build_version from manifest"
run: awk 'BEGIN { FS="=" } /^build_version/ { print "BUILD="$2; }' manifest >> $GITHUB_ENV
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: vimtor/action-zip@5f1c4aa587ea41db1110df6a99981dbe19cee310 # tag=v1
with:
recursive: false
Expand All @@ -36,7 +36,7 @@ jobs:
prerelease: false
title: v${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.BUILD }}
files: ${{ github.workspace }}/jellyfin_v${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.BUILD }}.zip
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
with:
name: jellyfin_v${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.BUILD }}.zip
path: ${{ github.workspace }}/jellyfin_v${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.BUILD }}.zip
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/unstable-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ on:

jobs:
test-build-release:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "14.12.0"
node-version: "18.13.0"
- run: npm ci
- run: npx ropm install
- run: npm run validate
Expand All @@ -22,7 +22,7 @@ jobs:
run: awk 'BEGIN { FS="=" } /^minor_version/ { print "MINOR="$2; }' manifest >> $GITHUB_ENV
- name: "Find and save build_version from manifest"
run: awk 'BEGIN { FS="=" } /^build_version/ { print "BUILD="$2; }' manifest >> $GITHUB_ENV
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: vimtor/action-zip@5f1c4aa587ea41db1110df6a99981dbe19cee310 # tag=v1
with:
recursive: false
Expand All @@ -35,7 +35,7 @@ jobs:
prerelease: true
title: v${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.BUILD }}
files: ${{ github.workspace }}/jellyfin_v${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.BUILD }}.zip
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
with:
name: jellyfin_v${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.BUILD }}.zip
path: ${{ github.workspace }}/jellyfin_v${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.BUILD }}.zip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ on: [push, pull_request]

jobs:
run:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "14.12.0"
node-version: "18.13.0"
- run: npm ci
- run: npx ropm install
- run: npm run validate
Expand Down
10 changes: 10 additions & 0 deletions components/ItemGrid/GridItem.brs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ sub init()

m.itemPoster.observeField("loadStatus", "onPosterLoadStatusChanged")

m.unplayedCount = m.top.findNode("unplayedCount")
m.unplayedEpisodeCount = m.top.findNode("unplayedEpisodeCount")

m.itemText.translation = [0, m.itemPoster.height + 7]

m.alwaysShowTitles = get_user_setting("itemgrid.alwaysShowTitles") = "true"
Expand Down Expand Up @@ -40,6 +43,13 @@ sub itemContentChanged()
m.itemIcon.uri = itemData.iconUrl
m.itemText.text = itemData.Title
else if itemData.type = "Series"
if itemData?.json?.UserData?.UnplayedItemCount <> invalid
if itemData.json.UserData.UnplayedItemCount > 0
m.unplayedCount.visible = true
m.unplayedEpisodeCount.text = itemData.json.UserData.UnplayedItemCount
end if
end if

m.itemPoster.uri = itemData.PosterUrl
m.itemIcon.uri = itemData.iconUrl
m.itemText.text = itemData.Title
Expand Down
8 changes: 6 additions & 2 deletions components/ItemGrid/GridItem.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<component name="GridItem" extends="Group">
<children>
<maskGroup id="posterMask" maskUri="pkg:/images/postermask.png" scaleRotateCenter="[145, 212.5]" scale="[0.85,0.85]" >
<maskGroup id="posterMask" maskUri="pkg:/images/postermask.png" scaleRotateCenter="[145, 212.5]" scale="[0.85,0.85]">
<Poster id="backdrop" width="290" height="425" loadDisplayMode="scaleToZoom" uri="pkg:/images/white.9.png" />
<Poster id="itemPoster" width="290" height="425" loadDisplayMode="scaleToZoom" />
<Poster id="itemPoster" width="290" height="425" loadDisplayMode="scaleToZoom">
<Rectangle id="unplayedCount" visible="false" width="90" height="60" color="#00a4dcFF" translation="[201, 0]">
<Label id="unplayedEpisodeCount" width="90" height="60" font="font:SmallestBoldSystemFont" horizAlign="center" vertAlign="center" />
</Rectangle>
</Poster>
<Poster id="itemIcon" width="50" height="50" translation="[230,10]" />
<Label id="posterText" width="280" height="415" translation="[5,5]" horizAlign="center" vertAlign="center" ellipsizeOnBoundary="true" wrap="true" />
</maskGroup>
Expand Down
28 changes: 27 additions & 1 deletion components/ItemGrid/GridItemSmall.brs
Original file line number Diff line number Diff line change
@@ -1,30 +1,42 @@
sub init()
m.itemPoster = m.top.findNode("itemPoster")
m.posterText = m.top.findNode("posterText")
m.title = m.top.findNode("title")
m.posterText.font.size = 30
m.title.font.size = 25
m.backdrop = m.top.findNode("backdrop")

m.itemPoster.observeField("loadStatus", "onPosterLoadStatusChanged")

'Parent is MarkupGrid and it's parent is the ItemGrid
m.topParent = m.top.GetParent().GetParent()

m.title.visible = false

'Get the imageDisplayMode for these grid items
if m.topParent.imageDisplayMode <> invalid
m.itemPoster.loadDisplayMode = m.topParent.imageDisplayMode
end if

end sub

sub itemContentChanged()
m.backdrop.blendColor = "#101010"

m.title.visible = false

if isValid(m.topParent.showItemTitles)
if LCase(m.topParent.showItemTitles) = "showalways"
m.title.visible = true
end if
end if

itemData = m.top.itemContent

if not isValid(itemData) then return

m.itemPoster.uri = itemData.PosterUrl
m.posterText.text = itemData.title
m.title.text = itemData.title

'If Poster not loaded, ensure "blue box" is shown until loaded
if m.itemPoster.loadStatus <> "ready"
Expand All @@ -33,6 +45,20 @@ sub itemContentChanged()
end if
end sub

sub focusChanged()
if m.top.itemHasFocus = true
m.title.repeatCount = -1
else
m.title.repeatCount = 0
end if

if isValid(m.topParent.showItemTitles)
if LCase(m.topParent.showItemTitles) = "showonhover"
m.title.visible = m.top.itemHasFocus
end if
end if
end sub

'Hide backdrop and text when poster loaded
sub onPosterLoadStatusChanged()
if m.itemPoster.loadStatus = "ready"
Expand Down
3 changes: 2 additions & 1 deletion components/ItemGrid/GridItemSmall.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
<children>
<Poster id="backdrop" translation="[0,15]" width="230" height="320" loadDisplayMode="scaleToZoom" uri="pkg:/images/white.9.png" />
<Poster id="itemPoster" translation="[0,15]" width="230" height="320" loadDisplayMode="scaleToZoom" />
<ScrollingLabel translation="[0,340]" id="title" horizAlign="center" font="font:SmallSystemFont" repeatCount="0" maxWidth="230" />
<Poster id="itemIcon" width="50" height="50" translation="[230,10]" />
<Label id="posterText" width="230" height="320" translation="[5,5]" horizAlign="center" vertAlign="center" ellipsizeOnBoundary="true" wrap="true" />
</children>
<interface>
<field id="itemContent" type="node" onChange="itemContentChanged" />
<field id="itemHasFocus" type="boolean" onChange="focusChanged" />
<field id="itemHasFocus" type="boolean" onChange="focusChanged" alwaysNotify="true" />
</interface>
<script type="text/brightscript" uri="GridItemSmall.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
Expand Down
Loading

0 comments on commit d8bc511

Please sign in to comment.