mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-10-11 12:32:01 +00:00
Added option to disable streaming from global settings. Closes #219
This commit is contained in:
@@ -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
|
Reference in New Issue
Block a user