Showing with 2,279 additions and 636 deletions.
  1. +19 −1 CHANGES.md
  2. +38 −13 SickBeard.py
  3. +56 −1 gui/slick/css/dark.css
  4. +60 −4 gui/slick/css/light.css
  5. +181 −36 gui/slick/css/style.css
  6. +11 −0 gui/slick/interfaces/default/config_general.tmpl
  7. +0 −12 gui/slick/interfaces/default/config_search.tmpl
  8. +3 −3 gui/slick/interfaces/default/displayShow.tmpl
  9. +4 −4 gui/slick/interfaces/default/editShow.tmpl
  10. +3 −3 gui/slick/interfaces/default/history.tmpl
  11. +1 −0 gui/slick/interfaces/default/home_addExistingShow.tmpl
  12. +4 −4 gui/slick/interfaces/default/inc_addShowOptions.tmpl
  13. +5 −5 gui/slick/interfaces/default/inc_blackwhitelist.tmpl
  14. +71 −11 gui/slick/interfaces/default/inc_bottom.tmpl
  15. +2 −2 gui/slick/interfaces/default/inc_displayShow.tmpl
  16. +63 −30 gui/slick/interfaces/default/inc_qualityChooser.tmpl
  17. +207 −85 gui/slick/interfaces/default/manage_manageSearches.tmpl
  18. +6 −6 gui/slick/interfaces/default/manage_massEdit.tmpl
  19. +4 −4 gui/slick/js/addShowOptions.js
  20. +5 −0 gui/slick/js/config.js
  21. +48 −11 gui/slick/js/manageSearches.js
  22. +1 −1 gui/slick/js/newShow.js
  23. +54 −11 gui/slick/js/qualityChooser.js
  24. +21 −23 sickbeard/__init__.py
  25. +6 −0 sickbeard/auto_post_processer.py
  26. +22 −0 sickbeard/common.py
  27. +3 −25 sickbeard/config.py
  28. +62 −63 sickbeard/databases/cache_db.py
  29. +1 −0 sickbeard/databases/failed_db.py
  30. +22 −1 sickbeard/databases/mainDB.py
  31. +23 −1 sickbeard/db.py
  32. +18 −13 sickbeard/event_queue.py
  33. +60 −1 sickbeard/helpers.py
  34. +8 −1 sickbeard/name_parser/parser.py
  35. +27 −16 sickbeard/name_parser/regexes.py
  36. +4 −1 sickbeard/network_timezones.py
  37. +181 −59 sickbeard/properFinder.py
  38. +2 −0 sickbeard/providers/alpharatio.py
  39. +1 −1 sickbeard/providers/anizb.py
  40. +2 −0 sickbeard/providers/beyondhd.py
  41. +2 −0 sickbeard/providers/bithdtv.py
  42. +2 −0 sickbeard/providers/bitmetv.py
  43. +2 −0 sickbeard/providers/blutopia.py
  44. +32 −24 sickbeard/providers/btn.py
  45. +3 −1 sickbeard/providers/btscene.py
  46. +2 −0 sickbeard/providers/dh.py
  47. +5 −0 sickbeard/providers/ettv.py
  48. +2 −0 sickbeard/providers/fano.py
  49. +2 −0 sickbeard/providers/filelist.py
  50. +2 −0 sickbeard/providers/funfile.py
  51. +498 −27 sickbeard/providers/generic.py
  52. +2 −0 sickbeard/providers/gftracker.py
  53. +2 −0 sickbeard/providers/grabtheinfo.py
  54. +2 −0 sickbeard/providers/hd4free.py
  55. +4 −2 sickbeard/providers/hdbits.py
  56. +2 −0 sickbeard/providers/hdspace.py
  57. +2 −0 sickbeard/providers/hdtorrents.py
  58. +2 −0 sickbeard/providers/iptorrents.py
  59. +2 −0 sickbeard/providers/limetorrents.py
  60. +2 −0 sickbeard/providers/magnetdl.py
  61. +3 −0 sickbeard/providers/morethan.py
  62. +2 −0 sickbeard/providers/ncore.py
  63. +5 −1 sickbeard/providers/nebulance.py
  64. +51 −11 sickbeard/providers/newznab.py
  65. +2 −0 sickbeard/providers/nyaa.py
  66. +18 −1 sickbeard/providers/omgwtfnzbs.py
  67. +2 −0 sickbeard/providers/pisexy.py
  68. +5 −0 sickbeard/providers/potuk.py
  69. +1 −2 sickbeard/providers/pretome.py
  70. +2 −0 sickbeard/providers/privatehd.py
  71. +5 −0 sickbeard/providers/ptf.py
  72. +4 −2 sickbeard/providers/rarbg.py
  73. +2 −0 sickbeard/providers/revtt.py
  74. +4 −4 sickbeard/providers/rsstorrent.py
  75. +2 −0 sickbeard/providers/scenehd.py
  76. +2 −0 sickbeard/providers/scenetime.py
  77. +9 −2 sickbeard/providers/shazbat.py
  78. +2 −0 sickbeard/providers/skytorrents.py
  79. +2 −0 sickbeard/providers/speedcd.py
  80. +3 −1 sickbeard/providers/thepiratebay.py
  81. +4 −1 sickbeard/providers/tokyotoshokan.py
  82. +2 −0 sickbeard/providers/torlock.py
  83. +3 −1 sickbeard/providers/torrentbytes.py
  84. +2 −0 sickbeard/providers/torrentday.py
  85. +2 −0 sickbeard/providers/torrenting.py
  86. +2 −0 sickbeard/providers/torrentleech.py
  87. +2 −0 sickbeard/providers/torrentz2.py
  88. +2 −0 sickbeard/providers/tvchaosuk.py
  89. +2 −0 sickbeard/providers/wop.py
  90. +2 −0 sickbeard/providers/zooqle.py
  91. +21 −43 sickbeard/rssfeeds.py
  92. +29 −4 sickbeard/scheduler.py
  93. +8 −1 sickbeard/search.py
  94. +6 −2 sickbeard/search_propers.py
  95. +56 −16 sickbeard/search_queue.py
  96. +7 −1 sickbeard/show_updater.py
  97. +6 −0 sickbeard/subtitles.py
  98. +1 −1 sickbeard/tvcache.py
  99. +57 −35 sickbeard/webserve.py
  100. +8 −0 tests/db_tests.py
  101. +9 −1 tests/name_parser_tests.py
  102. +41 −0 tests/search_tests.py
