Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/unstable' into multichannel
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert committed Nov 3, 2023
2 parents 6748b81 + c0a453b commit 73203fa
Show file tree
Hide file tree
Showing 406 changed files with 354,923 additions and 973 deletions.
26 changes: 26 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
changelog:
categories:
- title: 🆕 New Features
labels:
- "new feature"
- title: 🔨 Updated Features
labels:
- "updated feature"
- title: ⚙️ New Settings
labels:
- "new setting"
- title: 🔧 Updated Settings
labels:
- "updated setting"
- title: 🐛 Bug Fixes
labels:
- "bug fix"
- title: 🧹 Code Cleanup
labels:
- "code cleanup"
- title: ⭐ Additional Updates
labels:
- "*"
exclude:
labels:
- dependencies
1 change: 1 addition & 0 deletions .github/workflows/auto-close-stale-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:

jobs:
stale:
if: github.repository == 'jellyfin/jellyfin-roku'
runs-on: ubuntu-latest
permissions:
pull-requests: write
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/automations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

jobs:
project:
if: github.repository == 'jellyfin/jellyfin-roku'
name: Project board 📊
runs-on: ubuntu-latest
steps:
Expand All @@ -23,6 +24,7 @@ jobs:
column: In progress
repo-token: ${{ secrets.JF_BOT_TOKEN }}
label:
if: github.repository == 'jellyfin/jellyfin-roku'
name: Labeling 🏷️
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
with:
node-version: "lts/*"
cache: "npm"
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: build-docs

on:
push:
branches:
- unstable

jobs:
docs:
if: github.repository == 'jellyfin/jellyfin-roku'
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
contents: write
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.JF_BOT_TOKEN }}
- name: Install NPM dependencies
run: npm ci
- name: Build API docs
# TODO: fix jsdoc build errors then remove '|| true' from run command below
run: npm run docs || true
- name: Commit any changes back to the unstable branch
uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5
with:
commit_message: Update API docs
# use jellyfin-bot to commit the changes instead of the default github-actions[bot]
commit_user_name: jellyfin-bot
commit_user_email: [email protected]
# use jellyfin-bot to author the changes instead of the default author of the merge commit
commit_author: jellyfin-bot <[email protected]>
8 changes: 4 additions & 4 deletions .github/workflows/build-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout master (the latest release)
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: master
- name: Install jq to parse json
Expand All @@ -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@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Save new package.json version
run: echo "newPackVersion=$(jq -r ".version" package.json)" >> $GITHUB_ENV
- name: package.json version must be updated
Expand Down Expand Up @@ -61,8 +61,8 @@ jobs:
prod:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
with:
node-version: "lts/*"
cache: "npm"
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/deploy-api-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Simple workflow for deploying static content to GitHub Pages
name: deploy-api-docs

on:
push:
branches: ["unstable"]
paths: ["docs/**"] # only run if the docs are updated

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
if: github.repository == 'jellyfin/jellyfin-roku'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Pages
uses: actions/configure-pages@f156874f8191504dae5b037505266ed5dda6c382 # v3
- name: Upload artifact
uses: actions/upload-pages-artifact@a753861a5debcf57bf8b404356158c8e1e33150c # v2
with:
# Only upload the api docs folder
path: "docs/api"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@9dbe3824824f8a1377b8e298bafde1a50ede43e5 # v2
6 changes: 3 additions & 3 deletions .github/workflows/roku-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
static:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
with:
node-version: "lts/*"
cache: "npm"
Expand All @@ -27,7 +27,7 @@ jobs:
if: env.BRANCH_NAME == 'master'
run: npm run build-prod
- name: Use Java 17
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3
with:
distribution: "temurin"
java-version: "17"
Expand Down
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"RokuCommunity.brightscript",
"AliceBeckett.brightscriptcomment",
"redhat.vscode-xml",
"davidanson.vscode-markdownlint"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}
}
34 changes: 20 additions & 14 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
{
"files.associations": {
"*.ts": "xml"
},
"[xml]": {
"editor.defaultFormatter": "redhat.vscode-xml"
},
"[markdown]": {
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
},
"xml.format.maxLineWidth": 0,
"editor.formatOnSave": true,
"brightscript.output.hyperlinkFormat": "FilenameAndFunction",
"brightscript.bsdk": "node_modules/brighterscript"
}
"files.associations": {
"*.ts": "xml"
},
"[xml]": {
"editor.defaultFormatter": "redhat.vscode-xml"
},
"[markdown]": {
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
},
"xml.format.maxLineWidth": 0,
"editor.formatOnSave": true,
"brightscript.output.hyperlinkFormat": "FilenameAndFunction",
"brightscript.bsdk": "node_modules/brighterscript",
"search.exclude": {
"**/.git": true,
"**/node_modules": true,
"docs/api/**": true
},
"brightscriptcomment.addExtraAtStartAndEnd": false
}
126 changes: 106 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,114 @@

