Fix for the -i (import shows) logic. Updated SQL command to UPDATE and existing rows with only lastEpisodeTitle

This commit is contained in:
Justin Emter
2018-04-03 19:43:57 -07:00
parent cb9eb2f993
commit a759312d6a
2 changed files with 5 additions and 20 deletions

View File

@@ -660,12 +660,12 @@ class PseudoChannel():
def import_queue(self):
"""Dropping previous shows table before adding the imported data"""
self.db.clear_shows_table()
#self.db.clear_shows_table()
with open('pseudo-queue.json') as data_file:
data = json.load(data_file)
#pprint(data)
#print(data)
for row in data:
print row
print "lastEpisodeTitle:", row[5]
self.db.import_shows_table_by_row(
row[2],
row[3],
@@ -693,7 +693,7 @@ class PseudoChannel():
data = json.load(data_file)
#pprint(data)
for row in data:
print row
"""print row"""
self.db.import_daily_schedule_table_by_row(
row[2],
row[3],