@@ -1,4 +1,22 @@
### 0.13.15 (2018-01-26 10:30:00 UTC)
### 0.14.0 (2018-02-01 02:30:00 UTC)

* Change improve core scheduler logic
* Change improve media process to parse anime format 'Show Name 123 - 001 - Ep 1 name'
* Add free space stat (if obtainable) of parent folder(s) to footer
* Add option "Display disk free" to general config/interface page (default enabled)
* Add a provider error table to page Manage/Media Search
* Add failure handling, skip provider for x hour(s) depending on count of failures
* Add detection of Too Many Requests (Supporting providers UC and BTN)
* Add footer icon button to switch time layouts
* Add performance gains for proper search by integrating it into recent search
* Add the once per day proper finder time to footer, this process catches any propers missed during recent searches
* Add ability to differentiate webdl/rip sources so overwriting propers is always done from the same source (e.g. AMZN)
* Change layout of quality custom to improve clarity
* Change tweak text of SD DVD to include BD/BR
* Change TBy prov add UHD cat


### 0.13.15 (2018-01-26 10:30:00 UTC)

* Fix save on config general

@@ -76,6 +76,7 @@
from lib.configobj import ConfigObj

throwaway = datetime.datetime.strptime('20110101', '%Y%m%d')
rollback_loaded = None

signal.signal(signal.SIGINT, sickbeard.sig_handler)
signal.signal(signal.SIGTERM, sickbeard.sig_handler)
@@ -153,6 +154,19 @@ def help_message():

return '\n'.join(help_msg)

@staticmethod
def execute_rollback(mo, max_v):
global rollback_loaded
try:
if None is rollback_loaded:
rollback_loaded = db.get_rollback_module()
if None is not rollback_loaded:
rollback_loaded.__dict__[mo]().run(max_v)
else:
print(u'ERROR: Could not download Rollback Module.')
except (StandardError, Exception):
pass

def start(self):
# do some preliminary stuff
sickbeard.MY_FULLNAME = os.path.normpath(os.path.abspath(__file__))
@@ -324,14 +338,28 @@ def start(self):
print('Stack Size %s not set: %s' % (stack_size, e.message))

