Commit 124c04f5 authored by echel0n's avatar echel0n
Browse files

Merge branch 'release/9.3.84'

parents f16d36a8 57a541fe
# Changelog
- * c242871 - 2018-10-13: Release v9.3.83
- * ceb8b21 - 2018-10-13: Release v9.3.84
- * aa89c95 - 2018-10-13: Added notifier Join
- * 7891d45 - 2018-10-13: Release v9.3.83
- * 83e5033 - 2018-10-13: Fixed issue with adding shows from Trakt and IMDB not showing
- * 256f26b - 2018-10-13: Pre-Release v9.3.83.dev1
- * 2aa5b96 - 2018-10-13: Testing fix for "unsupported operand type" during BTN provider search
......
......@@ -257,6 +257,12 @@ class Config(object):
self.telegram_notify_onsubtitledownload = False
self.telegram_id = ""
self.telegram_apikey = ""
self.use_join = False
self.join_notify_onsnatch = False
self.join_notify_ondownload = False
self.join_notify_onsubtitledownload = False
self.join_id = ""
self.join_apikey = ""
self.use_prowl = False
self.prowl_notify_onsnatch = False
self.prowl_notify_ondownload = False
......@@ -499,6 +505,14 @@ class Config(object):
'telegram_notify_onsnatch': False,
'telegram_notify_onsubtitledownload': False
},
'JOIN': {
'join_notify_ondownload': False,
'join_apikey': '',
'join_id': '',
'use_join': False,
'join_notify_onsnatch': False,
'join_notify_onsubtitledownload': False
},
'GUI': {
'coming_eps_display_paused': False,
'display_show_specials': True,
......@@ -1641,6 +1655,15 @@ class Config(object):
self.telegram_id = self.check_setting_str('TELEGRAM', 'telegram_id')
self.telegram_apikey = self.check_setting_str('TELEGRAM', 'telegram_apikey', censor=True)
# JOIN SETTINGS
self.use_join = self.check_setting_bool('JOIN', 'use_join')
self.join_notify_onsnatch = self.check_setting_bool('JOIN', 'join_notify_onsnatch')
self.join_notify_ondownload = self.check_setting_bool('JOIN', 'join_notify_ondownload')
self.join_notify_onsubtitledownload = self.check_setting_bool('JOIN',
'join_notify_onsubtitledownload')
self.join_id = self.check_setting_str('JOIN', 'join_id')
self.join_apikey = self.check_setting_str('JOIN', 'join_apikey', censor=True)
# PROWL SETTINGS
self.use_prowl = self.check_setting_bool('Prowl', 'use_prowl')
self.prowl_notify_onsnatch = self.check_setting_bool('Prowl', 'prowl_notify_onsnatch')
......@@ -2128,6 +2151,14 @@ class Config(object):
'telegram_id': self.telegram_id,
'telegram_apikey': self.telegram_apikey,
},
'JOIN': {
'use_join': int(self.use_join),
'join_notify_onsnatch': int(self.join_notify_onsnatch),
'join_notify_ondownload': int(self.join_notify_ondownload),
'join_notify_onsubtitledownload': int(self.join_notify_onsubtitledownload),
'join_id': self.join_id,
'join_apikey': self.join_apikey,
},
'Prowl': {
'use_prowl': int(self.use_prowl),
'prowl_notify_onsnatch': int(self.prowl_notify_onsnatch),
......
......@@ -713,6 +713,15 @@ class Home(WebHandler):
else:
return _('Error sending Telegram notification: {message}').format(message=message)
@staticmethod
def testJoin(join_id=None, join_apikey=None):
result, message = sickrage.app.notifier_providers['join'].test_notify(join_id, join_apikey)
if result:
return _('Join notification succeeded. Check your Join clients to make sure it worked')
else:
return _('Error sending Join notification: {message}').format(message=message)
@staticmethod
def testGrowl(host=None, password=None):
host = clean_host(host, default_port=23053)
......@@ -4400,6 +4409,8 @@ class ConfigNotifications(Config):
freemobile_notify_onsubtitledownload=None, freemobile_id=None, freemobile_apikey=None,
use_telegram=None, telegram_notify_onsnatch=None, telegram_notify_ondownload=None,
telegram_notify_onsubtitledownload=None, telegram_id=None, telegram_apikey=None,
use_join=None, join_notify_onsnatch=None, join_notify_ondownload=None,
join_notify_onsubtitledownload=None, join_id=None, join_apikey=None,
use_prowl=None, prowl_notify_onsnatch=None, prowl_notify_ondownload=None,
prowl_notify_onsubtitledownload=None, prowl_api=None, prowl_priority=0,
use_twitter=None, twitter_notify_onsnatch=None, twitter_notify_ondownload=None,
......@@ -4515,6 +4526,16 @@ class ConfigNotifications(Config):
sickrage.app.config.telegram_id = telegram_id
sickrage.app.config.telegram_apikey = telegram_apikey
sickrage.app.config.use_join = checkbox_to_value(use_join)
sickrage.app.config.join_notify_onsnatch = checkbox_to_value(
join_notify_onsnatch)
sickrage.app.config.join_notify_ondownload = checkbox_to_value(
join_notify_ondownload)
sickrage.app.config.join_notify_onsubtitledownload = checkbox_to_value(
join_notify_onsubtitledownload)
sickrage.app.config.join_id = join_id
sickrage.app.config.join_apikey = join_apikey
sickrage.app.config.use_prowl = checkbox_to_value(use_prowl)
sickrage.app.config.prowl_notify_onsnatch = checkbox_to_value(
prowl_notify_onsnatch)
......
......@@ -2404,6 +2404,143 @@
<hr/>
<div class="form-row">
<div class="col-lg-3 col-md-4 col-sm-4 card-title">
<h3>
<a href="${anon_url('https://joaoapps.com/join/')}" rel="noreferrer"
onclick="window.open(this.href, '_blank'); return false;">
<i class="sickrage-notifiers sickrage-notifiers-join" title="Join"></i>
${_('Join')}
</a>
</h3>
<small class="form-text text-muted">
${_('Join all of your devices together')}
</small>
</div>
<fieldset class="col-lg-9 col-md-8 col-sm-8 card-text">
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Enable')}</label>
</div>
<div class="col-lg-9 col-md-8 col-sm-7 component-desc">
<label for="use_join">
<input type="checkbox" class="enabler toggle color-primary is-material" name="use_join"
id="use_join" ${('', 'checked')[bool(sickrage.app.config.use_join)]}/>
${_('send Join notifications?')}
</label>
</div>
</div>
<div id="content_use_join">
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Notify on snatch')}</label>
</div>
<div class="col-lg-9 col-md-8 col-sm-7 component-desc">
<label for="join_notify_onsnatch">
<input type="checkbox" class="toggle color-primary is-material" name="join_notify_onsnatch"
id="join_notify_onsnatch" ${('', 'checked')[bool(sickrage.app.config.join_notify_onsnatch)]}/>
${_('send a message when a download starts?')}
</label>
</div>
</div>
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Notify on download')}</label>
</div>
<div class="col-lg-9 col-md-8 col-sm-7 component-desc">
<label for="join_notify_ondownload">
<input type="checkbox" class="toggle color-primary is-material" name="join_notify_ondownload"
id="join_notify_ondownload" ${('', 'checked')[bool(sickrage.app.config.join_notify_ondownload)]}/>
${_('send a message when a download finishes?')}
</label>
</div>
</div>
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Notify on subtitle download')}</label>
</div>
<div class="col-lg-9 col-md-8 col-sm-7 component-desc">
<label for="join_notify_onsubtitledownload">
<input type="checkbox" class="toggle color-primary is-material" name="join_notify_onsubtitledownload"
id="join_notify_onsubtitledownload" ${('', 'checked')[bool(sickrage.app.config.join_notify_onsubtitledownload)]}/>
${_('send a message when subtitles are downloaded?')}
</label>
</div>
</div>
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Device ID')}</label>
</div>
<div class="col-lg-9 col-md-8 col-sm-7 component-desc">
<div class="form-row">
<div class="col-md-12">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><span class="fas fa-user"></span></span>
</div>
<input name="join_id" id="join_id"
value="${sickrage.app.config.join_id}"
class="form-control"
placeholder="${_('ex. 12345678')}"
autocapitalize="off"/>
</div>
<label class="text-info" for="join_id">
${_('per device specific id')}
</label>
</div>
</div>
</div>
</div>
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('API Key')}</label>
</div>
<div class="col-lg-9 col-md-8 col-sm-7 component-desc">
<div class="form-row">
<div class="col-md-12">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><span class="fas fa-cloud"></span></span>
</div>
<input name="join_apikey" id="join_apikey"
value="${sickrage.app.config.join_apikey}"
class="form-control"
placeholder="${_('enter your API key')}"
autocapitalize="off"/>
</div>
<label class="text-info" for="join_apikey">
<a href="${anon_url('https://joaoapps.com/join/web')}" rel="noreferrer" onclick="window.open(this.href, '_blank'); return false;"><b>${_('click here')}</b></a>${_(' to create a Join API key')}
</label>
</div>
</div>
</div>
</div>
<div class="form-row">
<div class="col-md-12">
<div class="card mb-3">
<div class="card-text m-1">
<div id="testJoin-result">${_('Click below to test')}</div>
</div>
</div>
</div>
</div>
<div class="form-row">
<div class="col-md-12">
<input class="btn" type="button" value="${_('Test Join')}"
id="testJoin"/>
<input type="submit" class="config_submitter btn" value="${_('Save Changes')}"/>
</div>
</div>
</div><!-- /content_use_join //-->
</fieldset>
</div><!-- /join tab-pane //-->
<hr/>
<div class="form-row">
<div class="col-lg-3 col-md-4 col-sm-4 card-title">
<h3>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment