From 8ee5c820cc3e6afebd93bff87119543c1e6cee6f Mon Sep 17 00:00:00 2001 From: Luctia Date: Sat, 27 Jan 2024 23:49:51 +0100 Subject: [PATCH] Add support for Bazarr --- README.md | 2 ++ container_configs.py | 17 +++++++++++++++++ docker-compose.yml | 14 ++++++++++++++ main.py | 4 ++++ setup.sh | 5 ++++- users_groups_setup.py | 5 +++++ 6 files changed, 46 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1400299..a0ade49 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ crash*. It doesn't necessarily mean it will run well on your system ;) It featur download this if connected to Prowlarr and qBittorrent. It can also reorganize the media you already own in order to create a more uniformly formatted collection. - [Radarr](https://radarr.video/) is like Sonarr, but for movies. +- [Bazarr](https://www.bazarr.media/) is a companion application to Sonarr and Radarr that manages + and downloads subtitles based on your requirements. - [Lidarr](https://lidarr.audio/) is like Sonarr, but for music. - [Readarr](https://readarr.com/) is like Sonarr, but for books. - [Mylar3](https://github.com/mylar3/mylar3) is like Sonarr, but for comic books. This one is a bit diff --git a/container_configs.py b/container_configs.py index ee16e7f..6125a6e 100644 --- a/container_configs.py +++ b/container_configs.py @@ -105,6 +105,23 @@ def radarr(self): ' restart: unless-stopped\n\n' ) + def bazarr(self): + return ( + ' bazarr:\n' + ' image: lscr.io/linuxserver/bazarr:latest\n' + ' container_name: bazarr\n' + ' environment:\n' + ' - PUID=13013\n' + ' - PGID=13000\n' + ' - TZ=' + self.timezone + '\n' + ' volumes:\n' + ' - ' + self.config_dir + '/bazarr-config:/config\n' + ' - ' + self.root_dir + '/data/media:/media\n' + ' ports:\n' + ' - "6767:6767"\n' + ' restart: unless-stopped\n\n' + ) + def lidarr(self): return ( ' lidarr:\n' diff --git a/docker-compose.yml b/docker-compose.yml index 932c4a0..85c11f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,6 +31,20 @@ services: - "7878:7878" restart: unless-stopped + bazarr: + image: lscr.io/linuxserver/bazarr:latest + container_name: bazarr + environment: + - PUID=13012 + - PGID=13000 + - TZ=Europe/Amsterdam + volumes: + - /home/user/ezarr/config/bazarr-config:/config + - /home/user/ezarr/data/media:/media + ports: + - "6767:6767" + restart: unless-stopped + lidarr: image: lscr.io/linuxserver/lidarr:latest container_name: lidarr diff --git a/main.py b/main.py index d7b721f..8a5fbab 100644 --- a/main.py +++ b/main.py @@ -54,6 +54,9 @@ def take_directory_input(): take_input('audiobookshelf', 'servarr') if len(services_classed['servarr']) == 0: print('Warning: no media management services selected.') +if services_classed['servarr'].__contains__('sonarr') or services_classed['servarr'].__contains__('radarr'): + print('Use Bazarr? [Y/n]', end=" ") + take_input('bazarr', 'servarr') print('\n===INDEXERS===') services_classed['indexer'] = [] @@ -134,4 +137,5 @@ def take_directory_input(): print('Process complete. You can now run "docker compose up -d" to start your containers.') print('Thank you for using EZarr. If you experience any issues or have feature requests, add them to our issues.') +print('For questions, you can also use the discussions tab.') exit(0) diff --git a/setup.sh b/setup.sh index 3c10b29..390986d 100755 --- a/setup.sh +++ b/setup.sh @@ -13,6 +13,7 @@ sudo useradd overseerr -u 13009 sudo useradd plex -u 13010 sudo useradd sabnzbd -u 13011 sudo useradd jellyseerr -u 13012 +sudo useradd bazarr -u 13013 sudo groupadd mediacenter -g 13000 sudo usermod -a -G mediacenter sonarr sudo usermod -a -G mediacenter radarr @@ -26,9 +27,10 @@ sudo usermod -a -G mediacenter overseerr sudo usermod -a -G mediacenter plex sudo usermod -a -G mediacenter sabnzbd sudo usermod -a -G mediacenter jellyseerr +sudo usermod -a -G mediacenter bazarr # Make directories -sudo mkdir -pv config/{sonarr,radarr,lidarr,readarr,mylar,prowlarr,qbittorrent,jackett,audiobookshelf,overseerr,plex,tautulli,sabnzbd,jellyseerr}-config +sudo mkdir -pv config/{sonarr,radarr,lidarr,readarr,mylar,prowlarr,qbittorrent,jackett,audiobookshelf,overseerr,plex,tautulli,sabnzbd,jellyseerr,bazarr}-config sudo mkdir -pv data/{torrents,usenet,media}/{tv,movies,music,books,comics,audiobooks,podcasts,audiobookshelf-metadata} # Set permissions @@ -46,5 +48,6 @@ sudo chown -R overseerr:mediacenter config/overseerr-config sudo chown -R plex:mediacenter config/plex-config sudo chown -R sabnzbd:mediacenter config/sabnzbd-config sudo chown -R jellyseerr:mediacenter config/jellyseerr-config +sudo chown -R bazarr:mediacenter config/bazarr-config echo "UID=$(id -u)" >> .env diff --git a/users_groups_setup.py b/users_groups_setup.py index 747174b..aeb2fa8 100644 --- a/users_groups_setup.py +++ b/users_groups_setup.py @@ -35,6 +35,11 @@ def radarr(self): self.create_config_dir('radarr') os.system('sudo usermod -a -G mediacenter radarr') + def bazarr(self): + os.system('/bin/bash -c "sudo useradd bazarr -u 13013') + self.create_config_dir('bazarr') + os.system('sudo usermod -a -G mediacenter bazarr') + def lidarr(self): os.system( '/bin/bash -c "sudo useradd lidarr -u 13003'