# check all db versions
for d, min_v, max_v, mo in [
('failed.db', sickbeard.failed_db.MIN_DB_VERSION, sickbeard.failed_db.MAX_DB_VERSION, 'FailedDb'),
('cache.db', sickbeard.cache_db.MIN_DB_VERSION, sickbeard.cache_db.MAX_DB_VERSION, 'CacheDb'),
('sickbeard.db', sickbeard.mainDB.MIN_DB_VERSION, sickbeard.mainDB.MAX_DB_VERSION, 'MainDb')
for d, min_v, max_v, base_v, mo in [
('failed.db', sickbeard.failed_db.MIN_DB_VERSION, sickbeard.failed_db.MAX_DB_VERSION, sickbeard.failed_db.TEST_BASE_VERSION, 'FailedDb'),
('cache.db', sickbeard.cache_db.MIN_DB_VERSION, sickbeard.cache_db.MAX_DB_VERSION, sickbeard.cache_db.TEST_BASE_VERSION, 'CacheDb'),
('sickbeard.db', sickbeard.mainDB.MIN_DB_VERSION, sickbeard.mainDB.MAX_DB_VERSION, sickbeard.mainDB.TEST_BASE_VERSION, 'MainDb')
]:
cur_db_version = db.DBConnection(d).checkDBVersion()

if cur_db_version > 0:
# handling of standalone TEST db versions
if cur_db_version >= 100000 and cur_db_version != max_v:
print('Your [%s] database version (%s) is a test db version and doesn\'t match SickGear required '
'version (%s), downgrading to production db' % (d, cur_db_version, max_v))
self.execute_rollback(mo, max_v)
cur_db_version = db.DBConnection(d).checkDBVersion()
if cur_db_version >= 100000:
print(u'Rollback to production failed.')
sys.exit(u'If you have used other forks, your database may be unusable due to their changes')
if 100000 <= max_v and None is not base_v:
max_v = base_v # set max_v to the needed base production db for test_db
print(u'Rollback to production of [%s] successful.' % d)

# handling of production db versions
if 0 < cur_db_version < 100000:
if cur_db_version < min_v:
print(u'Your [%s] database version (%s) is too old to migrate from with this version of SickGear'
% (d, cur_db_version))
@@ -341,19 +369,16 @@ def start(self):
print(u'Your [%s] database version (%s) has been incremented past'
u' what this version of SickGear supports. Trying to rollback now. Please wait...' %
(d, cur_db_version))
try:
rollback_loaded = db.get_rollback_module()
if None is not rollback_loaded:
rollback_loaded.__dict__[mo]().run(max_v)
else:
print(u'ERROR: Could not download Rollback Module.')
except (StandardError, Exception):
pass
self.execute_rollback(mo, max_v)
if db.DBConnection(d).checkDBVersion() > max_v:
print(u'Rollback failed.')
sys.exit(u'If you have used other forks, your database may be unusable due to their changes')
print(u'Rollback of [%s] successful.' % d)

# free memory
global rollback_loaded
rollback_loaded = None

# Initialize the config and our threads
sickbeard.initialize(console_logging=self.console_logging)

@@ -336,6 +336,7 @@ home_newShow.tmpl
color:#707070
}

.btn-inverse.dark-bg,
#addRootDirTable td label .filepath,
.grey-text{color:#999}
.highlight-text{color:#fff}
@@ -762,6 +763,60 @@ a.whitelink{

}

/* TABLE BACKGROUND color */
.provider-failures.hover-highlight td:before,
.provider-failures.focus-highlight td:before{
background:#222
}

/* ODD ZEBRA STRIPE color (needs zebra widget) */
.provider-failures.hover-highlight .odd td:before,
.provider-failures.hover-highlight .odd th:before,
.provider-failures.focus-highlight .odd td:before,
.provider-failures.focus-highlight .odd th:before{
background:#333
}
/* EVEN ZEBRA STRIPE color (needs zebra widget) */
.provider-failures.hover-highlight .even td:before,
.provider-failures.hover-highlight .even th:before,
.provider-failures.focus-highlight .even td:before,
.provider-failures.focus-highlight .even th:before{
background-color:#2e2e2e
}

/* HOVER ROW highlight colors */
.provider-failures.hover-highlight tbody > tr:hover > td, /* override tablesorter theme row hover */
.provider-failures.hover-highlight tbody > tr.odd:hover > td,
.provider-failures.hover-highlight tbody > tr.even:hover > td{
background-color:#282828
}
/* HOVER COLUMN highlight colors */
.provider-failures.hover-highlight tbody tr th:hover::after,
.provider-failures.hover-highlight tbody tr td:hover::after{
background-color:#282828
}

/* FOCUS ROW highlight color (touch devices) */
.provider-failures.focus-highlight td:focus::before,
.provider-failures.focus-highlight th:focus::before{
background-color:#181818
}
/* FOCUS COLUMN highlight color (touch devices) */
.provider-failures.focus-highlight td:focus::after,
.provider-failures.focus-highlight th:focus::after{
background-color:#181818
}
/* FOCUS CELL highlight color */
.provider-failures.focus-highlight th:focus,
.provider-failures.focus-highlight td:focus,
.provider-failures.focus-highlight .odd th:focus,
.provider-failures.focus-highlight .odd td:focus,
.provider-failures.focus-highlight .even th:focus,
.provider-failures.focus-highlight .even td:focus{
background-color:#181818;
color:#ddd
}

/* =======================================================================
404.tmpl
========================================================================== */
@@ -1374,7 +1429,7 @@ div.formpaginate .prev, div.formpaginate .next{
background:#2265a1
}

#customQualityWrapper .tip-text p{
#custom-quality-wrapper .tip-text p{
color:#999
}

@@ -29,6 +29,7 @@ pre .prelight-num{
background-image:url("../images/glyphicons-halflings-white.png")
}

.dark-bg .icon-glyph,
.icon-white{
background-image:url("../images/glyphicons-halflings.png")
}
@@ -351,6 +352,7 @@ home_newShow.tmpl
color:#909090
}

