Skip to content

Commit 630fb45

Browse files
author
Patrick Vos
committed
Merge branch 'development'
* development: Change initial search run delay times to lower values Change download stats 'back' Added support for the new append method from NZBGet 13+. Pull #851 Removed notifier Boxcar. Pull #852
2 parents e03081a + b0897b2 commit 630fb45

File tree

11 files changed

+33
-278
lines changed

11 files changed

+33
-278
lines changed

data/images/notifiers/boxcar.png

-1.5 KB
Binary file not shown.

data/interfaces/default/config_notifications.tmpl

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -698,54 +698,6 @@
698698
</fieldset>
699699
</div><!-- /pushover component-group //-->
700700

701-
<div class="component-group clearfix">
702-
<div class="component-group-desc">
703-
<img class="notifier-icon" src="$sbRoot/images/notifiers/boxcar.png" alt="" title="Boxcar" />
704-
<h3><a href="http://boxcar.io/" rel="noreferrer" onclick="window.open('${sickbeard.ANON_REDIRECT}' + this.href, '_blank'); return false;">Boxcar</a></h3>
705-
<p>Universal push notification for iOS. Read your messages where and when you want them! A subscription will be sent if needed.</p>
706-
</div>
707-
<fieldset class="component-group-list">
708-
<div class="field-pair">
709-
<input type="checkbox" class="enabler" name="use_boxcar" id="use_boxcar" #if $sickbeard.USE_BOXCAR then "checked=\"checked\"" else ""# />
710-
<label class="clearfix" for="use_boxcar">
711-
<span class="component-title">Enable</span>
712-
<span class="component-desc">Should Sick Beard send Boxcar notifications?</span>
713-
</label>
714-
</div>
715-
716-
<div id="content_use_boxcar">
717-
<div class="field-pair">
718-
<input type="checkbox" name="boxcar_notify_onsnatch" id="boxcar_notify_onsnatch" #if $sickbeard.BOXCAR_NOTIFY_ONSNATCH then "checked=\"checked\"" else ""# />
719-
<label class="clearfix" for="boxcar_notify_onsnatch">
720-
<span class="component-title">Notify on Snatch</span>
721-
<span class="component-desc">Send notification when we start a download?</span>
722-
</label>
723-
</div>
724-
<div class="field-pair">
725-
<input type="checkbox" name="boxcar_notify_ondownload" id="boxcar_notify_ondownload" #if $sickbeard.BOXCAR_NOTIFY_ONDOWNLOAD then "checked=\"checked\"" else ""# />
726-
<label class="clearfix" for="boxcar_notify_ondownload">
727-
<span class="component-title">Notify on Download</span>
728-
<span class="component-desc">Send notification when we finish a download?</span>
729-
</label>
730-
</div>
731-
<div class="field-pair">
732-
<label class="nocheck clearfix">
733-
<span class="component-title">Boxcar Username</span>
734-
<input type="text" name="boxcar_username" id="boxcar_username" value="$sickbeard.BOXCAR_USERNAME" size="35" />
735-
</label>
736-
<label class="nocheck clearfix">
737-
<span class="component-title">&nbsp;</span>
738-
<span class="component-desc">Username of your Boxcar account</span>
739-
</label>
740-
</div>
741-
<div class="testNotification" id="testBoxcar-result">Click below to test.</div>
742-
<input type="button" class="btn" value="Test Boxcar" id="testBoxcar" />
743-
<input type="submit" class="btn config_submitter" value="Save Changes" />
744-
</div><!-- /content_use_boxcar //-->
745-
746-
</fieldset>
747-
</div><!-- /boxcar component-group //-->
748-
749701
<div class="component-group clearfix">
750702
<div class="component-group-desc">
751703
<img class="notifier-icon" src="$sbRoot/images/notifiers/boxcar2.png" alt="" title="Boxcar2" />

data/interfaces/default/home.tmpl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919

2020
#set $sql_statement = 'SELECT showid, '
2121

