Add self-hosted notificaation images

This commit is contained in:
JonnyWong16 2018-03-24 22:09:37 -07:00
parent 90f3d597dc
commit e23b1a0603
11 changed files with 110 additions and 72 deletions

View file

@ -4025,3 +4025,6 @@ a:hover .overlay-refresh-image:hover {
0% { transform: rotate(0deg); } 0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); } 100% { transform: rotate(360deg); }
} }
a[data-tab-destination] {
cursor: pointer;
}

View file

@ -240,7 +240,7 @@
</div> </div>
</div> </div>
<p class="help-block">Select an existing notification agent where the subject and body text will be sent.<br> <p class="help-block">Select an existing notification agent where the subject and body text will be sent.<br>
Note: Self-hosted newsletters must be enabled under <a data-tab-destination="tabs-newsletters" style="cursor: pointer;" data-dismiss="modal">Newsletters</a> to include a link to the newsletter. Note: Self-hosted newsletters must be enabled under <a data-tab-destination="tabs-newsletters" data-dismiss="modal">Newsletters</a> to include a link to the newsletter.
</p> </p>
</div> </div>

View file

@ -433,7 +433,7 @@
'<div class="form-group">' + '<div class="form-group">' +
'<label>Warning</label>' + '<label>Warning</label>' +
'<p class="help-block" style="color: #eb8600;">Facebook requires HTTPS for authorization. ' + '<p class="help-block" style="color: #eb8600;">Facebook requires HTTPS for authorization. ' +
'Please enable HTTPS for Tautulli under <a data-tab-destination="tabs-web_interface" data-dismiss="modal" style="cursor: pointer;">Web Interface</a>.</p>' + 'Please enable HTTPS for Tautulli under <a data-tab-destination="tabs-web_interface" data-dismiss="modal">Web Interface</a>.</p>' +
'</div>' '</div>'
); );
$('#facebook_redirect_uri').val('HTTPS not enabled'); $('#facebook_redirect_uri').val('HTTPS not enabled');

View file

@ -50,9 +50,8 @@
<li role="presentation"><a href="#tabs-homepage" aria-controls="tabs-homepage" role="tab" data-toggle="tab">Homepage</a></li> <li role="presentation"><a href="#tabs-homepage" aria-controls="tabs-homepage" role="tab" data-toggle="tab">Homepage</a></li>
<li role="presentation"><a href="#tabs-web_interface" aria-controls="tabs-web_interface" role="tab" data-toggle="tab">Web Interface</a></li> <li role="presentation"><a href="#tabs-web_interface" aria-controls="tabs-web_interface" role="tab" data-toggle="tab">Web Interface</a></li>
<li role="presentation"><a href="#tabs-plex_media_server" aria-controls="tabs-plex_media_server" role="tab" data-toggle="tab">Plex Media Server</a></li> <li role="presentation"><a href="#tabs-plex_media_server" aria-controls="tabs-plex_media_server" role="tab" data-toggle="tab">Plex Media Server</a></li>
<li role="presentation"><a href="#tabs-notifications" aria-controls="tabs-notifications" role="tab" data-toggle="tab">Notifications</a></li> <li role="presentation"><a href="#tabs-notifications" aria-controls="tabs-notifications" role="tab" data-toggle="tab">Notifications & Newsletters</a></li>
<li role="presentation"><a href="#tabs-notification_agents" aria-controls="tabs-notification_agents" role="tab" data-toggle="tab">Notification Agents</a></li> <li role="presentation"><a href="#tabs-notification_agents" aria-controls="tabs-notification_agents" role="tab" data-toggle="tab">Notification Agents</a></li>
<li role="presentation"><a href="#tabs-newsletters" aria-controls="tabs-newsletters" role="tab" data-toggle="tab">Newsletters</a></li>
<li role="presentation"><a href="#tabs-newsletter_agents" aria-controls="tabs-newsletter_agents" role="tab" data-toggle="tab">Newsletter Agents</a></li> <li role="presentation"><a href="#tabs-newsletter_agents" aria-controls="tabs-newsletter_agents" role="tab" data-toggle="tab">Newsletter Agents</a></li>
<li role="presentation"><a href="#tabs-import_backups" aria-controls="tabs-import_backups" role="tab" data-toggle="tab">Import & Backups</a></li> <li role="presentation"><a href="#tabs-import_backups" aria-controls="tabs-import_backups" role="tab" data-toggle="tab">Import & Backups</a></li>
<li role="presentation"><a href="#tabs-android_app" aria-controls="tabs-android_app" role="tab" data-toggle="tab">Tautulli Remote Android App <sup><small>beta</small></sup></a></li> <li role="presentation"><a href="#tabs-android_app" aria-controls="tabs-android_app" role="tab" data-toggle="tab">Tautulli Remote Android App <sup><small>beta</small></sup></a></li>
@ -441,6 +440,18 @@
</div> </div>
<p class="help-block">Port to bind web server to. Note that ports below 1024 may require root.</p> <p class="help-block">Port to bind web server to. Note that ports below 1024 may require root.</p>
</div> </div>
<div class="form-group advanced-setting">
<label for="http_base_url">Tautulli Public Domain</label>
<div class="row">
<div class="col-md-8">
<input type="text" class="form-control" id="http_base_url" name="http_base_url" value="${config['http_base_url']}" placeholder="http://mydomain.com" data-parsley-trigger="change" data-parsley-pattern="^https?:\/\/\S+$" data-parsley-errors-container="#http_base_url_error" data-parsley-error-message="Invalid URL">
</div>
<div id=http_base_url_error" class="alert alert-danger settings-alert" role="alert"></div>
</div>
<p class="help-block">
Set your Tautulli public domain for self-hosted notification images and newsletters. (e.g. http://mydomain.com)<br>
</p>
</div>
<div class="form-group advanced-setting"> <div class="form-group advanced-setting">
<label for="http_root">HTTP Root</label> <label for="http_root">HTTP Root</label>
<div class="row"> <div class="row">
@ -924,16 +935,38 @@
</div>--> </div>-->
<div class="padded-header"> <div class="padded-header">
<h3>3rd Party APIs</h3> <h3>Newsletters</h3>
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" name="notify_upload_posters" id="notify_upload_posters" value="1" ${config['notify_upload_posters']}> Upload Posters to Imgur for Notifications <input type="checkbox" id="newsletter_self_hosted" name="newsletter_self_hosted" value="1" ${config['newsletter_self_hosted']}> Self-Hosted Newsletters
</label> </label>
<p class="help-block">Enable to upload Plex posters to Imgur for notifications. Disable if posters are not being used to save bandwidth.</p> <p class="help-block">Enable to self-host newsletters on your own domain.</p>
</div> </div>
<div id="imgur_upload_options"> <div id="self_host_newsletter_options" style="overlfow: hidden; display: ${'block' if config['newsletter_self_hosted'] == 'checked' else 'none'}">
<p class="help-block" id="self_host_newsletter_message">Note: The <span class="inline-pre">${http_root}newsletter</span> endpoint on your domain must be publically accessible from the internet.</p>
<p class="help-block settings-warning base-url-warning">Warning: Tautulli public domain not set under <a data-tab-destination="tabs-web_interface">Web Interface</a>.</p>
</div>
<div class="padded-header">
<h3>3rd Party APIs</h3>
</div>
<div class="form-group">
<label for="notify_upload_posters">Image Hosting</label>
<div class="row">
<div class="col-md-6">
<select class="form-control" id="notify_upload_posters" name="notify_upload_posters">
<option value="0" ${'selected' if config['notify_upload_posters'] == 0 else ''}>Disabled</option>
<option value="1" ${'selected' if config['notify_upload_posters'] == 1 else ''}>Imgur</option>
<option value="2" ${'selected' if config['notify_upload_posters'] == 2 else ''}>Self-hosted public Tautulli domain</option>
</select>
</div>
</div>
<p class="help-block">Select where to host Plex images for notifications and newsletters.</p>
</div>
<div id="imgur_upload_options" style="overlfow: hidden; display: ${'none' if config['notify_upload_posters'] != 1 else 'block'}">
<div class="form-group"> <div class="form-group">
<label for="imgur_client_id">Imgur Client ID</label> <label for="imgur_client_id">Imgur Client ID</label>
<div class="row"> <div class="row">
@ -946,6 +979,10 @@
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 id="self_host_image_options" style="overlfow: hidden; display: ${'none' if config['notify_upload_posters'] != 2 else 'block'}">
<p class="help-block" id="self_host_image_message">Note: The <span class="inline-pre">${http_root}image</span> endpoint on your domain must be publically accessible from the internet.</p>
<p class="help-block settings-warning base-url-warning">Warning: Tautulli public domain not set under <a data-tab-destination="tabs-web_interface">Web Interface</a>.</p>
</div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" name="themoviedb_lookup" id="themoviedb_lookup" value="1" ${config['themoviedb_lookup']}> Lookup TheMovieDB Links <input type="checkbox" name="themoviedb_lookup" id="themoviedb_lookup" value="1" ${config['themoviedb_lookup']}> Lookup TheMovieDB Links
@ -983,43 +1020,6 @@
</div> </div>
<div role="tabpanel" class="tab-pane" id="tabs-newsletters">
<div class="padded-header">
<h3>Newsletters</h3>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="newsletter_self_hosted" name="newsletter_self_hosted" value="1" ${config['newsletter_self_hosted']}> Self-Hosted Newsletters
</label>
<p class="help-block">Enable to self-host newsletters on your own domain.</p>
</div>
<div id="newsletter_self_hosted_options">
<div class="form-group">
<label for="newsletter_base_url">Newsletter Base URL</label>
<div class="row">
<div class="col-md-8">
<div class="input-group">
<input type="text" class="form-control" id="newsletter_base_url" name="newsletter_base_url" value="${config['newsletter_base_url']}" placeholder="http://mydomain.com" data-parsley-trigger="change" data-parsley-pattern="^https?:\/\/\S+$" data-parsley-errors-container="#newsletter_base_url_error" data-parsley-error-message="Invalid URL">
<span class="input-group-btn">
<span class="input-group-addon input-group-addon-form">${http_root}newsletter</span>
</span>
</div>
</div>
<div id="newsletter_base_url_error" class="alert alert-danger settings-alert" role="alert"></div>
</div>
<p class="help-block">
Set your Tautulli base URL for self-hosted newsletters. (e.g. http://mydomain.com)<br>
Note: The <span class="inline-pre">${http_root}newsletter</span> endpoint on your domain must be accessible from the internet.
</p>
</div>
</div>
<p><input type="button" class="btn btn-bright save-button" value="Save" data-success="Changes saved successfully"></p>
</div>
<div role="tabpanel" class="tab-pane" id="tabs-newsletter_agents"> <div role="tabpanel" class="tab-pane" id="tabs-newsletter_agents">
<div class="padded-header"> <div class="padded-header">
@ -1030,7 +1030,7 @@
Add a new newsletter agent, or configure an existing newsletter agent by clicking the settings icon on the right. Add a new newsletter agent, or configure an existing newsletter agent by clicking the settings icon on the right.
</p> </p>
<p class="help-block settings-warning" id="newsletter_upload_warning"> <p class="help-block settings-warning" id="newsletter_upload_warning">
Note: Either <a data-tab-destination="tabs-notifications" style="cursor: pointer;">Imgur uploads</a> or <a data-tab-destination="tabs-newsletters" style="cursor: pointer;">self-hosted newsletters</a> must be enabled.</span> Note: Either <a data-tab-destination="tabs-notifications">Image Hosting</a> on Imgur or <a data-tab-destination="tabs-notifications">Self-Hosted Newsletters</a> must be enabled.</span>
</p> </p>
<br/> <br/>
<div id="plexpy-newsletters-table"> <div id="plexpy-newsletters-table">
@ -1150,7 +1150,7 @@
<p class="form-group"> <p class="form-group">
<label>Registered Devices</label> <label>Registered Devices</label>
<p class="help-block">Register a new device using a QR code, or configure an existing device by clicking the settings icon on the right.</p> <p class="help-block">Register a new device using a QR code, or configure an existing device by clicking the settings icon on the right.</p>
<p id="app_api_msg" style="color: #eb8600;">The API must be enabled under <a data-tab-destination="tabs-web_interface" style="cursor: pointer;">Web Interface</a> to use the app.</p> <p id="app_api_msg" style="color: #eb8600;">The API must be enabled under <a data-tab-destination="tabs-web_interface">Web Interface</a> to use the app.</p>
<div class="row"> <div class="row">
<div id="plexpy-mobile-devices-table" class="col-md-12"> <div id="plexpy-mobile-devices-table" class="col-md-12">
<div class='text-muted'><i class="fa fa-refresh fa-spin"></i> Loading registered devices...</div> <div class='text-muted'><i class="fa fa-refresh fa-spin"></i> Loading registered devices...</div>
@ -1815,7 +1815,6 @@ $(document).ready(function() {
initConfigCheckbox('#enable_https'); initConfigCheckbox('#enable_https');
initConfigCheckbox('#https_create_cert'); initConfigCheckbox('#https_create_cert');
initConfigCheckbox('#check_github'); initConfigCheckbox('#check_github');
initConfigCheckbox('#notify_upload_posters');
initConfigCheckbox('#monitor_pms_updates'); initConfigCheckbox('#monitor_pms_updates');
initConfigCheckbox('#newsletter_self_hosted'); initConfigCheckbox('#newsletter_self_hosted');
@ -2499,11 +2498,11 @@ $(document).ready(function() {
}); });
}); });
$('#newsletter_base_url').change(function () { $('#http_base_url').change(function () {
$(this).val($(this).val().replace(/\/*$/, '')); $(this).val($(this).val().replace(/\/*$/, ''));
}); });
function apiEnabled () { function apiEnabled() {
var api_enabled = $('#api_enabled').prop('checked'); var api_enabled = $('#api_enabled').prop('checked');
$('#app_api_msg').toggle(!(api_enabled)); $('#app_api_msg').toggle(!(api_enabled));
} }
@ -2512,7 +2511,37 @@ $(document).ready(function() {
apiEnabled(); apiEnabled();
}); });
function newsletterUploadEnabled () { function imageUpload() {
var upload_val = $('#notify_upload_posters').val();
if (upload_val === '1') {
$('#imgur_upload_options').slideDown();
} else {
$('#imgur_upload_options').slideUp();
}
if (upload_val === '2') {
$('#self_host_image_options').slideDown();
} else {
$('#self_host_image_options').slideUp();
}
}
$('#notify_upload_posters').change(function () {
imageUpload();
});
function baseURLSet() {
if ($('#http_base_url').val()) {
$('.base-url-warning').hide();
} else {
$('.base-url-warning').show();
}
}
baseURLSet();
$('#http_base_url').change(function () {
baseURLSet();
});
function newsletterUploadEnabled() {
if ($('#notify_upload_posters').is(':checked') || $('#newsletter_self_hosted').is(':checked')) { if ($('#notify_upload_posters').is(':checked') || $('#newsletter_self_hosted').is(':checked')) {
$('#newsletter_upload_warning').hide(); $('#newsletter_upload_warning').hide();
} else { } else {
@ -2522,6 +2551,7 @@ $(document).ready(function() {
newsletterUploadEnabled(); newsletterUploadEnabled();
$('#notify_upload_posters, #newsletter_self_hosted').change(function () { $('#notify_upload_posters, #newsletter_self_hosted').change(function () {
baseURLSet();
newsletterUploadEnabled(); newsletterUploadEnabled();
}); });

View file

@ -4,8 +4,8 @@
from plexpy.helpers import grouper from plexpy.helpers import grouper
recently_added = data['recently_added'] recently_added = data['recently_added']
if plexpy.CONFIG.NEWSLETTER_SELF_HOSTED and plexpy.CONFIG.NEWSLETTER_BASE_URL: if plexpy.CONFIG.NEWSLETTER_SELF_HOSTED and plexpy.CONFIG.HTTP_BASE_URL:
base_url = plexpy.CONFIG.NEWSLETTER_BASE_URL + plexpy.HTTP_ROOT + 'newsletter/' base_url = plexpy.CONFIG.HTTP_BASE_URL + plexpy.HTTP_ROOT + 'newsletter/'
base_url_image = base_url + 'image/' base_url_image = base_url + 'image/'
elif preview: elif preview:
base_url = 'newsletter/' base_url = 'newsletter/'

View file

@ -4,8 +4,8 @@
from plexpy.helpers import grouper from plexpy.helpers import grouper
recently_added = data['recently_added'] recently_added = data['recently_added']
if plexpy.CONFIG.NEWSLETTER_SELF_HOSTED and plexpy.CONFIG.NEWSLETTER_BASE_URL: if plexpy.CONFIG.NEWSLETTER_SELF_HOSTED and plexpy.CONFIG.HTTP_BASE_URL:
base_url = plexpy.CONFIG.NEWSLETTER_BASE_URL + plexpy.HTTP_ROOT + 'newsletter/' base_url = plexpy.CONFIG.HTTP_BASE_URL + plexpy.HTTP_ROOT + 'newsletter/'
base_url_image = base_url + 'image/' base_url_image = base_url + 'image/'
elif preview: elif preview:
base_url = 'newsletter/' base_url = 'newsletter/'

View file

@ -226,6 +226,7 @@ _CONFIG_DEFINITIONS = {
'HTTP_ROOT': (str, 'General', ''), 'HTTP_ROOT': (str, 'General', ''),
'HTTP_USERNAME': (str, 'General', ''), 'HTTP_USERNAME': (str, 'General', ''),
'HTTP_PLEX_ADMIN': (int, 'General', 0), 'HTTP_PLEX_ADMIN': (int, 'General', 0),
'HTTP_BASE_URL': (str, 'General', ''),
'HIPCHAT_URL': (str, 'Hipchat', ''), 'HIPCHAT_URL': (str, 'Hipchat', ''),
'HIPCHAT_COLOR': (str, 'Hipchat', ''), 'HIPCHAT_COLOR': (str, 'Hipchat', ''),
'HIPCHAT_INCL_SUBJECT': (int, 'Hipchat', 1), 'HIPCHAT_INCL_SUBJECT': (int, 'Hipchat', 1),
@ -310,7 +311,6 @@ _CONFIG_DEFINITIONS = {
'NEWSLETTER_TEMPLATES': (str, 'Newsletter', 'newsletters'), 'NEWSLETTER_TEMPLATES': (str, 'Newsletter', 'newsletters'),
'NEWSLETTER_DIR': (str, 'Newsletter', ''), 'NEWSLETTER_DIR': (str, 'Newsletter', ''),
'NEWSLETTER_SELF_HOSTED': (int, 'Newsletter', 0), 'NEWSLETTER_SELF_HOSTED': (int, 'Newsletter', 0),
'NEWSLETTER_BASE_URL': (str, 'Newsletter', ''),
'NMA_APIKEY': (str, 'NMA', ''), 'NMA_APIKEY': (str, 'NMA', ''),
'NMA_ENABLED': (int, 'NMA', 0), 'NMA_ENABLED': (int, 'NMA', 0),
'NMA_PRIORITY': (int, 'NMA', 0), 'NMA_PRIORITY': (int, 'NMA', 0),

View file

@ -458,7 +458,7 @@ class Newsletter(object):
def _build_params(self): def _build_params(self):
date_format = helpers.momentjs_to_arrow(plexpy.CONFIG.DATE_FORMAT) date_format = helpers.momentjs_to_arrow(plexpy.CONFIG.DATE_FORMAT)
base_url = plexpy.CONFIG.NEWSLETTER_BASE_URL or helpers.get_plexpy_url() base_url = plexpy.CONFIG.HTTP_BASE_URL or helpers.get_plexpy_url()
parameters = { parameters = {
'server_name': plexpy.CONFIG.PMS_NAME, 'server_name': plexpy.CONFIG.PMS_NAME,

View file

@ -632,10 +632,15 @@ def build_media_notify_params(notify_action=None, session=None, timeline=None, m
else: else:
poster_thumb = '' poster_thumb = ''
if plexpy.CONFIG.NOTIFY_UPLOAD_POSTERS: if plexpy.CONFIG.NOTIFY_UPLOAD_POSTERS == 1:
imgur_info = get_imgur_info(img=poster_thumb, rating_key=poster_key, title=poster_title, fallback='poster') imgur_info = get_imgur_info(img=poster_thumb, rating_key=poster_key, title=poster_title, fallback='poster')
poster_info = {'poster_title': imgur_info['imgur_title'], 'poster_url': imgur_info['imgur_url']} poster_info = {'poster_title': imgur_info['imgur_title'], 'poster_url': imgur_info['imgur_url']}
notify_params.update(poster_info) notify_params.update(poster_info)
elif plexpy.CONFIG.NOTIFY_UPLOAD_POSTERS == 2 and plexpy.CONFIG.HTTP_BASE_URL:
img_hash = set_hash_image_info(img=poster_thumb, fallback='poster')
poster_info = {'poster_title': poster_title,
'poster_url': plexpy.CONFIG.HTTP_BASE_URL + plexpy.HTTP_ROOT + 'image/' + img_hash}
notify_params.update(poster_info)
if ((manual_trigger or plexpy.CONFIG.NOTIFY_GROUP_RECENTLY_ADDED_GRANDPARENT) if ((manual_trigger or plexpy.CONFIG.NOTIFY_GROUP_RECENTLY_ADDED_GRANDPARENT)
and notify_params['media_type'] in ('show', 'artist')): and notify_params['media_type'] in ('show', 'artist')):

View file

@ -960,8 +960,8 @@ class ANDROIDAPP(Notifier):
config_option.append({ config_option.append({
'label': 'Device', 'label': 'Device',
'description': 'No devices registered. ' 'description': 'No devices registered. '
'<a data-tab-destination="tabs-android_app" data-toggle="tab" data-dismiss="modal" ' '<a data-tab-destination="tabs-android_app" data-toggle="tab" data-dismiss="modal">'
'style="cursor: pointer;">Get the Android App</a> and register a device.', 'Get the Android App</a> and register a device.',
'input_type': 'help' 'input_type': 'help'
}) })
else: else:
@ -970,8 +970,8 @@ class ANDROIDAPP(Notifier):
'value': self.config['device_id'], 'value': self.config['device_id'],
'name': 'androidapp_device_id', 'name': 'androidapp_device_id',
'description': 'Set your Android app device or ' 'description': 'Set your Android app device or '
'<a data-tab-destination="tabs-android_app" data-toggle="tab" data-dismiss="modal" ' '<a data-tab-destination="tabs-android_app" data-toggle="tab" data-dismiss="modal">'
'style="cursor: pointer;">register a new device</a> with Tautulli.', 'register a new device</a> with Tautulli.',
'input_type': 'select', 'input_type': 'select',
'select_options': devices 'select_options': devices
}) })
@ -1224,7 +1224,7 @@ class DISCORD(Notifier):
'value': self.config['incl_card'], 'value': self.config['incl_card'],
'name': 'discord_incl_card', 'name': 'discord_incl_card',
'description': 'Include an info card with a poster and metadata with the notifications.<br>' 'description': 'Include an info card with a poster and metadata with the notifications.<br>'
'Note: Imgur upload may need to be enabled under the notifications settings tab.', 'Note: Image hosting must be enabled under the notifications settings tab.',
'input_type': 'checkbox' 'input_type': 'checkbox'
}, },
{'label': 'Include Plot Summaries', {'label': 'Include Plot Summaries',
@ -1574,7 +1574,7 @@ class FACEBOOK(Notifier):
'value': self.config['incl_card'], 'value': self.config['incl_card'],
'name': 'facebook_incl_card', 'name': 'facebook_incl_card',
'description': 'Include an info card with a poster and metadata with the notifications.<br>' 'description': 'Include an info card with a poster and metadata with the notifications.<br>'
'Note: Imgur upload may need to be enabled under the notifications settings tab.', 'Note: Image hosting must be enabled under the notifications settings tab.',
'input_type': 'checkbox' 'input_type': 'checkbox'
}, },
{'label': 'Movie Link Source', {'label': 'Movie Link Source',
@ -1895,7 +1895,7 @@ class HIPCHAT(Notifier):
'value': self.config['incl_card'], 'value': self.config['incl_card'],
'name': 'hipchat_incl_card', 'name': 'hipchat_incl_card',
'description': 'Include an info card with a poster and metadata with the notifications.<br>' 'description': 'Include an info card with a poster and metadata with the notifications.<br>'
'Note: Imgur upload may need to be enabled under the notifications settings tab.<br>' 'Note: Image hosting must be enabled under the notifications settings tab.<br>'
'Note: This will change the notification type to HTML and emoticons will no longer work.', 'Note: This will change the notification type to HTML and emoticons will no longer work.',
'input_type': 'checkbox' 'input_type': 'checkbox'
}, },
@ -2114,7 +2114,7 @@ class JOIN(Notifier):
'value': self.config['incl_poster'], 'value': self.config['incl_poster'],
'name': 'join_incl_poster', 'name': 'join_incl_poster',
'description': 'Include a poster with the notifications.<br>' 'description': 'Include a poster with the notifications.<br>'
'Note: Imgur upload may need to be enabled under the notifications settings tab.', 'Note: Image hosting must be enabled under the notifications settings tab.',
'input_type': 'checkbox' 'input_type': 'checkbox'
}, },
{'label': 'Movie Link Source', {'label': 'Movie Link Source',
@ -3223,7 +3223,7 @@ class SLACK(Notifier):
'value': self.config['incl_card'], 'value': self.config['incl_card'],
'name': 'slack_incl_card', 'name': 'slack_incl_card',
'description': 'Include an info card with a poster and metadata with the notifications.<br>' 'description': 'Include an info card with a poster and metadata with the notifications.<br>'
'Note: Imgur upload may need to be enabled under the notifications settings tab.', 'Note: Image hosting must be enabled under the notifications settings tab.',
'input_type': 'checkbox' 'input_type': 'checkbox'
}, },
{'label': 'Include Plot Summaries', {'label': 'Include Plot Summaries',
@ -3455,7 +3455,7 @@ class TWITTER(Notifier):
'value': self.config['incl_poster'], 'value': self.config['incl_poster'],
'name': 'twitter_incl_poster', 'name': 'twitter_incl_poster',
'description': 'Include a poster with the notifications.<br>' 'description': 'Include a poster with the notifications.<br>'
'Note: Imgur upload may need to be enabled under the notifications settings tab.', 'Note: Image hosting must be enabled under the notifications settings tab.',
'input_type': 'checkbox' 'input_type': 'checkbox'
} }
] ]

View file

@ -2678,6 +2678,7 @@ class WebInterface(object):
"https_key": plexpy.CONFIG.HTTPS_KEY, "https_key": plexpy.CONFIG.HTTPS_KEY,
"https_domain": plexpy.CONFIG.HTTPS_DOMAIN, "https_domain": plexpy.CONFIG.HTTPS_DOMAIN,
"https_ip": plexpy.CONFIG.HTTPS_IP, "https_ip": plexpy.CONFIG.HTTPS_IP,
"http_base_url": plexpy.CONFIG.HTTP_BASE_URL,
"anon_redirect": plexpy.CONFIG.ANON_REDIRECT, "anon_redirect": plexpy.CONFIG.ANON_REDIRECT,
"api_enabled": checked(plexpy.CONFIG.API_ENABLED), "api_enabled": checked(plexpy.CONFIG.API_ENABLED),
"api_key": plexpy.CONFIG.API_KEY, "api_key": plexpy.CONFIG.API_KEY,
@ -2719,7 +2720,7 @@ class WebInterface(object):
"refresh_users_on_startup": checked(plexpy.CONFIG.REFRESH_USERS_ON_STARTUP), "refresh_users_on_startup": checked(plexpy.CONFIG.REFRESH_USERS_ON_STARTUP),
"logging_ignore_interval": plexpy.CONFIG.LOGGING_IGNORE_INTERVAL, "logging_ignore_interval": plexpy.CONFIG.LOGGING_IGNORE_INTERVAL,
"notify_consecutive": checked(plexpy.CONFIG.NOTIFY_CONSECUTIVE), "notify_consecutive": checked(plexpy.CONFIG.NOTIFY_CONSECUTIVE),
"notify_upload_posters": checked(plexpy.CONFIG.NOTIFY_UPLOAD_POSTERS), "notify_upload_posters": plexpy.CONFIG.NOTIFY_UPLOAD_POSTERS,
"notify_recently_added_upgrade": checked(plexpy.CONFIG.NOTIFY_RECENTLY_ADDED_UPGRADE), "notify_recently_added_upgrade": checked(plexpy.CONFIG.NOTIFY_RECENTLY_ADDED_UPGRADE),
"notify_group_recently_added_grandparent": checked(plexpy.CONFIG.NOTIFY_GROUP_RECENTLY_ADDED_GRANDPARENT), "notify_group_recently_added_grandparent": checked(plexpy.CONFIG.NOTIFY_GROUP_RECENTLY_ADDED_GRANDPARENT),
"notify_group_recently_added_parent": checked(plexpy.CONFIG.NOTIFY_GROUP_RECENTLY_ADDED_PARENT), "notify_group_recently_added_parent": checked(plexpy.CONFIG.NOTIFY_GROUP_RECENTLY_ADDED_PARENT),
@ -2747,8 +2748,7 @@ class WebInterface(object):
"tvmaze_lookup": checked(plexpy.CONFIG.TVMAZE_LOOKUP), "tvmaze_lookup": checked(plexpy.CONFIG.TVMAZE_LOOKUP),
"show_advanced_settings": plexpy.CONFIG.SHOW_ADVANCED_SETTINGS, "show_advanced_settings": plexpy.CONFIG.SHOW_ADVANCED_SETTINGS,
"newsletter_dir": plexpy.CONFIG.NEWSLETTER_DIR, "newsletter_dir": plexpy.CONFIG.NEWSLETTER_DIR,
"newsletter_self_hosted": checked(plexpy.CONFIG.NEWSLETTER_SELF_HOSTED), "newsletter_self_hosted": checked(plexpy.CONFIG.NEWSLETTER_SELF_HOSTED)
"newsletter_base_url": plexpy.CONFIG.NEWSLETTER_BASE_URL
} }
return serve_template(templatename="settings.html", title="Settings", config=config, kwargs=kwargs) return serve_template(templatename="settings.html", title="Settings", config=config, kwargs=kwargs)
@ -2764,7 +2764,7 @@ class WebInterface(object):
"grouping_global_history", "grouping_user_history", "grouping_charts", "group_history_tables", "grouping_global_history", "grouping_user_history", "grouping_charts", "group_history_tables",
"pms_url_manual", "week_start_monday", "pms_url_manual", "week_start_monday",
"refresh_libraries_on_startup", "refresh_users_on_startup", "refresh_libraries_on_startup", "refresh_users_on_startup",
"notify_consecutive", "notify_upload_posters", "notify_recently_added_upgrade", "notify_consecutive", "notify_recently_added_upgrade",
"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_proxy", "http_basic_auth", "notify_concurrent_by_ip", "allow_guest_access", "cache_images", "http_proxy", "http_basic_auth", "notify_concurrent_by_ip",