diff --git a/.github/workflows/auto-close-stale-pr.yml b/.github/workflows/auto-close-stale-pr.yml index 773c2c33..51d2e351 100644 --- a/.github/workflows/auto-close-stale-pr.yml +++ b/.github/workflows/auto-close-stale-pr.yml @@ -9,7 +9,7 @@ jobs: permissions: pull-requests: write steps: - - uses: actions/stale@3de2653986ebd134983c79fe2be5d45cc3d9f4e1 # tag=v6 + - uses: actions/stale@5ebf00ea0e4c1561e9b43a292ed34424fb1d4578 # tag=v6 with: days-before-issue-stale: -1 days-before-issue-close: -1 @@ -17,4 +17,5 @@ jobs: close-pr-message: "This pull request has been closed because it has been inactive for 28 days. You may submit a new pull request if desired." days-before-pr-stale: 21 days-before-pr-close: 7 + exempt-draft-pr: true repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3c187c05..835665af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,14 +8,14 @@ jobs: run: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 - - uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 # tag=v3 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3 + - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 with: node-version: "14.12.0" - run: npm ci - run: npx ropm install - run: make dev - - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3 + - uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=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 b7387b6f..13e3eeb9 100644 --- a/.github/workflows/master-release.yml +++ b/.github/workflows/master-release.yml @@ -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@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # 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@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3 + - uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=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 979965c9..8317d290 100644 --- a/.github/workflows/unstable-release.yml +++ b/.github/workflows/unstable-release.yml @@ -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@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # 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@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3 + - uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=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/.gitignore b/.gitignore index c81cf067..3d5bcad8 100644 --- a/.gitignore +++ b/.gitignore @@ -12,11 +12,6 @@ roku_modules #NPM modules node_modules/ -#Rooibos generated -rooibosFunctionMap.brs -*/buildinfo.brs -logs - #Eclipse .buildpath .project diff --git a/DEVGUIDE.md b/DEVGUIDE.md index 6a41643d..14adc7bb 100644 --- a/DEVGUIDE.md +++ b/DEVGUIDE.md @@ -130,37 +130,12 @@ Modify code -> `make install` -> Use Roku remote to test changes -> `telnet ${RO Unfortunately there is no debuger. You will need to use telnet to see log statements, warnings, and error reports. You won't always need to telnet into your device but the workflow above is typical when you are new to Brightscript or are working on tricky code. -### Testing - -Testing is done with the [Rooibos](https://github.com/georgejecook/rooibos/) library. This works by including tests in the deployment and then looking at telnet -for the test results. - Install necessary packages: ```bash sudo apt-get install nodejs npm ``` -Install [rooibos-cli](https://github.com/georgejecook/rooibos-cli): - -```bash -npm install -g rooibos-cli -``` - -Deploy the application with tests: - -```bash -make test -``` - -View test results: - -```bash -telnet ${ROKU_DEV_TARGET} 8085 -``` - -To exit telnet: `CTRL + ]` and then type `quit + ENTER` - ### Committing Before commiting your code, please run: diff --git a/Makefile b/Makefile index 095a3d31..42c7e289 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,6 @@ ######################################################################### # Makefile Usage: -# > make test ' run all tests -# > make testFailures ' run all tests and show only failures # # 1) Make sure that you have the curl command line executable in your path # 2) Set the variable ROKU_DEV_TARGET in your environment to the IP @@ -12,11 +10,9 @@ ########################################################################## APPNAME = Jellyfin_Roku -VERSION = 1.6.1 -ROKU_TEST_ID = 1 -ROKU_TEST_WAIT_DURATION = 5 +VERSION = 1.6.2 -ZIP_EXCLUDE= -x rooibos/**\* -x xml/* -x artwork/* -x \*.pkg -x storeassets\* -x keys\* -x \*/.\* -x *.git* -x *.DS* -x *.pkg* -x dist/**\* -x out/**\* +ZIP_EXCLUDE= -x xml/* -x artwork/* -x \*.pkg -x storeassets\* -x keys\* -x \*/.\* -x *.git* -x *.DS* -x *.pkg* -x dist/**\* -x out/**\* include app.mk @@ -29,7 +25,4 @@ beta: release: $(MAKE) BUILD='release' package -test: prep_staging prep_tests remove install - echo "Running tests" - deploy: prep_staging remove install diff --git a/app.mk b/app.mk index ae43982f..9e09f21e 100644 --- a/app.mk +++ b/app.mk @@ -163,13 +163,6 @@ package: prep_staging @echo "*** packaging $(APPNAME)-$(BUILD) complete ***" -prep_tests: - @mkdir -p $(STAGINGREL)/components/tests/; \ - mkdir -p $(STAGINGREL)/source/tests/; \ - cp -r $(SOURCEREL)/tests/components/* $(STAGINGREL)/components/tests/;\ - cp -r $(SOURCEREL)/tests/source/* $(STAGINGREL)/source/tests/;\ - ./node_modules/.bin/rooibos-cli i tests/.rooibosrc.json - prep_commit: npm run format npm ci diff --git a/components/GetNextEpisodeTask.brs b/components/GetNextEpisodeTask.brs new file mode 100644 index 00000000..cc3be1ba --- /dev/null +++ b/components/GetNextEpisodeTask.brs @@ -0,0 +1,13 @@ +sub init() + m.top.functionName = "getNextEpisodeTask" +end sub + +sub getNextEpisodeTask() + m.nextEpisodeData = api_API().shows.getepisodes(m.top.showID, { + UserId: get_setting("active_user"), + StartItemId: m.top.videoID, + Limit: 2 + }) + + m.top.nextEpisodeData = m.nextEpisodeData +end sub diff --git a/components/GetNextEpisodeTask.xml b/components/GetNextEpisodeTask.xml new file mode 100644 index 00000000..4832d770 --- /dev/null +++ b/components/GetNextEpisodeTask.xml @@ -0,0 +1,12 @@ + + + + + + + + +