#########################################################################
# Makefile Usage:
#
# 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
# address of your Roku box. (e.g. export ROKU_DEV_TARGET=192.168.1.1.
# Set in your this variable in your shell startup (e.g. .bashrc)
# 3) and set up the ROKU_DEV_PASSWORD environment variable, too
##########################################################################
# Need curl and npm in your $PATH
# If you want to get_images, you'll also need convert from ImageMagick
##########################################################################

VERSION := 1.6.6

## usage

.PHONY: help
help:
@echo "targets"
@echo " build-dev build development package"
@echo " build-prod build production package"
@echo " build-tests build tests package"
@echo " format format brighscripts"
@echo " lint lint code and documentation"
@echo " get_images update official jellyfin images"
@echo "targets needing ROKU_DEV_TARGET"
@echo " home press the home button on device"
@echo " launch launch installed"
@echo "targets needing ROKU_DEV_TARGET and ROKU_DEV_PASSWORD"
@echo " install install on device"
@echo " remove remove installed from device"
@echo " screenshot take a screenshot"
@echo " deploy lint, remove, install"
@echo "environment"
@echo " ROKU_DEV_TARGET with device's IP"
@echo " ROKU_DEV_PASSWORD with device's password"

## development

BUILT_PKG := out/$(notdir $(CURDIR)).zip

node_modules/: package-lock.json; npm ci

.PHONY: build-dev build-prod build-tests
.NOTPARALLEL: build-dev build-prod build-tests # output to the same file
build-dev: node_modules/; npm run build
build-prod: node_modules/; npm run build-prod
build-tests: node_modules/; npm run build-tests

# default to build-dev if file doesn't exist
$(BUILT_PKG):; $(MAKE) build-dev

.PHONY: format
format: node_modules/; npm run format

.PHONY: lint
lint: node_modules/; npm run lint

## roku box

CURL_CMD ?= curl --show-error

ifdef ROKU_DEV_TARGET

.PHONY: home launch
home:
$(CURL_CMD) -XPOST http://$(ROKU_DEV_TARGET):8060/keypress/home
sleep 2 # wait for device reaction
launch:
$(CURL_CMD) -XPOST http://$(ROKU_DEV_TARGET):8060/launch/dev

ifdef ROKU_DEV_PASSWORD

CURL_LOGGED_CMD := $(CURL_CMD) --user rokudev:$(ROKU_DEV_PASSWORD) --digest

EXTRACT_ERROR_CMD := grep "<font color" | sed "s/<font color=\"red\">//" | sed "s[</font>[["
.PHONY: install remove
install: $(BUILT_PKG) home
$(CURL_LOGGED_CMD) -F "mysubmit=Install" -F "archive=@$<" -F "passwd=" http://$(ROKU_DEV_TARGET)/plugin_install | $(EXTRACT_ERROR_CMD)
$(MAKE) launch
remove:
$(CURL_LOGGED_CMD) -F "mysubmit=Delete" -F "archive=" -F "passwd=" http://$(ROKU_DEV_TARGET)/plugin_install | $(EXTRACT_ERROR_CMD)

