From d092d418913e24cec7201aaa8cdaa6135fb001ff Mon Sep 17 00:00:00 2001 From: JackDandy Date: Wed, 12 Aug 2015 15:16:56 +0100 Subject: [PATCH] Remove "Manage Torrents". --- CHANGES.md | 1 + gui/slick/interfaces/default/inc_top.tmpl | 5 --- .../interfaces/default/manage_torrents.tmpl | 23 ----------- sickbeard/webserve.py | 40 ------------------- 4 files changed, 1 insertion(+), 68 deletions(-) delete mode 100644 gui/slick/interfaces/default/manage_torrents.tmpl diff --git a/CHANGES.md b/CHANGES.md index a9a6b1f7..dad0436f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,6 +13,7 @@ * Add search crawler exclusions * Fix saving default show list group on add new show options page * Remove legacy anime split home option from anime settings tab (new option located in general/interface tab) +* Remove "Manage Torrents" * Update Beautiful Soup 4.3.2 to 4.4.0 (r390) diff --git a/gui/slick/interfaces/default/inc_top.tmpl b/gui/slick/interfaces/default/inc_top.tmpl index 49f12b68..7e93dc9f 100644 --- a/gui/slick/interfaces/default/inc_top.tmpl +++ b/gui/slick/interfaces/default/inc_top.tmpl @@ -179,11 +179,6 @@ #if $sickbeard.USE_KODI and $sickbeard.KODI_HOST != ''
  • Update Kodi
  • #end if -#if $sickbeard.USE_TORRENTS and $sickbeard.TORRENT_METHOD != 'blackhole' \ - and ($sickbeard.ENABLE_HTTPS and $sickbeard.TORRENT_HOST[:5] == 'https' \ - or not $sickbeard.ENABLE_HTTPS and $sickbeard.TORRENT_HOST[:5] == 'http:') -
  • Manage Torrents
  • -#end if #if $sickbeard.USE_FAILED_DOWNLOADS
  • Failed Downloads
  • #end if diff --git a/gui/slick/interfaces/default/manage_torrents.tmpl b/gui/slick/interfaces/default/manage_torrents.tmpl deleted file mode 100644 index 455eeaca..00000000 --- a/gui/slick/interfaces/default/manage_torrents.tmpl +++ /dev/null @@ -1,23 +0,0 @@ -#import sickbeard -#import datetime -#from sickbeard.common import * -## -#set global $title = 'Manage Torrents' -#set global $header = 'Manage Torrents' -#set global $sbPath = '..' -#set global $topmenu = 'manage' -## -#import os.path -#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl') - - -#if $varExists('header') -

    $header

    -#else -

    $title

    -#end if - - $info_download_station - - -#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl') \ No newline at end of file diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index f3496d06..b75ea6de 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -518,7 +518,6 @@ class Home(MainHandler): {'title': 'Update XBMC', 'path': 'home/updateXBMC/', 'requires': self.haveXBMC}, {'title': 'Update Kodi', 'path': 'home/updateKODI/', 'requires': self.haveKODI}, {'title': 'Update Plex', 'path': 'home/updatePLEX/', 'requires': self.havePLEX}, - {'title': 'Manage Torrents', 'path': 'manage/manageTorrents', 'requires': self.haveTORRENT}, {'title': 'Restart', 'path': 'home/restart/?pid=' + str(sickbeard.PID), 'confirm': True}, {'title': 'Shutdown', 'path': 'home/shutdown/?pid=' + str(sickbeard.PID), 'confirm': True}, ] @@ -535,15 +534,6 @@ class Home(MainHandler): def havePLEX(): return sickbeard.USE_PLEX and sickbeard.PLEX_UPDATE_LIBRARY - @staticmethod - def haveTORRENT(): - if sickbeard.USE_TORRENTS and sickbeard.TORRENT_METHOD != 'blackhole' \ - and (sickbeard.ENABLE_HTTPS and sickbeard.TORRENT_HOST[:5] == 'https' - or not sickbeard.ENABLE_HTTPS and sickbeard.TORRENT_HOST[:5] == 'http:'): - return True - else: - return False - @staticmethod def _getEpisode(show, season=None, episode=None, absolute=None): if show is None: @@ -2518,11 +2508,6 @@ class Manage(MainHandler): {'title': 'Show Queue Overview', 'path': 'manage/showQueueOverview/'}, {'title': 'Episode Status Management', 'path': 'manage/episodeStatuses/'}, ] - if sickbeard.USE_TORRENTS and sickbeard.TORRENT_METHOD != 'blackhole' \ - and (sickbeard.ENABLE_HTTPS and sickbeard.TORRENT_HOST[:5] == 'https' - or not sickbeard.ENABLE_HTTPS and sickbeard.TORRENT_HOST[:5] == 'http:'): - manageMenu.append({'title': 'Manage Torrents', 'path': 'manage/manageTorrents/'}) - if sickbeard.USE_SUBTITLES: manageMenu.append({'title': 'Missed Subtitle Management', 'path': 'manage/subtitleMissed/'}) @@ -3166,31 +3151,6 @@ class Manage(MainHandler): self.redirect('/manage/') - def manageTorrents(self, *args, **kwargs): - - t = PageTemplate(headers=self.request.headers, file='manage_torrents.tmpl') - t.info_download_station = '' - t.submenu = self.ManageMenu() - - if re.search('localhost', sickbeard.TORRENT_HOST): - - if sickbeard.LOCALHOST_IP == '': - t.webui_url = re.sub('localhost', helpers.get_lan_ip(), sickbeard.TORRENT_HOST) - else: - t.webui_url = re.sub('localhost', sickbeard.LOCALHOST_IP, sickbeard.TORRENT_HOST) - else: - t.webui_url = sickbeard.TORRENT_HOST - - if sickbeard.TORRENT_METHOD == 'utorrent': - t.webui_url = '/'.join(s.strip('/') for s in (t.webui_url, 'gui/')) - if sickbeard.TORRENT_METHOD == 'download_station': - if helpers.check_url(t.webui_url + 'download/'): - t.webui_url = t.webui_url + 'download/' - else: - t.info_download_station = '

    To have a better experience please set the Download Station alias as download, you can check this setting in the Synology DSM Control Panel > Application Portal. Make sure you allow DSM to be embedded with iFrames too in Control Panel > DSM Settings > Security.


    There is more information about this available here.


    ' - - return t.respond() - def failedDownloads(self, limit=100, toRemove=None): myDB = db.DBConnection('failed.db')