diff --git a/arr-mastodon.py b/arr-mastodon.py index 79cf766..08b1a38 100755 --- a/arr-mastodon.py +++ b/arr-mastodon.py @@ -3,7 +3,6 @@ # https://wiki.servarr.com/en/sonarr/custom-scripts import os -from os import environ import configparser import requests @@ -35,16 +34,16 @@ if os.getenv('sonarr_eventtype'): if os.getenv('sonarr_eventtype') == 'Download': body = "New content added to Jellyfin: \n" - series_title = environ.get('Sonarr_Series_Title') - season_number = environ.get('Sonarr_EpisodeFile_SeasonNumber') - episode_number = environ.get('Sonarr_EpisodeFile_EpisodeNumbers') - episode_title = environ.get('Sonarr_EpisodeFile_EpisodeTitles') - release_quality = environ.get('Sonarr_EpisodeFile_Quality') + series_title = os.getenv('sonarr_series_title') + season_number = os.getenv('sonarr_episodefile_seasonnumber') + episode_number = os.getenv('sonarr_episodefile_episodenumbers') + episode_title = os.getenv('sonarr_episodefile_episodetitles') + release_quality = os.getenv('sonarr_episodefile_quality') body += "%s - S%sE%s - %s [%s]\n" % (series_title, season_number, episode_number, episode_title, release_quality) - toot(server_url, body, server_token) if os.getenv('sonarr_eventtype') == 'Test': toot(server_url, "Test message", server_token) +