diff --git a/.github/workflows/build-dev.yml b/.github/workflows/build-dev.yml index 7957bffde..4e6632b73 100644 --- a/.github/workflows/build-dev.yml +++ b/.github/workflows/build-dev.yml @@ -12,19 +12,19 @@ jobs: dev: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 + - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3 with: node-version: "lts/*" cache: "npm" - name: NPM install run: npm ci - name: Install roku module dependencies - run: npx ropm install + run: npm run ropm - name: Build app run: npm run build - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3 with: name: Jellyfin-Roku-dev-${{ github.sha }} path: ${{ github.workspace }}/build/staging - if-no-files-found: error \ No newline at end of file + if-no-files-found: error diff --git a/.github/workflows/build-prod.yml b/.github/workflows/build-prod.yml index 78ca1be06..dc53f9e9d 100644 --- a/.github/workflows/build-prod.yml +++ b/.github/workflows/build-prod.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout master (the latest release) - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 with: ref: master - name: Install jq to parse json @@ -33,7 +33,7 @@ jobs: - name: Save old Makefile version run: awk 'BEGIN { FS=" = " } /^VERSION/ { print "oldMakeVersion="$2; }' Makefile >> $GITHUB_ENV - name: Checkout PR branch - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 - name: Save new package.json version run: echo "newPackVersion=$(jq -r ".version" package.json)" >> $GITHUB_ENV - name: package.json version must be updated @@ -61,19 +61,19 @@ jobs: prod: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 + - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3 with: node-version: "lts/*" cache: "npm" - name: NPM install run: npm ci - name: Install roku module dependencies - run: npx ropm install + run: npm run ropm - name: Build app for production run: npm run build-prod - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3 with: name: Jellyfin-Roku-v${{ env.newManVersion }}-${{ github.sha }} path: ${{ github.workspace }}/build/staging - if-no-files-found: error \ No newline at end of file + if-no-files-found: error diff --git a/README.md b/README.md index 08f540703..8ad689f2b 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ [![Build Status](https://img.shields.io/github/actions/workflow/status/jellyfin/jellyfin-roku/build-dev.yml?logo=github&branch=unstable "Build Status")](https://github.com/jellyfin/jellyfin-roku/actions/workflows/build-dev.yml?query=branch%3Aunstable) [![Current Release](https://img.shields.io/github/release/jellyfin/jellyfin-roku.svg?logo=github "Current Release")](https://github.com/jellyfin/jellyfin-roku/releases) [![Translation Status](https://translate.jellyfin.org/widgets/jellyfin/-/jellyfin-roku/svg-badge.svg "Translation Status")](https://translate.jellyfin.org/projects/jellyfin/jellyfin-roku/?utm_source=widget) +[![Forum](https://img.shields.io/badge/forum-MyBB-00A4DC "Check out our forum!")](https://forum.jellyfin.org/f-roku-development) [![Matrix](https://img.shields.io/matrix/jellyfin:matrix.org.svg?logo=matrix "Chat on Matrix")](https://matrix.to/#/#jellyfin-dev-roku:matrix.org) -[![Reddit](https://img.shields.io/badge/reddit-r%2Fjellyfin-%23FF5700.svg?logo=reddit "Join our Subreddit")](https://www.reddit.com/r/jellyfin) [![License](https://img.shields.io/github/license/jellyfin/jellyfin-roku.svg "GPL 2.0 License")](LICENSE) Jellyfin Roku is the official Jellyfin client for Roku devices. We welcome all contributions and pull requests! If you have a larger feature in mind please [open an issue](https://github.com/jellyfin/jellyfin-roku/issues/new?assignees=&labels=feature&template=feature_request.md&title=) so we can discuss the implementation before you start. diff --git a/components/GetPlaybackInfoTask.brs b/components/GetPlaybackInfoTask.brs index e183d7e33..0cd6374dd 100644 --- a/components/GetPlaybackInfoTask.brs +++ b/components/GetPlaybackInfoTask.brs @@ -88,6 +88,9 @@ function GetTranscodingStats(deviceSession) data = "• " + tr("Audio Channels") + ": " + Str(audioChannels) sessionStats.data.push(data) end if + else + sessionStats.data.push("
" + tr("Direct playing") + "
") + sessionStats.data.push("" + tr("The source file is entirely compatible with this client and the session is receiving the file without modifications.") + "") end if if havePlaybackInfo() diff --git a/components/ItemGrid/ItemGrid.brs b/components/ItemGrid/ItemGrid.brs index 70244eb8d..0cd567b54 100644 --- a/components/ItemGrid/ItemGrid.brs +++ b/components/ItemGrid/ItemGrid.brs @@ -137,7 +137,7 @@ sub loadInitialItems() if m.sortField = invalid then m.sortField = "SortName" if m.filter = invalid then m.filter = "All" - if sortAscendingStr = invalid or sortAscendingStr = "true" + if sortAscendingStr = invalid or sortAscendingStr = true m.sortAscending = true else m.sortAscending = false diff --git a/components/ItemGrid/LoadVideoContentTask.brs b/components/ItemGrid/LoadVideoContentTask.brs index 532f82501..5a200e386 100644 --- a/components/ItemGrid/LoadVideoContentTask.brs +++ b/components/ItemGrid/LoadVideoContentTask.brs @@ -276,13 +276,13 @@ sub LoadItems_AddVideoContent(video as object, mediaSourceId as dynamic, audio_s video.isTranscoded = true end if - video.content.setCertificatesFile("common:/certs/ca-bundle.crt") + setCertificateAuthority(video.content) video.audioTrack = (audio_stream_idx + 1).ToStr() ' Roku's track indexes count from 1. Our index is zero based video.SelectedSubtitle = subtitle_idx if not fully_external - video.content = authorize_request(video.content) + video.content = authRequest(video.content) end if print "video.directPlaySupported =", video.directPlaySupported @@ -291,12 +291,8 @@ end sub sub addVideoContentURL(video, mediaSourceId, audio_stream_idx, fully_external) protocol = LCase(m.playbackInfo.MediaSources[0].Protocol) if protocol <> "file" - uriRegex = CreateObject("roRegex", "^(.*:)//([A-Za-z0-9\-\.]+)(:[0-9]+)?(.*)$", "") - uri = uriRegex.Match(m.playbackInfo.MediaSources[0].Path) - ' proto $1, host $2, port $3, the-rest $4 - localhost = CreateObject("roRegex", "^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$", "i") - ' https://stackoverflow.com/questions/8426171/what-regex-will-match-all-loopback-addresses - if localhost.isMatch(uri[2]) + uri = parseUrl(m.playbackInfo.MediaSources[0].Path) + if isLocalhost(uri[2]) ' if the domain of the URI is local to the server, ' create a new URI by appending the received path to the server URL ' later we will substitute the users provided URL for this case diff --git a/components/data/TVEpisodeData.xml b/components/data/TVEpisodeData.xml index c4f984dbc..4c6713351 100644 --- a/components/data/TVEpisodeData.xml +++ b/components/data/TVEpisodeData.xml @@ -11,6 +11,7 @@ + diff --git a/components/liveTv/ProgramDetails.brs b/components/liveTv/ProgramDetails.brs index e171d43f1..3afe92ae3 100644 --- a/components/liveTv/ProgramDetails.brs +++ b/components/liveTv/ProgramDetails.brs @@ -92,7 +92,7 @@ sub setupLabels() m.recordSeriesOutline.height = recordSeriesButtonBackground.height m.userCanRecord = m.global.session.user.settings["livetv.canrecord"] - if m.userCanRecord = "false" + if m.userCanRecord = false m.recordButton.visible = false m.recordSeriesButton.visible = false end if diff --git a/components/movies/MovieDetails.brs b/components/movies/MovieDetails.brs index 7a14195d9..4f72b4783 100644 --- a/components/movies/MovieDetails.brs +++ b/components/movies/MovieDetails.brs @@ -9,8 +9,6 @@ sub init() m.options = m.top.findNode("movieOptions") m.infoGroup = m.top.findNode("infoGroup") - m.main_group = m.top.findNode("main_group") - main = m.top.findNode("main_group") main.translation = [96, 175] overview = m.top.findNode("overview") @@ -25,9 +23,6 @@ sub init() m.spinner = m.top.findNode("spinner") - m.trailerButton = m.top.findNode("trailer-button") - m.trailerButton.text = tr("Play Trailer") - m.top.observeField("itemContent", "itemContentChanged") end sub @@ -41,7 +36,18 @@ sub OnScreenShown() end sub sub trailerAvailableChanged() - m.trailerButton.visible = m.top.trailerAvailable + if m.top.trailerAvailable + ' add trailor button to button group + trailerButton = CreateObject("roSGNode", "JFButton") + trailerButton.id = "trailer-button" + trailerButton.text = tr("Play Trailer") + trailerButton.maxWidth = "300" + trailerButton.minWidth = "300" + m.buttonGrp.appendChild(trailerButton) + else + ' remove trailor button from button group + m.buttonGrp.removeChild(m.top.findNode("trailer-button")) + end if end sub sub itemContentChanged() diff --git a/components/movies/MovieDetails.xml b/components/movies/MovieDetails.xml index 86457cef6..cb850da0f 100644 --- a/components/movies/MovieDetails.xml +++ b/components/movies/MovieDetails.xml @@ -34,7 +34,6 @@