mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Make TMDb and TVmaze lookup optional
This commit is contained in:
parent
d207d4a508
commit
3c04b04b98
4 changed files with 43 additions and 24 deletions
|
@ -754,7 +754,7 @@
|
||||||
<div role="tabpanel" class="tab-pane" id="tabs-notifications">
|
<div role="tabpanel" class="tab-pane" id="tabs-notifications">
|
||||||
|
|
||||||
<div class="padded-header">
|
<div class="padded-header">
|
||||||
<h3>Global Notification Settings</h3>
|
<h3>3rd Party APIs</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
|
@ -775,6 +775,18 @@
|
||||||
You can register a new application <a href="${anon_url('https://api.imgur.com/oauth2/addclient')}" target="_blank">here</a>.<br />
|
You can register a new application <a href="${anon_url('https://api.imgur.com/oauth2/addclient')}" target="_blank">here</a>.<br />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="checkbox">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" name="themoviedb_lookup" id="themoviedb_lookup" value="1" ${config['themoviedb_lookup']}> Lookup TheMovieDB Links
|
||||||
|
</label>
|
||||||
|
<p class="help-block">Enable to lookup links to TheMovieDB for movies and TV shows when available.</p>
|
||||||
|
</div>
|
||||||
|
<div class="checkbox">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" name="tvmaze_lookup" id="tvmaze_lookup" value="1" ${config['tvmaze_lookup']}> Lookup TVmaze Links
|
||||||
|
</label>
|
||||||
|
<p class="help-block">Enable to lookup links to TVmaze for TV shows when available.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="padded-header">
|
<div class="padded-header">
|
||||||
<h3>Current Activity Notifications</h3>
|
<h3>Current Activity Notifications</h3>
|
||||||
|
|
|
@ -549,6 +549,8 @@ _CONFIG_DEFINITIONS = {
|
||||||
'TELEGRAM_ON_CONCURRENT': (int, 'Telegram', 0),
|
'TELEGRAM_ON_CONCURRENT': (int, 'Telegram', 0),
|
||||||
'TELEGRAM_ON_NEWDEVICE': (int, 'Telegram', 0),
|
'TELEGRAM_ON_NEWDEVICE': (int, 'Telegram', 0),
|
||||||
'THEMOVIEDB_APIKEY': (str, 'General', 'e9a6655bae34bf694a0f3e33338dc28e'),
|
'THEMOVIEDB_APIKEY': (str, 'General', 'e9a6655bae34bf694a0f3e33338dc28e'),
|
||||||
|
'THEMOVIEDB_LOOKUP': (int, 'General', 0),
|
||||||
|
'TVMAZE_LOOKUP': (int, 'General', 0),
|
||||||
'TV_LOGGING_ENABLE': (int, 'Monitoring', 1),
|
'TV_LOGGING_ENABLE': (int, 'Monitoring', 1),
|
||||||
'TV_NOTIFY_ENABLE': (int, 'Monitoring', 0),
|
'TV_NOTIFY_ENABLE': (int, 'Monitoring', 0),
|
||||||
'TV_NOTIFY_ON_START': (int, 'Monitoring', 1),
|
'TV_NOTIFY_ON_START': (int, 'Monitoring', 1),
|
||||||
|
|
|
@ -535,6 +535,7 @@ def build_media_notify_params(notify_action=None, session=None, timeline=None, m
|
||||||
metadata['lastfm_url'] = 'https://www.last.fm/music/' + metadata['lastfm_id']
|
metadata['lastfm_url'] = 'https://www.last.fm/music/' + metadata['lastfm_id']
|
||||||
|
|
||||||
# Get TheMovieDB info
|
# Get TheMovieDB info
|
||||||
|
if plexpy.CONFIG.THEMOVIEDB_LOOKUP:
|
||||||
if metadata.get('themoviedb_id'):
|
if metadata.get('themoviedb_id'):
|
||||||
themoveidb_json = get_themoviedb_info(rating_key=rating_key,
|
themoveidb_json = get_themoviedb_info(rating_key=rating_key,
|
||||||
media_type=metadata['media_type'],
|
media_type=metadata['media_type'],
|
||||||
|
@ -551,6 +552,7 @@ def build_media_notify_params(notify_action=None, session=None, timeline=None, m
|
||||||
metadata.update(themoviedb_info)
|
metadata.update(themoviedb_info)
|
||||||
|
|
||||||
# Get TVmaze info (for tv shows only)
|
# Get TVmaze info (for tv shows only)
|
||||||
|
if plexpy.CONFIG.TVMAZE_LOOKUP:
|
||||||
if metadata['media_type'] in ('show', 'season', 'episode') and (metadata.get('thetvdb_id') or metadata.get('imdb_id')):
|
if metadata['media_type'] in ('show', 'season', 'episode') and (metadata.get('thetvdb_id') or metadata.get('imdb_id')):
|
||||||
tvmaze_info = lookup_tvmaze_by_id(rating_key=rating_key,
|
tvmaze_info = lookup_tvmaze_by_id(rating_key=rating_key,
|
||||||
thetvdb_id=metadata.get('thetvdb_id'),
|
thetvdb_id=metadata.get('thetvdb_id'),
|
||||||
|
|
|
@ -2648,7 +2648,9 @@ class WebInterface(object):
|
||||||
"git_remote": plexpy.CONFIG.GIT_REMOTE,
|
"git_remote": plexpy.CONFIG.GIT_REMOTE,
|
||||||
"movie_watched_percent": plexpy.CONFIG.MOVIE_WATCHED_PERCENT,
|
"movie_watched_percent": plexpy.CONFIG.MOVIE_WATCHED_PERCENT,
|
||||||
"tv_watched_percent": plexpy.CONFIG.TV_WATCHED_PERCENT,
|
"tv_watched_percent": plexpy.CONFIG.TV_WATCHED_PERCENT,
|
||||||
"music_watched_percent": plexpy.CONFIG.MUSIC_WATCHED_PERCENT
|
"music_watched_percent": plexpy.CONFIG.MUSIC_WATCHED_PERCENT,
|
||||||
|
"themoviedb_lookup": checked(plexpy.CONFIG.THEMOVIEDB_LOOKUP),
|
||||||
|
"tvmaze_lookup": checked(plexpy.CONFIG.TVMAZE_LOOKUP)
|
||||||
}
|
}
|
||||||
|
|
||||||
return serve_template(templatename="settings.html", title="Settings", config=config, kwargs=kwargs)
|
return serve_template(templatename="settings.html", title="Settings", config=config, kwargs=kwargs)
|
||||||
|
@ -2668,7 +2670,8 @@ class WebInterface(object):
|
||||||
"notify_group_recently_added_grandparent", "notify_group_recently_added_parent",
|
"notify_group_recently_added_grandparent", "notify_group_recently_added_parent",
|
||||||
"monitor_pms_updates", "monitor_remote_access", "get_file_sizes", "log_blacklist", "http_hash_password",
|
"monitor_pms_updates", "monitor_remote_access", "get_file_sizes", "log_blacklist", "http_hash_password",
|
||||||
"allow_guest_access", "cache_images", "http_basic_auth", "notify_concurrent_by_ip",
|
"allow_guest_access", "cache_images", "http_basic_auth", "notify_concurrent_by_ip",
|
||||||
"history_table_activity", "plexpy_auto_update"
|
"history_table_activity", "plexpy_auto_update",
|
||||||
|
"themoviedb_lookup", "tvmaze_lookup"
|
||||||
]
|
]
|
||||||
for checked_config in checked_configs:
|
for checked_config in checked_configs:
|
||||||
if checked_config not in kwargs:
|
if checked_config not in kwargs:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue