mirror of
https://github.com/FakeTV/pseudo-channel.git
synced 2025-12-19 09:43:31 +00:00
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:
@@ -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'):
|
||||
|
||||
Reference in New Issue
Block a user