Skip to content

This is a simple script to retrieve media background, i developed this to use it with alternative android tv launcher that support wallpapers

License

Notifications You must be signed in to change notification settings

adelatour11/androidtvbackground

Repository files navigation

Android TV Background

This is a simple script to retrieve Plex, Jellyfin, TMDB or Trakt media background and use it as Android TV Wallpaper I developed this to use it with alternative Android TV launchers

y

To use the script, you have to specify :

  • For Plex.py script : your plex token and plex server url
  • For TMDB.py or TMDBlogo.py : your TMDB API Read Access Token
  • For Trakt.py, your Trakt client key, Trakt username, Trakt list name and TMDB API Read Access Token
  • For Jellyfin.py, your server url, token and user id

The scripts retrieves the background of the latests shows (movies or tv shows), resizes the image, add an overlay and add text or image on top

image

image

image

image

image

image

image

image

Note : If you are looking for the docker version check out this branch https://github.com/adelatour11/androidtvbackground/tree/docker

How to :

If you want to edit the scripts :

Plex Script

  • For the plex script you can specify the number of poster to generate, specify if you want to include movies and tv, specify if you want latest added or latest aired items. You can also edit the code to change the text position or content

TMDB Scripts

  • Shows that do not have the logo on TMDB will just have the title displayed

  • You can edit the script to change the color, the text position or font, you can specify exclusion based on origin country code or genre

  • By default the script will retrieve the posters for the movies or TV shows whose last air date is older than 30 days from the current date. For the TV Shows, the episode last air date is considered.

  • You can edit the code to change the endpoints for trending shows that is here

    trending_movies_url = f'{url}trending/movie/week?language=en-US'
    trending_tvshows_url = f'{url}trending/tv/week?language=en-US'
    

    and replace it by using TMDB API Discover Endpoint You can find details on Discovery endpoints here :

    https://developer.themoviedb.org/reference/discover-movie

    https://developer.themoviedb.org/reference/discover-tv

    For example you can change the endpoints like this

    # Endpoint for shows with genre action from 2022
    trending_movies_url = f'{url}discover/movie?include_adult=false&include_video=false&language=en-US&page=1&sort_by=popularity.desc&with_genres=80&year=2022'
    trending_tvshows_url = f'{url}discover/tv?first_air_date_year=2022&include_adult=false&include_null_first_air_dates=false&language=en-US&page=1&sort_by=popularity.desc&with_genres=80'
    

    The genre is set by an id, you can get the list from these url

    https://developer.themoviedb.org/reference/genre-movie-list

    https://developer.themoviedb.org/reference/genre-tv-list

About

This is a simple script to retrieve media background, i developed this to use it with alternative android tv launcher that support wallpapers

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages