Added more detail to daily schedule xml output

This commit is contained in:
Moe Fwacky
2019-04-12 23:53:24 -07:00
committed by GitHub
parent 1f39963101
commit 324ede0168

View File

@@ -125,29 +125,47 @@ class PseudoDailyScheduleController():
timeB = datetime.strptime(row[8], '%I:%M:%S %p') timeB = datetime.strptime(row[8], '%I:%M:%S %p')
if currentTime == None: if currentTime == None:
with tag('time', with tag('time',
('data-key', str(row[12])), ('key', str(row[12])),
('data-current', 'false'), ('current', 'false'),
('data-type', str(row[11])), ('type', str(row[11])),
('data-title', str(row[3])), ('show-title', str(row[6])),
('data-start-time', str(row[8])), ('show-season', str(row[5])),
('show-episode', str(row[4])),
('title', str(row[3])),
('duration', str(row[7])),
('time-start', str(row[8])),
('time-end', str(row[9])),
('library', str(row[13])),
): ):
text(row[8]) text(row[8])
elif currentTime.hour == timeB.hour and currentTime.minute == timeB.minute: elif currentTime.hour == timeB.hour and currentTime.minute == timeB.minute:
with tag('time', with tag('time',
('data-key', str(row[12])), ('key', str(row[12])),
('data-current', 'true'), ('current', 'true'),
('data-type', str(row[11])), ('type', str(row[11])),
('data-title', str(row[3])), ('show-title', str(row[6])),
('data-start-time', str(row[8])), ('show-season', str(row[5])),
('show-episode', str(row[4])),
('title', str(row[3])),
('duration', str(row[7])),
('time-start', str(row[8])),
('time-end', str(row[9])),
('library', str(row[13])),
): ):
text(row[8]) text(row[8])
else: else:
with tag('time', with tag('time',
('data-key', str(row[12])), ('key', str(row[12])),
('data-current', 'false'), ('current', 'false'),
('data-type', str(row[11])), ('type', str(row[11])),
('data-title', str(row[3])), ('show-title', str(row[6])),
('data-start-time', str(row[8])), ('show-season', str(row[5])),
('show-episode', str(row[4])),
('title', str(row[3])),
('duration', str(row[7])),
('time-start', str(row[8])),
('time-end', str(row[9])),
('library', str(row[13])),
): ):
text(row[8]) text(row[8])
return indent(doc.getvalue()) return indent(doc.getvalue())