Added another config flag for debug mode. If set to false then commercials are not included in the html / xml. Will soon effect other input.

This commit is contained in:
Justin Emter
2017-07-27 11:34:23 -07:00
parent 99e4b9838f
commit acda7fca9b
3 changed files with 26 additions and 9 deletions

View File

@@ -13,7 +13,7 @@ import logging.handlers
class PseudoDailyScheduleController():
def __init__(self, server, token, clients):
def __init__(self, server, token, clients, debugMode = False):
self.PLEX = PlexServer(server, token)
@@ -23,6 +23,8 @@ class PseudoDailyScheduleController():
self.PLEX_CLIENTS = clients
self.DEBUG = debugMode
self.my_logger = logging.getLogger('MyLogger')
self.my_logger.setLevel(logging.DEBUG)
@@ -73,6 +75,10 @@ class PseudoDailyScheduleController():
for row in datalist:
if str(row[11]) == "Commercials" and self.DEBUG == False:
continue
timeB = datetime.strptime(row[8], '%I:%M:%S %p')
if currentTime == None:
@@ -184,6 +190,10 @@ class PseudoDailyScheduleController():
for row in datalist:
if str(row[11]) == "Commercials" and self.DEBUG == False:
continue
numberIncrease += 1
with tag('tbody'):