From 1e6334d7bd55698cea6a8e257edc8465057919b7 Mon Sep 17 00:00:00 2001 From: taylorbourne Date: Wed, 3 Nov 2021 17:03:49 -0700 Subject: [PATCH] feat: make lazy stream host name configurable (#72) * run raw plex curl request * update sample env file * parse raw chrome curl req * update cronjob * use post request to update plex * oops * feat: make lazystream host configurable * feat: update xml template * fix: revert plex update changes for now (needs more testing) * feat: update readme --- README.md | 4 ++++ root/etc/cont-init.d/50-update-hosts | 2 +- xteve_lazystream.xml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5fc26c9..0eca016 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,10 @@ or see [docker-compose.yml](docker-compose.yml) for an example docker-compose se Defaults & behavior can be changed through environment variables. `sample.env` should be renamed to `.env` and supplied through the `--env-file` docker run option. The `.env` file can also be picked up if using this in a `docker compose` setup. +### IMPORTANT + +You _MUST_ set the environment variable `lazyStreamHost` otherwise LazyStream will _not_ work. + ## Cron schedule By default, the cron job is scheduled to run every hour. A custom cron schedule can be specified by renaming the `sample_cron.txt` file in the `/config` volume to `cron.txt` and editing the schedule. Make sure to restart your container to take effect. diff --git a/root/etc/cont-init.d/50-update-hosts b/root/etc/cont-init.d/50-update-hosts index 9919717..8615ae4 100644 --- a/root/etc/cont-init.d/50-update-hosts +++ b/root/etc/cont-init.d/50-update-hosts @@ -10,7 +10,7 @@ exec 1> >(prepend "[update-hosts] ") # Update hosts file -export IP=$(getent ahostsv4 freesports.ddns.net | awk '{ print $1 }' | head -1) +export IP=$(getent ahostsv4 "$lazyStreamHost" | awk '{ print $1 }' | head -1) echo $IP playback.svcs.mlb.com >> /etc/hosts echo $IP mf.svc.nhl.com >> /etc/hosts diff --git a/xteve_lazystream.xml b/xteve_lazystream.xml index 1b5e4c8..a3ecabf 100644 --- a/xteve_lazystream.xml +++ b/xteve_lazystream.xml @@ -172,6 +172,7 @@ /mnt/user/appdata/xteve/playlists/ yes yes + yes yes yes