22-
#set $sql_statement += '(SELECT COUNT(*) FROM tv_episodes WHERE showid=tv_eps.showid AND season > 0 AND episode > 0 AND airdate > 1 AND status IN ' + $status_quality + ') AS ep_snatched, '
23-
#set $sql_statement += '(SELECT COUNT(*) FROM tv_episodes WHERE showid=tv_eps.showid AND season > 0 AND episode > 0 AND airdate > 1 AND status IN ' + $status_download + ') AS ep_downloaded, '
22+
#set $sql_statement += '(SELECT COUNT(*) FROM tv_episodes WHERE showid=tv_eps.showid AND season > 0 AND episode > 0 AND status IN ' + $status_quality + ') AS ep_snatched, '
23+
#set $sql_statement += '(SELECT COUNT(*) FROM tv_episodes WHERE showid=tv_eps.showid AND season > 0 AND episode > 0 AND status IN ' + $status_download + ') AS ep_downloaded, '
2424

25-
#set $sql_statement += '(SELECT COUNT(*) FROM tv_episodes WHERE showid=tv_eps.showid AND season > 0 AND episode > 0 AND airdate > 1 '
26-
#set $sql_statement += ' AND ((airdate <= ' + $today + ' AND (status = ' + str($SKIPPED) + ' OR status = ' + str($WANTED) + ')) '
25+
#set $sql_statement += '(SELECT COUNT(*) FROM tv_episodes WHERE showid=tv_eps.showid AND season > 0 AND episode > 0 '
26+
#set $sql_statement += ' AND ((airdate > 1 AND airdate <= ' + $today + ' AND (status = ' + str($SKIPPED) + ' OR status = ' + str($WANTED) + ')) '
2727
#set $sql_statement += ' OR (status IN ' + status_quality + ') OR (status IN ' + status_download + '))) AS ep_total, '
2828

2929
#set $sql_statement += ' (SELECT airdate FROM tv_episodes WHERE showid=tv_eps.showid AND airdate >= ' + $today + ' AND status = ' + str($UNAIRED) + ' ORDER BY airdate ASC LIMIT 1) AS ep_airs_next '
@@ -189,10 +189,9 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name))
189189
#end if
190190

191191
#if $cur_total != 0:
192-
#set $download_stat = str($cur_downloaded)
192+
#set $download_stat = str($cur_downloaded + $cur_snatched)
193193
#set $download_stat_tip = "Downloaded: " + str($cur_downloaded)
194194
#if $cur_snatched > 0:
195-
#set $download_stat = download_stat + "+" + str($cur_snatched)
196195
#set $download_stat_tip = download_stat_tip + "&#013;" + "Snatched: " + str($cur_snatched)
197196
#end if
198197
#set $download_stat = download_stat + " / " + str($cur_total)

data/interfaces/default/inc_bottom.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414

1515
#set $sql_statement = 'SELECT '
1616

17-
#set $sql_statement += '(SELECT COUNT(*) FROM tv_episodes WHERE season > 0 AND episode > 0 AND airdate > 1 AND status IN ' + $status_quality + ') AS ep_snatched, '
18-
#set $sql_statement += '(SELECT COUNT(*) FROM tv_episodes WHERE season > 0 AND episode > 0 AND airdate > 1 AND status IN ' + $status_download + ') AS ep_downloaded, '
17+
#set $sql_statement += '(SELECT COUNT(*) FROM tv_episodes WHERE season > 0 AND episode > 0 AND status IN ' + $status_quality + ') AS ep_snatched, '
18+
#set $sql_statement += '(SELECT COUNT(*) FROM tv_episodes WHERE season > 0 AND episode > 0 AND status IN ' + $status_download + ') AS ep_downloaded, '
1919

20-
#set $sql_statement += '(SELECT COUNT(*) FROM tv_episodes WHERE season > 0 AND episode > 0 AND airdate > 1 '
21-
#set $sql_statement += ' AND ((airdate <= ' + $today + ' AND (status = ' + str($SKIPPED) + ' OR status = ' + str($WANTED) + ')) '
20+
#set $sql_statement += '(SELECT COUNT(*) FROM tv_episodes WHERE season > 0 AND episode > 0 '
21+
#set $sql_statement += ' AND ((airdate > 1 AND airdate <= ' + $today + ' AND (status = ' + str($SKIPPED) + ' OR status = ' + str($WANTED) + ')) '
2222
#set $sql_statement += ' OR (status IN ' + status_quality + ') OR (status IN ' + status_download + '))) AS ep_total '
2323