.btn-inverse.dark-bg,
#addRootDirTable td label .filepath,
.grey-text{color:#666}
.highlight-text{color:#000}
@@ -742,6 +744,60 @@ a.whitelink{
color:#000
}

/* TABLE BACKGROUND color */
.provider-failures.hover-highlight td:before,
.provider-failures.focus-highlight td:before{
background:#fff
}

/* ODD ZEBRA STRIPE color (needs zebra widget) */
.provider-failures.hover-highlight .odd th:before,
.provider-failures.hover-highlight .odd td:before,
.provider-failures.focus-highlight .odd th:before,
.provider-failures.focus-highlight .odd td:before{
background:#f5f1e4
}
/* EVEN ZEBRA STRIPE color (needs zebra widget) */
.provider-failures.hover-highlight .even th:before,
.provider-failures.hover-highlight .even td:before,
.provider-failures.focus-highlight .even th:before,
.provider-failures.focus-highlight .even td:before{
background-color:#dfdacf;
}

/* HOVER ROW highlight colors */
.provider-failures.hover-highlight tbody > tr:hover > td, /* override tablesorter theme row hover */
.provider-failures.hover-highlight tbody > tr.odd:hover > td,
.provider-failures.hover-highlight tbody > tr.even:hover > td{
background-color:#f4f3c2
}
/* HOVER COLUMN highlight colors */
.provider-failures.hover-highlight tbody tr th:hover::after,
.provider-failures.hover-highlight tbody tr td:hover::after{
background-color:#f4f3c2
}

/* FOCUS ROW highlight color (touch devices) */
.provider-failures.focus-highlight th:focus::before,
.provider-failures.focus-highlight td:focus::before{
background-color:#dfdead
}
/* FOCUS COLUMN highlight color (touch devices) */
.provider-failures.focus-highlight th:focus::after,
.provider-failures.focus-highlight td:focus::after{
background-color:#dfdead
}
/* FOCUS CELL highlight color */
.provider-failures.focus-highlight th:focus,
.provider-failures.focus-highlight td:focus,
.provider-failures.focus-highlight .odd th:focus,
.provider-failures.focus-highlight .odd td:focus,
.provider-failures.focus-highlight .even th:focus,
.provider-failures.focus-highlight .even td:focus{
background-color:#dfdead;
color:#222
}

/* =======================================================================
404.tmpl
========================================================================== */
@@ -1335,7 +1391,7 @@ div.formpaginate .prev, div.formpaginate .next{
background:#57442b
}

#customQualityWrapper .tip-text p{
#custom-quality-wrapper .tip-text p{
color:#666
}

@@ -1381,8 +1437,8 @@ tablesorter.css
}

thead.tablesorter-stickyHeader{
border-top:2px solid #fff;
border-bottom:2px solid #fff
border-top:2px solid #ddd;
border-bottom:2px solid #ddd
}

/* Zebra Widget - row alternating colors */
@@ -1404,7 +1460,7 @@ thead.tablesorter-stickyHeader{
}

.tablesorter tfoot tr{
color:#fff;
color:#ddd;
text-align:center;
text-shadow:-1px -1px 0 rgba(0, 0, 0, 0.3);
background-color:#333;