1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-04 08:25:04 -05:00

Better detection when to show the button

This commit is contained in:
Nils Vogels 2014-05-08 17:23:26 +02:00
parent e596b7370d
commit 514d477a32

View File

@ -1924,8 +1924,15 @@ def haveXBMC():
def havePLEX():
return sickbeard.USE_PLEX and sickbeard.PLEX_UPDATE_LIBRARY
def haveTORRENT():
return sickbeard.USE_TORRENTS
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
def HomeMenu():
return [
@ -1933,7 +1940,7 @@ def HomeMenu():
{'title': 'Manual Post-Processing', 'path': 'home/postprocess/'},
{'title': 'Update XBMC', 'path': 'home/updateXBMC/', 'requires': haveXBMC},
{'title': 'Update Plex', 'path': 'home/updatePLEX/', 'requires': havePLEX},
{'title': 'Manage Torrents', 'path': '/manage/manageTorrents', 'requires': haveTORRENT},
{'title': 'Manage Torrents', 'path': 'manage/manageTorrents', 'requires': haveTORRENT},
{'title': 'Restart', 'path': 'home/restart/?pid=' + str(sickbeard.PID), 'confirm': True},
{'title': 'Shutdown', 'path': 'home/shutdown/?pid=' + str(sickbeard.PID), 'confirm': True},
]