2424
#set $sql_statement += ' FROM tv_episodes tv_eps LIMIT 1'

data/js/configNotifications.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,6 @@ $(document).ready(function () {
6767
});
6868
});
6969

70-
$("#testBoxcar").click(function () {
71-
var boxcar_username = $.trim($("#boxcar_username").val());
72-
if (!boxcar_username) {
73-
$("#testBoxcar-result").html("Please fill out the necessary fields above.");
74-
return;
75-
}
76-
$(this).prop("disabled", true);
77-
$("#testBoxcar-result").html(loading);
78-
$.get(sbRoot + "/home/testBoxcar", {'username': boxcar_username})
79-
.done(function (data) {
80-
$("#testBoxcar-result").html(data);
81-
$("#testBoxcar").prop("disabled", false);
82-
});
83-
});
84-
8570
$("#testBoxcar2").click(function () {
8671
var boxcar2_access_token = $.trim($("#boxcar2_access_token").val());
8772
var boxcar2_sound = $("#boxcar2_sound").val() || "default";

sickbeard/__init__.py

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,6 @@
246246
TWITTER_PASSWORD = None
247247
TWITTER_PREFIX = None
248248

249-
USE_BOXCAR = False
250-
BOXCAR_NOTIFY_ONSNATCH = False
251-
BOXCAR_NOTIFY_ONDOWNLOAD = False
252-
BOXCAR_USERNAME = None
253-
BOXCAR_PASSWORD = None
254-
255249
USE_BOXCAR2 = False
256250
BOXCAR2_NOTIFY_ONSNATCH = False
257251
BOXCAR2_NOTIFY_ONDOWNLOAD = False
@@ -354,7 +348,6 @@ def initialize(consoleLogging=True):
354348
RENAME_EPISODES, properFinderScheduler, PROVIDER_ORDER, autoPostProcesserScheduler, \
355349
WOMBLE, OMGWTFNZBS, OMGWTFNZBS_USERNAME, OMGWTFNZBS_APIKEY, providerList, newznabProviderList, \
356350
EXTRA_SCRIPTS, USE_TWITTER, TWITTER_USERNAME, TWITTER_PASSWORD, TWITTER_PREFIX, \
357-
USE_BOXCAR, BOXCAR_USERNAME, BOXCAR_PASSWORD, BOXCAR_NOTIFY_ONDOWNLOAD, BOXCAR_NOTIFY_ONSNATCH, \
358351
USE_BOXCAR2, BOXCAR2_ACCESS_TOKEN, BOXCAR2_NOTIFY_ONDOWNLOAD, BOXCAR2_NOTIFY_ONSNATCH, BOXCAR2_SOUND, \
359352
USE_PUSHOVER, PUSHOVER_USERKEY, PUSHOVER_NOTIFY_ONDOWNLOAD, PUSHOVER_NOTIFY_ONSNATCH, \
360353
USE_LIBNOTIFY, LIBNOTIFY_NOTIFY_ONSNATCH, LIBNOTIFY_NOTIFY_ONDOWNLOAD, USE_NMJ, NMJ_HOST, NMJ_DATABASE, NMJ_MOUNT, USE_NMJv2, NMJv2_HOST, NMJv2_DATABASE, NMJv2_DBLOC, \
@@ -589,12 +582,6 @@ def initialize(consoleLogging=True):
589582
TWITTER_PASSWORD = check_setting_str(CFG, 'Twitter', 'twitter_password', '')
590583
TWITTER_PREFIX = check_setting_str(CFG, 'Twitter', 'twitter_prefix', 'Sick Beard')
591584

592-
CheckSection(CFG, 'Boxcar')
593-
USE_BOXCAR = bool(check_setting_int(CFG, 'Boxcar', 'use_boxcar', 0))
594-
BOXCAR_NOTIFY_ONSNATCH = bool(check_setting_int(CFG, 'Boxcar', 'boxcar_notify_onsnatch', 0))
595-
BOXCAR_NOTIFY_ONDOWNLOAD = bool(check_setting_int(CFG, 'Boxcar', 'boxcar_notify_ondownload', 0))
596-
BOXCAR_USERNAME = check_setting_str(CFG, 'Boxcar', 'boxcar_username', '')
597-
598585
CheckSection(CFG, 'Boxcar2')
599586
USE_BOXCAR2 = bool(check_setting_int(CFG, 'Boxcar2', 'use_boxcar2', 0))
600587
BOXCAR2_NOTIFY_ONSNATCH = bool(check_setting_int(CFG, 'Boxcar2', 'boxcar2_notify_onsnatch', 0))
@@ -728,13 +715,13 @@ def initialize(consoleLogging=True):
728715
currentSearchScheduler = scheduler.Scheduler(searchCurrent.CurrentSearcher(),
729716
cycleTime=datetime.timedelta(minutes=SEARCH_FREQUENCY),
730717
threadName="SEARCH",
731-
run_delay=datetime.timedelta(minutes=5)
718+
run_delay=datetime.timedelta(minutes=1)
732719
)
733720

734721
backlogSearchScheduler = searchBacklog.BacklogSearchScheduler(searchBacklog.BacklogSearcher(),
735722
cycleTime=datetime.timedelta(minutes=get_backlog_cycle_time()),
736723
threadName="BACKLOG",
737-
run_delay=datetime.timedelta(minutes=17)
724+
run_delay=datetime.timedelta(minutes=7)
738725
)
739726

740727
backlogSearchScheduler.action.cycleTime = BACKLOG_SEARCH_FREQUENCY
@@ -1131,12 +1118,6 @@ def save_config():
11311118
new_config['Twitter']['twitter_password'] = TWITTER_PASSWORD
11321119
new_config['Twitter']['twitter_prefix'] = TWITTER_PREFIX
11331120

1134-
new_config['Boxcar'] = {}
1135-
new_config['Boxcar']['use_boxcar'] = int(USE_BOXCAR)
1136-
new_config['Boxcar']['boxcar_notify_onsnatch'] = int(BOXCAR_NOTIFY_ONSNATCH)
1137-
new_config['Boxcar']['boxcar_notify_ondownload'] = int(BOXCAR_NOTIFY_ONDOWNLOAD)
1138-
new_config['Boxcar']['boxcar_username'] = BOXCAR_USERNAME
1139-
11401121
new_config['Boxcar2'] = {}
11411122
new_config['Boxcar2']['use_boxcar2'] = int(USE_BOXCAR2)
11421123
new_config['Boxcar2']['boxcar2_notify_onsnatch'] = int(BOXCAR2_NOTIFY_ONSNATCH)

sickbeard/notifiers/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import prowl
3030
from . import libnotify
3131
import pushover
32-
import boxcar
3332
import boxcar2
3433
import nma
3534
import pushalot
@@ -53,7 +52,6 @@
5352
prowl_notifier = prowl.ProwlNotifier()
5453
libnotify_notifier = libnotify.LibnotifyNotifier()
5554
pushover_notifier = pushover.PushoverNotifier()
56-
boxcar_notifier = boxcar.BoxcarNotifier()
5755
boxcar2_notifier = boxcar2.Boxcar2Notifier()
5856
nma_notifier = nma.NMA_Notifier()
5957
pushalot_notifier = pushalot.PushalotNotifier()
@@ -72,7 +70,6 @@
7270
growl_notifier,
7371
prowl_notifier,
7472
pushover_notifier,
75-
boxcar_notifier,
7673
boxcar2_notifier,
7774
nma_notifier,
7875
pushalot_notifier,

sickbeard/notifiers/boxcar.py

Lines changed: 0 additions & 156 deletions
This file was deleted.

0 commit comments

Comments
 (0)