android-tv-background

android-tv-background

Docker app from ninthwalker's Repository

Overview

Docker for adelatour11's androidtvbackground. Create background wallpapers from Plex/Jellyfin/TMDB/Trakt. Useful to use with alternative android tv launchers such as Projectivy
See full instructions: https://github.com/ninthwalker/androidtvbackground#docker-install-instructions

Android TV Background Docker

Dockerized version of androidtvbackground

Docker Install Instructions:

  • docker-compose.yml file is the preferred way

    1. Update the volume mapping to your local location for the config files as well as where the background images will be saved to. Backgrounds can be saved to within a subdir of the config location if you want them both in the same spot, or a different location.
    2. Set the env variables to 'True' for each of the scripts you want run. They are all set to False by default and will not run.
    3. Set the user to your hosts user uid/gid for volume mapping permissions. This allows the container to run as nonroot for better security.
    4. If you want to have the container stay started and create backgrounds on a schedule, set the cron to a cron format expression.
      ie: set CRON="0 0 * * *" to have the backgrounds created once a day at midnight. Set to 'False' to not use a schedule. Note that the time inside the container will be your hosts time in UTC.

    From within your docker-compose.yml directory, run:
    docker compose up -d

  • Alternative install is via docker run command line
    It would look something like this, depending on config options that you want:

    docker run -d --user 99:100 --name androidtvbackground -v /your/local/path/for/config:/config -v /your/local/path/for/backgrounds:/backgrounds -e PLEX=True -e JELLYFIN=False -e TMDB=True -e TRAKT=False -e POST_SCRIPT_PY=False -e POST_SCRIPT_SH=True -e CRON="0 0 * * *" ghcr.io/ninthwalker/androidtvbackground:latest
    
  • Unraid Installation

    1. This app is published within Unraid's community applications and can be directly installed from there.
  • The last install method is to build it yourself locally using the Dockerfile from this repo

    1. Clone this repo and extract contents
    2. From within the extracted folder, open a cmd prompt and run:
      docker build . -t androidtvbackground
    3. Once built, you can reference the local image in your docker-compose.yml file or your run cmd. A run cmd would look something like this, depending on config options that you want:
    docker run -d --user 99:100 --name androidtvbackground -v /your/local/path/for/config:/config -v /your/local/path/for/backgrounds:/backgrounds -e PLEX=True -e JELLYFIN=False -e TMDB=True -e TRAKT=False -e POST_SCRIPT_PY=False -e POST_SCRIPT_SH=True -e CRON="0 0 * * *" androidtvbackground
    

First run:

  • Script files will be copied into your mapped config volume on your host.
    1. Edit these according to the instructions
    2. Start the container again with: docker start androidtvbackground

Docker Usage Instructions:

  • Each script set to 'True' will run when the docker is started. If CRON is set to a schedule, the container will stay running and create backgrounds according to your CRON schedule.
  • If CRON is set to 'False', the container will stop after creating backgrounds and you will need to manually start it again to create more backgrounds with:
    docker start <name of docker>
    Note that backgrounds will always be created the first time the container starts, even when a cron schedule is set.

Docker Settings:

  • Scripts can be found in the container /config directory that should be mapped to your local system for access. Edit these files as per the instructions

    • user Set this to match the uid/gui permissions of your mapped volumes to correctly be able to access the scripts and background files.
    • PLEX: If set to True, retrieves backgrounds from your own Plex Server.
    • JELLYFIN: If set to True, retrieves backgrounds from your own Jellyfin Server.
    • TMDB: If set to True, retrieves backgrounds from The Movie Database
    • TRAKT: If set to True, retrieves plex backgrounds from Trakt
    • CRON: If set to a cron expression (ie: CRON="0 0 * * *") the docker will stay running and create backgrounds during the schedule you set. If you would rather manually start the docker to create backgrounds, set this to False
    • POST_SCRIPT_PY: If set to True, you can define your own python code in the 'post_script.py' file and it will be run at the end of the background creation.
    • POST_SCRIPT_SH: If set to True, you can define your own shell code in the 'post_script.sh' file and it will be run at the end of the background creation.
      • Useful to copy the files to a specific share, directly to android tv or a subreddit for example.
  • Note: that if you define both python and shell post_scripts, the python is run first and then the shell script.

  • Note 2: Make sure variable names are capitalized as shown in the above examples. ie: PLEX: True and not plex: True

Read the instructions for how to configure each of the scripts with your API/cred information.

Media gallery

1 / 2

Install android-tv-background on Unraid in a few clicks.

Find android-tv-background in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.

Open the Apps tab on your Unraid server Search Community Apps for android-tv-background Review the template variables and paths Click Install

Requirements

Toggle 'Basic View' to Advanced to see the **Extra Parameters** section. Set *--user uid:gid* to the uid:gid you use on volumes you are mapping for this docker.

Download Statistics

397
Total Downloads

Related apps

Explore more like this

Explore all

Details

Repository
ghcr.io/ninthwalker/androidtvbackground
Last Updated2025-02-02
First Seen2025-02-01

Runtime arguments

Network
bridge
Privileged
false
Extra Params
--user 99:100

Template configuration

PLEX BackgroundsVariable

Set to True to enable PLEX backgrounds

Target
PLEX
Default
False
Value
False
JELLYFIN BackgroundsVariable

Set to True to enable JELLYFIN backgrounds

Target
JELLYFIN
Default
False
Value
False
TMDB BackgroundsVariable

Set to True to enable TMDB backgrounds

Target
TMDB
Default
False
Value
False
TRAKT BackgroundsVariable

Set to True to enable TRAKT backgrounds

Target
TRAKT
Default
False
Value
False
CRON ScheduleVariable

Set to a cron expression to create backgrounds automatically

Target
CRON
Default
False
Value
False
Post Python ScriptVariable

Set to True to run a custom python script

Target
POST_SCRIPT_PY
Default
False
Value
False
Post Shell ScriptVariable

Set to True to run a custom shell script

Target
POST_SCRIPT_SH
Default
False
Value
False
Config PathPathrw

Path for config files

Target
/config
Default
/mnt/cache/appdata/android-tv-background
Value
/mnt/cache/appdata/android-tv-background
Backgrounds PathPathrw

Path where backgrounds will be saved

Target
/backgrounds
Default
/mnt/cache/appdata/android-tv-background
Value
/mnt/cache/appdata/android-tv-background