diff --git a/CHANGES.md b/CHANGES.md
index eba00b81..82575510 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -78,6 +78,7 @@
* Add provider Anizb
* Change TorrentDay to use its 2.x interface
* Add button 'Discover' Emby server to notifications
+* Add Bit-HDTV torrent provider
### 0.11.11 (2016-04-05 19:20:00 UTC)
diff --git a/gui/slick/images/providers/bithdtv.png b/gui/slick/images/providers/bithdtv.png
new file mode 100644
index 00000000..e2b2969e
Binary files /dev/null and b/gui/slick/images/providers/bithdtv.png differ
diff --git a/sickbeard/helpers.py b/sickbeard/helpers.py
index 78840870..abc98316 100644
--- a/sickbeard/helpers.py
+++ b/sickbeard/helpers.py
@@ -1173,6 +1173,10 @@ def getURL(url, post_data=None, params=None, headers=None, timeout=30, session=N
resp = session.post(url, timeout=timeout, **kwargs)
else:
resp = session.get(url, timeout=timeout, **kwargs)
+ if resp.ok and not resp.content and 'url=' in resp.headers.get('Refresh', '').lower():
+ parsed[2] = '/%s' % resp.headers.get('Refresh').lower().split('url=')[1].strip('/')
+ url = urlparse.urlunparse(parsed)
+ resp = session.get(url, timeout=timeout, **kwargs)
if not resp.ok:
if resp.status_code in clients.http_error_code:
diff --git a/sickbeard/providers/__init__.py b/sickbeard/providers/__init__.py
index 007d8747..7b51ee94 100755
--- a/sickbeard/providers/__init__.py
+++ b/sickbeard/providers/__init__.py
@@ -26,11 +26,11 @@ from sickbeard import logger, encodingKludge as ek
# usenet
from . import newznab, omgwtfnzbs, womble
# torrent
-from . import alpharatio, anizb, beyondhd, bitmetv, btn, filelist, freshontv, funfile, gftracker, grabtheinfo, \
+from . import alpharatio, beyondhd, bithdtv, bitmetv, btn, filelist, freshontv, funfile, gftracker, grabtheinfo, \
hd4free, hdbits, hdspace, iptorrents, kat, morethan, pisexy, pretome, rarbg, scc, scenetime, shazbat, speedcd, \
thepiratebay, torrentbytes, torrentday, torrenting, torrentleech, torrentshack, transmithe_net, tvchaosuk
# anime
-from . import nyaatorrents, tokyotoshokan
+from . import anizb, nyaatorrents, tokyotoshokan
# custom
try:
from . import custom01
@@ -42,6 +42,7 @@ __all__ = ['omgwtfnzbs',
'alpharatio',
'anizb',
'beyondhd',
+ 'bithdtv',
'bitmetv',
'btn',
'custom01',
diff --git a/sickbeard/providers/bithdtv.py b/sickbeard/providers/bithdtv.py
new file mode 100644
index 00000000..5fabd99a
--- /dev/null
+++ b/sickbeard/providers/bithdtv.py
@@ -0,0 +1,113 @@
+# coding=utf-8
+#
+# This file is part of SickGear.
+#
+# SickGear is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# SickGear is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with SickGear. If not, see