From caa6686a44f15a2ec4a39f13dac5138d51e62113 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Fri, 4 Oct 2019 00:27:53 -0400 Subject: [PATCH 1/4] Update testing install and fix readability --- README.md | 93 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 65 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index e078afca..4331f060 100644 --- a/README.md +++ b/README.md @@ -1,53 +1,90 @@ # Jellyfin app for Roku -Disclaimer: This is not complete, but making good progress! +**This app is not complete!** -Right now the only things stored on your device are server name, server port, +Currently, the data stored on your Roku device are server name, server port, user id, and some user preferences like movie sort order. -At any point, the format that is used to save those settings could change, and -your data could be effectively lost (and you'll have to re-enter it). +The format that is used to save those settings could change at any time and +your data could be lost and you'd have to re-enter it. -In fact, it is likely this early on, as a few design decisions were made before -I knew much about BrightScript format. Patience is appreciated. +## Getting Started -### Images +Follow the steps below or checkout the [Development Guide For New Devs](DEVGUIDE.md) -With ImageMagick installed -``` -sh make_images.sh +### Developer Mode + +Put your Roku device in [developer mode](https://blog.roku.com/developer/2016/02/04/developer-setup-guide) + +### Clone the GitHub Repo + +Open a terminal and navigate to where you would like to install the app then run the commands below: + +```bash +https://github.com/jellyfin/jellyfin-roku.git +cd jellyfin-roku ``` -This will update the poster and splash images from the jellyfin-ux repo. +This will copy all of the application files to a new folder and then change directories -## Testing and Local Deployment -To test and deploy on your Roku device, it must be in [developer mode](https://blog.roku.com/developer/2016/02/04/developer-setup-guide) first. -Once there, set two environment variables that make uses. +### Login Details + +Run the commands below - Replacing the IP and password (using the info from the first step) ```bash export ROKU_DEV_TARGET=192.168.1.234 export ROKU_DEV_PASSWORD=aaaa ``` -This is the IP address of your roku and the password you set for the -rokudev account when you put your device in developer mode. +This will allow you to test your code without having to manually upload a .zip file every time -### Testing -Testing is done with the [Rooibos](https://github.com/georgejecook/rooibos/) library. -This works by including the tests in the deployment and then looking at telnet -for the test results. This testing library requires the [Rooibos Preprocessor](https://github.com/georgejecook/rooibosPreprocessor) -to create a few of the helper files used during the tests. This can be installed via: +### Download Images + +Install these packages: ```bash -npm install -g rooibos-preprocessor +sudo apt-get install imagemagick wget make nodejs npm ``` -`make test` will package up the application and tests and the deploy it to the Roku. Test results can be seen via `telnet ${ROKU_DEV_TARGET} 8085` +Then run this script to download the images from the jellyfin-ux repo: -### Deployment -To deploy the application to your local roku run `make install`. +```bash +sh make_images.sh +``` -This packages up the application, sends it to your Roku and launches it. +### Deploy -### [Development Guide](DEVGUIDE.md) -Additional notes and instructions to help new developers get started: [Development Guide For New Devs](DEVGUIDE.md) +Run this: + +```bash +make install +``` + +This packages up the application, sends it to your Roku, and launches the channel. + +### Testing + +Testing is done with the [Rooibos](https://github.com/georgejecook/rooibos/) library. + +This works by including the tests in the deployment and then looking at telnet +for the test results. To use the testing library you need to install [rooibos-cli](https://github.com/georgejecook/rooibos-cli): + +Run this in the root app directory: + +```bash +npm install -g rooibos-cli +``` + +To deploy the application with tests: + +```bash +make test +``` + +To see test results and crash reports: + +```bash +telnet ${ROKU_DEV_TARGET} 8085 +``` + +To exit telnet: `CTRL + ]` and then type `quit + ENTER` From fb4f6492ef2e7ae9473547250b1a668fcb08c0b6 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Fri, 4 Oct 2019 00:31:52 -0400 Subject: [PATCH 2/4] Revert "Update testing install and fix readability" This reverts commit caa6686a44f15a2ec4a39f13dac5138d51e62113. --- README.md | 87 ++++++++++++++++--------------------------------------- 1 file changed, 25 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index 4331f060..e078afca 100644 --- a/README.md +++ b/README.md @@ -1,90 +1,53 @@ # Jellyfin app for Roku -**This app is not complete!** +Disclaimer: This is not complete, but making good progress! -Currently, the data stored on your Roku device are server name, server port, +Right now the only things stored on your device are server name, server port, user id, and some user preferences like movie sort order. -The format that is used to save those settings could change at any time and -your data could be lost and you'd have to re-enter it. +At any point, the format that is used to save those settings could change, and +your data could be effectively lost (and you'll have to re-enter it). -## Getting Started +In fact, it is likely this early on, as a few design decisions were made before +I knew much about BrightScript format. Patience is appreciated. -Follow the steps below or checkout the [Development Guide For New Devs](DEVGUIDE.md) +### Images -### Developer Mode - -Put your Roku device in [developer mode](https://blog.roku.com/developer/2016/02/04/developer-setup-guide) - -### Clone the GitHub Repo - -Open a terminal and navigate to where you would like to install the app then run the commands below: - -```bash -https://github.com/jellyfin/jellyfin-roku.git -cd jellyfin-roku +With ImageMagick installed +``` +sh make_images.sh ``` -This will copy all of the application files to a new folder and then change directories +This will update the poster and splash images from the jellyfin-ux repo. -### Login Details - -Run the commands below - Replacing the IP and password (using the info from the first step) +## Testing and Local Deployment +To test and deploy on your Roku device, it must be in [developer mode](https://blog.roku.com/developer/2016/02/04/developer-setup-guide) first. +Once there, set two environment variables that make uses. ```bash export ROKU_DEV_TARGET=192.168.1.234 export ROKU_DEV_PASSWORD=aaaa ``` -This will allow you to test your code without having to manually upload a .zip file every time - -### Download Images - -Install these packages: - -```bash -sudo apt-get install imagemagick wget make nodejs npm -``` - -Then run this script to download the images from the jellyfin-ux repo: - -```bash -sh make_images.sh -``` - -### Deploy - -Run this: - -```bash -make install -``` - -This packages up the application, sends it to your Roku, and launches the channel. +This is the IP address of your roku and the password you set for the +rokudev account when you put your device in developer mode. ### Testing - Testing is done with the [Rooibos](https://github.com/georgejecook/rooibos/) library. - This works by including the tests in the deployment and then looking at telnet -for the test results. To use the testing library you need to install [rooibos-cli](https://github.com/georgejecook/rooibos-cli): - -Run this in the root app directory: +for the test results. This testing library requires the [Rooibos Preprocessor](https://github.com/georgejecook/rooibosPreprocessor) +to create a few of the helper files used during the tests. This can be installed via: ```bash -npm install -g rooibos-cli +npm install -g rooibos-preprocessor ``` -To deploy the application with tests: +`make test` will package up the application and tests and the deploy it to the Roku. Test results can be seen via `telnet ${ROKU_DEV_TARGET} 8085` -```bash -make test -``` +### Deployment +To deploy the application to your local roku run `make install`. -To see test results and crash reports: +This packages up the application, sends it to your Roku and launches it. -```bash -telnet ${ROKU_DEV_TARGET} 8085 -``` - -To exit telnet: `CTRL + ]` and then type `quit + ENTER` +### [Development Guide](DEVGUIDE.md) +Additional notes and instructions to help new developers get started: [Development Guide For New Devs](DEVGUIDE.md) From 8e35721e7cb56b30beee52df843d1255ae6b16c5 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Fri, 4 Oct 2019 00:34:57 -0400 Subject: [PATCH 3/4] Update testing install and fix readability --- README.md | 89 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 61 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index e078afca..cd52a6e0 100644 --- a/README.md +++ b/README.md @@ -1,53 +1,86 @@ # Jellyfin app for Roku -Disclaimer: This is not complete, but making good progress! +**This app is not complete!** -Right now the only things stored on your device are server name, server port, +Currently, the data stored on your Roku device are server name, server port, user id, and some user preferences like movie sort order. -At any point, the format that is used to save those settings could change, and -your data could be effectively lost (and you'll have to re-enter it). +The format that is used to save those settings could change at any time and +your data could be lost and you'd have to re-enter it. -In fact, it is likely this early on, as a few design decisions were made before -I knew much about BrightScript format. Patience is appreciated. +## Getting Started -### Images +Follow the steps below or checkout the [Development Guide For New Devs](DEVGUIDE.md) -With ImageMagick installed -``` -sh make_images.sh +### Developer Mode + +Put your Roku device in [developer mode](https://blog.roku.com/developer/2016/02/04/developer-setup-guide) + +### Clone the GitHub Repo + +Copy all of the application files to a new folder and then change directories: + +```bash +https://github.com/jellyfin/jellyfin-roku.git +cd jellyfin-roku ``` -This will update the poster and splash images from the jellyfin-ux repo. +### Login Details -## Testing and Local Deployment -To test and deploy on your Roku device, it must be in [developer mode](https://blog.roku.com/developer/2016/02/04/developer-setup-guide) first. -Once there, set two environment variables that make uses. +Run the commands below - Replacing the IP and password (using the info from the first step) ```bash export ROKU_DEV_TARGET=192.168.1.234 export ROKU_DEV_PASSWORD=aaaa ``` -This is the IP address of your roku and the password you set for the -rokudev account when you put your device in developer mode. +This will allow you to test your code without having to manually upload a .zip file every time -### Testing -Testing is done with the [Rooibos](https://github.com/georgejecook/rooibos/) library. -This works by including the tests in the deployment and then looking at telnet -for the test results. This testing library requires the [Rooibos Preprocessor](https://github.com/georgejecook/rooibosPreprocessor) -to create a few of the helper files used during the tests. This can be installed via: +### Download Images + +Install these packages: ```bash -npm install -g rooibos-preprocessor +sudo apt-get install imagemagick wget make nodejs npm ``` -`make test` will package up the application and tests and the deploy it to the Roku. Test results can be seen via `telnet ${ROKU_DEV_TARGET} 8085` +Then run this script to download the images from the jellyfin-ux repo: -### Deployment -To deploy the application to your local roku run `make install`. +```bash +sh make_images.sh +``` -This packages up the application, sends it to your Roku and launches it. +### Deploy -### [Development Guide](DEVGUIDE.md) -Additional notes and instructions to help new developers get started: [Development Guide For New Devs](DEVGUIDE.md) +This packages up the application, sends it to your Roku, and launches the channel: + +```bash +make install +``` + +### Testing + +Testing is done with the [Rooibos](https://github.com/georgejecook/rooibos/) library. + +This works by including the tests in the deployment and then looking at telnet +for the test results. To use the testing library you need to install [rooibos-cli](https://github.com/georgejecook/rooibos-cli): + +Run this in the root app directory: + +```bash +npm install -g rooibos-cli +``` + +To deploy the application with tests: + +```bash +make test +``` + +To see test results and crash reports: + +```bash +telnet ${ROKU_DEV_TARGET} 8085 +``` + +To exit telnet: `CTRL + ]` and then type `quit + ENTER` From 045f54f2437b65510d47236cbc244dba08889f5a Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Sat, 5 Oct 2019 00:53:40 -0400 Subject: [PATCH 4/4] Add image script to Makefile --- Makefile | 4 ++-- app.mk | 33 ++++++++++++++++++++++++++++++++- make_images.sh | 35 ----------------------------------- 3 files changed, 34 insertions(+), 38 deletions(-) delete mode 100644 make_images.sh diff --git a/Makefile b/Makefile index bdb80da1..8e8f8346 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ ZIP_EXCLUDE= -x rooibos/**\* -x xml/* -x artwork/* -x \*.pkg -x storeassets\* -x include app.mk -test: prep_staging prep_tests remove install +test: get_images prep_staging prep_tests remove install echo "Running tests" -deploy: prep_staging remove install +deploy: get_images prep_staging remove install diff --git a/app.mk b/app.mk index 1e1c82cf..1b2706ae 100644 --- a/app.mk +++ b/app.mk @@ -41,6 +41,11 @@ IMPORTCLEANUP = $(foreach f,$(IMPORTS),$(APPSOURCEDIR)/$f.brs) GITCOMMIT = $(shell git rev-parse --short HEAD) BUILDDATE = $(shell date -u | awk '{ print $$2,$$3,$$6,$$4 }') +BRANDING_ROOT = https://raw.githubusercontent.com/jellyfin/jellyfin-ux/master/branding/SVG +ICON_SOURCE = icon-transparent.svg +BANNER_SOURCE = banner-dark.svg +OUTPUT_DIR = ./images + ifdef ROKU_DEV_PASSWORD USERPASS = rokudev:$(ROKU_DEV_PASSWORD) else @@ -149,7 +154,7 @@ prep_tests: cp -r $(SOURCEREL)/tests/source/* $(STAGINGREL)/source/tests/;\ ./node_modules/.bin/rooibos-cli i tests/.rooibosrc.json -install: prep_staging package home +install: get_images prep_staging package home @echo "Installing $(APPNAME) to host $(ROKU_DEV_TARGET)" @$(CURLCMD) --user $(USERPASS) --digest -F "mysubmit=Install" -F "archive=@$(ZIPREL)/$(APPNAME).zip" -F "passwd=" http://$(ROKU_DEV_TARGET)/plugin_install | grep "//" | sed "s[[[" @@ -162,6 +167,32 @@ remove: curl -s -S -F "mysubmit=Delete" -F "archive=" -F "passwd=" http://$(ROKU_DEV_TARGET)/plugin_install | grep "//" | sed "s[[[" ; \ fi +get_images: + @if [ ! -d $(OUTPUT_DIR) ]; \ + then \ + mkdir -p $(OUTPUT_DIR); \ + echo "Creating images folder"; \ + fi + + @if [ -e $(ICON_SOURCE) ]; \ + then \ + echo "Images are already downloaded"; \ + else \ + echo "Downloading images from $(BRANDING_ROOT)"; \ + wget $(BRANDING_ROOT)/$(ICON_SOURCE) > /dev/null ; \ + wget $(BRANDING_ROOT)/$(BANNER_SOURCE) > /dev/null ; \ + echo "Finished downloading images"; \ + fi + @convert -background "#000b25" -gravity center -scale 535x400 -extent 540x405 $(BANNER_SOURCE) $(OUTPUT_DIR)/channel-poster_fhd.png + @convert -background "#000b25" -gravity center -scale 275x205 -extent 280x210 $(BANNER_SOURCE) $(OUTPUT_DIR)/channel-poster_hd.png + @convert -background "#000b25" -gravity center -scale 182x135 -extent 187x140 $(BANNER_SOURCE) $(OUTPUT_DIR)/channel-poster_sd.png + + @convert -background none -gravity center -scale 1000x48 -extent 180x48 $(BANNER_SOURCE) $(OUTPUT_DIR)/logo.png + + @convert -background "#000b25" -gravity center -scale 540x540 -extent 1920x1080 $(BANNER_SOURCE) $(OUTPUT_DIR)/splash-screen_fhd.jpg + @convert -background "#000b25" -gravity center -scale 360x360 -extent 1280x720 $(BANNER_SOURCE) $(OUTPUT_DIR)/splash-screen_hd.jpg + @convert -background "#000b25" -gravity center -scale 240x240 -extent 720x480 $(BANNER_SOURCE) $(OUTPUT_DIR)/splash-screen_sd.jpg + screenshot: SCREENSHOT_TIME=`date "+%s"`; \ curl -m 1 -o screenshot.jpg --user $(USERPASS) --digest "http://$(ROKU_DEV_TARGET)/pkgs/dev.jpg?time=$$SCREENSHOT_TIME" -H 'Accept: image/png,image/*;q=0.8,*/*;q=0.5' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate' diff --git a/make_images.sh b/make_images.sh deleted file mode 100644 index 1a371bac..00000000 --- a/make_images.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -BRANDING_ROOT=https://raw.githubusercontent.com/jellyfin/jellyfin-ux/master/branding/SVG - -ICON_SOURCE=icon-transparent.svg -BANNER_SOURCE=banner-dark.svg - -OUTPUT_DIR=./images - -[ ! -d $OUTPUT_DIR ] && mkdir -p $OUTPUT_DIR - -# Don't need to keep re-downloading things we already have -if [ ! -e $ICON_SOURCE ]; then - wget $BRANDING_ROOT/$ICON_SOURCE > /dev/null - wget $BRANDING_ROOT/$BANNER_SOURCE > /dev/null -fi - -# Channel Posters -convert -background "#000b25" -gravity center -scale 535x400 -extent 540x405 $BANNER_SOURCE $OUTPUT_DIR/channel-poster_fhd.png -convert -background "#000b25" -gravity center -scale 275x205 -extent 280x210 $BANNER_SOURCE $OUTPUT_DIR/channel-poster_hd.png -convert -background "#000b25" -gravity center -scale 182x135 -extent 187x140 $BANNER_SOURCE $OUTPUT_DIR/channel-poster_sd.png - -# Overhang icon -convert -background none -gravity center -scale 1000x48 -extent 180x48 $BANNER_SOURCE $OUTPUT_DIR/logo.png - -# Splash screens -convert -background "#000b25" -gravity center -scale 540x540 -extent 1920x1080 $BANNER_SOURCE $OUTPUT_DIR/splash-screen_fhd.jpg -convert -background "#000b25" -gravity center -scale 360x360 -extent 1280x720 $BANNER_SOURCE $OUTPUT_DIR/splash-screen_hd.jpg -convert -background "#000b25" -gravity center -scale 240x240 -extent 720x480 $BANNER_SOURCE $OUTPUT_DIR/splash-screen_sd.jpg - -# Figure out when we want to clean up after ourselves -if [ "$skip" = "true" ]; then - rm $ICON_SOURCE - rm $BANNER_SOURCE -fi