mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 15:56:07 -07:00
Allow disabling poster upload to Imgur
* Disabled by default
This commit is contained in:
parent
5bed46c0aa
commit
2a885d709d
4 changed files with 11 additions and 2 deletions
|
@ -713,6 +713,13 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="checkbox" style="padding-top: 15px;">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" name="notify_upload_posters" id="notify_upload_posters" value="1" ${config['notify_upload_posters']}> Enable Posters in Notifications
|
||||||
|
</label>
|
||||||
|
<p class="help-block">Allow PlexPy to upload Plex poster to Imgur for notifications.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="padded-header">
|
<div class="padded-header">
|
||||||
<h3>Current Activity Notifications</h3>
|
<h3>Current Activity Notifications</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -191,6 +191,7 @@ _CONFIG_DEFINITIONS = {
|
||||||
'NMA_ON_EXTUP': (int, 'NMA', 0),
|
'NMA_ON_EXTUP': (int, 'NMA', 0),
|
||||||
'NMA_ON_INTUP': (int, 'NMA', 0),
|
'NMA_ON_INTUP': (int, 'NMA', 0),
|
||||||
'NOTIFY_CONSECUTIVE': (int, 'Monitoring', 1),
|
'NOTIFY_CONSECUTIVE': (int, 'Monitoring', 1),
|
||||||
|
'NOTIFY_UPLOAD_POSTERS': (int, 'Monitoring', 0),
|
||||||
'NOTIFY_RECENTLY_ADDED': (int, 'Monitoring', 0),
|
'NOTIFY_RECENTLY_ADDED': (int, 'Monitoring', 0),
|
||||||
'NOTIFY_RECENTLY_ADDED_GRANDPARENT': (int, 'Monitoring', 0),
|
'NOTIFY_RECENTLY_ADDED_GRANDPARENT': (int, 'Monitoring', 0),
|
||||||
'NOTIFY_RECENTLY_ADDED_DELAY': (int, 'Monitoring', 60),
|
'NOTIFY_RECENTLY_ADDED_DELAY': (int, 'Monitoring', 60),
|
||||||
|
|
|
@ -565,7 +565,7 @@ def build_notify_text(session=None, timeline=None, notify_action=None):
|
||||||
poster_url = data_factory.get_poster_url(rating_key=poster_key)
|
poster_url = data_factory.get_poster_url(rating_key=poster_key)
|
||||||
|
|
||||||
# If no previous poster_url
|
# If no previous poster_url
|
||||||
if not poster_url:
|
if not poster_url and plexpy.CONFIG.NOTIFY_UPLOAD_POSTERS:
|
||||||
# Retrieve the poster from Plex and cache to file
|
# Retrieve the poster from Plex and cache to file
|
||||||
urllib.urlretrieve(plexpy.CONFIG.PMS_URL + thumb + '?X-Plex-Token=' + plexpy.CONFIG.PMS_TOKEN,
|
urllib.urlretrieve(plexpy.CONFIG.PMS_URL + thumb + '?X-Plex-Token=' + plexpy.CONFIG.PMS_TOKEN,
|
||||||
os.path.join(plexpy.CONFIG.CACHE_DIR, 'cache-poster.jpg'))
|
os.path.join(plexpy.CONFIG.CACHE_DIR, 'cache-poster.jpg'))
|
||||||
|
|
|
@ -1192,6 +1192,7 @@ class WebInterface(object):
|
||||||
"logging_ignore_interval": plexpy.CONFIG.LOGGING_IGNORE_INTERVAL,
|
"logging_ignore_interval": plexpy.CONFIG.LOGGING_IGNORE_INTERVAL,
|
||||||
"pms_is_remote": checked(plexpy.CONFIG.PMS_IS_REMOTE),
|
"pms_is_remote": checked(plexpy.CONFIG.PMS_IS_REMOTE),
|
||||||
"notify_consecutive": checked(plexpy.CONFIG.NOTIFY_CONSECUTIVE),
|
"notify_consecutive": checked(plexpy.CONFIG.NOTIFY_CONSECUTIVE),
|
||||||
|
"notify_upload_posters": checked(plexpy.CONFIG.NOTIFY_UPLOAD_POSTERS),
|
||||||
"notify_recently_added": checked(plexpy.CONFIG.NOTIFY_RECENTLY_ADDED),
|
"notify_recently_added": checked(plexpy.CONFIG.NOTIFY_RECENTLY_ADDED),
|
||||||
"notify_recently_added_grandparent": checked(plexpy.CONFIG.NOTIFY_RECENTLY_ADDED_GRANDPARENT),
|
"notify_recently_added_grandparent": checked(plexpy.CONFIG.NOTIFY_RECENTLY_ADDED_GRANDPARENT),
|
||||||
"notify_recently_added_delay": plexpy.CONFIG.NOTIFY_RECENTLY_ADDED_DELAY,
|
"notify_recently_added_delay": plexpy.CONFIG.NOTIFY_RECENTLY_ADDED_DELAY,
|
||||||
|
@ -1244,7 +1245,7 @@ class WebInterface(object):
|
||||||
"tv_notify_on_pause", "movie_notify_on_pause", "music_notify_on_pause",
|
"tv_notify_on_pause", "movie_notify_on_pause", "music_notify_on_pause",
|
||||||
"refresh_libraries_on_startup", "refresh_users_on_startup",
|
"refresh_libraries_on_startup", "refresh_users_on_startup",
|
||||||
"ip_logging_enable", "movie_logging_enable", "tv_logging_enable", "music_logging_enable",
|
"ip_logging_enable", "movie_logging_enable", "tv_logging_enable", "music_logging_enable",
|
||||||
"pms_is_remote", "home_stats_type", "group_history_tables", "notify_consecutive",
|
"pms_is_remote", "home_stats_type", "group_history_tables", "notify_consecutive", "notify_upload_posters",
|
||||||
"notify_recently_added", "notify_recently_added_grandparent", "monitor_remote_access", "get_file_sizes"
|
"notify_recently_added", "notify_recently_added_grandparent", "monitor_remote_access", "get_file_sizes"
|
||||||
]
|
]
|
||||||
for checked_config in checked_configs:
|
for checked_config in checked_configs:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue