mirror of
https://github.com/FakeTV/pseudo-channel.git
synced 2025-12-23 19:53:28 +00:00
changed float to int to fix a bug
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user