diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b44dda46..d53a8e72 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/master-release.yml b/.github/workflows/master-release.yml index 563c002e..3c9337fc 100644 --- a/.github/workflows/master-release.yml +++ b/.github/workflows/master-release.yml @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/unstable-release.yml b/.github/workflows/unstable-release.yml index c038600a..a911782e 100644 --- a/.github/workflows/unstable-release.yml +++ b/.github/workflows/unstable-release.yml @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 51d0210b..9ca7ff82 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -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 diff --git a/components/ItemGrid/GridItem.brs b/components/ItemGrid/GridItem.brs index ba02bb6c..162db0b9 100644 --- a/components/ItemGrid/GridItem.brs +++ b/components/ItemGrid/GridItem.brs @@ -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" @@ -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 diff --git a/components/ItemGrid/GridItem.xml b/components/ItemGrid/GridItem.xml index c9c419e0..4b8b27ea 100644 --- a/components/ItemGrid/GridItem.xml +++ b/components/ItemGrid/GridItem.xml @@ -1,9 +1,13 @@ - + - + + + + diff --git a/components/ItemGrid/GridItemSmall.brs b/components/ItemGrid/GridItemSmall.brs index 776e496f..24b21bdc 100644 --- a/components/ItemGrid/GridItemSmall.brs +++ b/components/ItemGrid/GridItemSmall.brs @@ -1,7 +1,9 @@ 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") @@ -9,22 +11,32 @@ sub init() '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" @@ -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" diff --git a/components/ItemGrid/GridItemSmall.xml b/components/ItemGrid/GridItemSmall.xml index 6e2f9b1d..87423da4 100644 --- a/components/ItemGrid/GridItemSmall.xml +++ b/components/ItemGrid/GridItemSmall.xml @@ -3,12 +3,13 @@ + - +