.PHONY: screenshot
screenshot:
$(CURL_LOGGED_CMD) -o screenshot.jpg "http://$(ROKU_DEV_TARGET)/pkgs/dev.jpg"

.PHONY: deploy
.NOTPARALLEL: deploy
deploy: lint remove install

endif # ROKU_DEV_PASSWORD

APPNAME = Jellyfin_Roku
VERSION = 1.6.6
endif # ROKU_DEV_TARGET

ZIP_EXCLUDE= -x xml/* -x artwork/* -x \*.pkg -x storeassets\* -x keys\* -x \*/.\* -x *.git* -x *.DS* -x *.pkg* -x dist/**\* -x out/**\*
## sync branding

include app.mk
CONVERT_CMD ?= convert -gravity center
CONVERT_BLUEBG_CMD := $(CONVERT_CMD) -background "\#000b25"
BANNER := images/banner-dark.svg
ICON := images/icon-transparent.svg

dev:
$(MAKE) BUILD='dev' package
images/:; mkdir $@

beta:
$(MAKE) BUILD='beta' package
.PHONY: redo # force rerun
$(BANNER) $(ICON): images/ redo
$(CURL_CMD) https://raw.githubusercontent.com/jellyfin/jellyfin-ux/master/branding/SVG/$(@F) > $@

release:
$(MAKE) BUILD='release' package
images/logo.png: $(BANNER); $(CONVERT_CMD) -background none -scale 1000x48 -extent 180x48 $< $@
images/channel-poster_fhd.png: $(BANNER); $(CONVERT_BLUEBG_CMD) -scale 535x400 -extent 540x405 $< $@
images/channel-poster_hd.png: $(BANNER); $(CONVERT_BLUEBG_CMD) -scale 275x205 -extent 336x210 $< $@
images/channel-poster_sd.png: $(BANNER); $(CONVERT_BLUEBG_CMD) -scale 182x135 -extent 246x140 $< $@
images/splash-screen_fhd.jpg: $(BANNER); $(CONVERT_BLUEBG_CMD) -scale 540x540 -extent 1920x1080 $< $@
images/splash-screen_hd.jpg: $(BANNER); $(CONVERT_BLUEBG_CMD) -scale 360x360 -extent 1280x720 $< $@
images/splash-screen_sd.jpg: $(BANNER); $(CONVERT_BLUEBG_CMD) -scale 240x240 -extent 720x480 $< $@

deploy: prep_staging remove install
.PHONY: get_images
get_images: $(ICON)
get_images: images/logo.png
get_images: images/channel-poster_fhd.png images/channel-poster_hd.png images/channel-poster_sd.png
get_images: images/splash-screen_fhd.jpg images/splash-screen_hd.jpg images/splash-screen_sd.jpg
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

[![Logo Banner](https://raw.githubusercontent.com/jellyfin/jellyfin-ux/master/branding/SVG/banner-logo-solid.svg?sanitize=true "Jellyfin")](https://jellyfin.org)

[![Code Documentation](https://img.shields.io/badge/Code%20Documentation-purple)](https://jellyfin.github.io/jellyfin-roku/)
[![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)
Expand Down Expand Up @@ -34,7 +35,7 @@ To test the latest features before they get released:
## Advanced

For more advanced deployment methods, access to crash logs, or to learn how to setup a developer environment so you can write some code yourself please read the [DEVGUIDE](DEVGUIDE.md).
For more advanced deployment methods, access to crash logs, or to learn how to setup a developer environment so you can write some code yourself please read the [DEVGUIDE](docs/DEVGUIDE.md).

## Feature Requests

Expand Down
Loading

0 comments on commit 73203fa

Please sign in to comment.