Skip to content

Commit

Permalink
Add support for Bazarr
Browse files Browse the repository at this point in the history
  • Loading branch information
Luctia committed Jan 27, 2024
1 parent 69b96cd commit 8ee5c82
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions container_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'] = []
Expand Down Expand Up @@ -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)
5 changes: 4 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
5 changes: 5 additions & 0 deletions users_groups_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 8ee5c82

Please sign in to comment.