diff --git a/main-dir/Global_DatabaseUpdate.py b/main-dir/Global_DatabaseUpdate.py index e16f84b..cdc3dc8 100644 --- a/main-dir/Global_DatabaseUpdate.py +++ b/main-dir/Global_DatabaseUpdate.py @@ -131,7 +131,7 @@ for channel_dir in channel_dirs: rndsql = "SELECT * FROM shows WHERE (customSectionName NOT LIKE 'playlist' AND duration BETWEEN 6000 and 999000) ORDER BY RANDOM() LIMIT 1" table.execute(rndsql) the_show = table.fetchone() - entryList['duration'] = str("1,"+str(int(the_show[4]) / 60000)) + entryList['duration'] = str("1,"+str(int(the_show[4] / 60000))) entryList['title'] = the_show[3] entryList['startTime'] = "00:00:00" entryList['dayOfWeek'] = "everyday" @@ -173,7 +173,7 @@ for channel_dir in channel_dirs: rndsql = "SELECT * FROM shows WHERE (customSectionName NOT LIKE 'playlist' AND duration BETWEEN ? and ?) ORDER BY RANDOM() LIMIT 1" table.execute(rndsql, ("60000", str(maxMS))) the_show = table.fetchone() - entryList['duration'] = str("1,"+str(int(the_show[4]) / 60000)) + entryList['duration'] = str("1,"+str(int(the_show[4] / 60000))) entryList['endTime'] = datetime.datetime.fromtimestamp(float(entryList['startTimeUnix']) + the_show[4]/1000).strftime("%H:%M:%S") entryList['title'] = the_show[3] entryList['overlapMax'] = round(float(entryList['duration'].split(',')[1]) * 0.5)