mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2024-11-20 10:12:06 +01:00
detect no subscriptions
This commit is contained in:
parent
c6e3fda8dd
commit
f93659089e
@ -35,6 +35,18 @@ def secondsLeft(dateObj):
|
||||
|
||||
def mySubscriptions():
|
||||
|
||||
# check if any subscriptions are available
|
||||
countSubscriptions=0
|
||||
try:
|
||||
subs = toml.load(SUBSCRIPTIONS_FILE)
|
||||
countSubscriptions += len(subs['subscriptions_ip2tor'])
|
||||
except Exception as e: pass
|
||||
if countSubscriptions == 0:
|
||||
Dialog(dialog="dialog",autowidgetsize=True).msgbox('''
|
||||
You have no active or inactive subscriptions at the moment.
|
||||
''',title="Info")
|
||||
return
|
||||
|
||||
while True:
|
||||
|
||||
# load subscriptions and make dialog choices out of it
|
||||
|
Loading…
Reference in New Issue
Block a user