Added option to disable streaming from global settings. Closes #219

This commit is contained in:
2018-06-15 08:45:10 -05:00
parent a2cb4ba889
commit ab2667529f
6 changed files with 19 additions and 2 deletions

View File

@@ -23,6 +23,13 @@ supported_languages = []
def streaming_lives():
""" Check if we are in August 16.
ToDo: This method should be removed after deadline==True"""
# Let's import config here so we will avoid breaking things when setup.py is going to be used.
# Check if user has disabled the streaming API things from settings.
import config
if config.app != None:
no_streaming = config.app["app-settings"]["no_streaming"]
if no_streaming == True:
return False
deadline = datetime.date(2018, 8, 16)
now = datetime.datetime.now().date()
return deadline>now