convert data
This commit is contained in:
parent
b2181fe25c
commit
cc6e022d4f
1 changed files with 2 additions and 2 deletions
|
@ -83,9 +83,9 @@ def remove_channel_from_database(database, scheduler, stream_id, stream_name, st
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
hour_set.append(value['start_at'])
|
hour_set.append(value['start_at'])
|
||||||
closest_hour = min(hour_set, key=lambda item: abs(item - current_hour))
|
closest_hour = min(hour_set, key=lambda item: abs(int(item) - current_hour))
|
||||||
for key, value in database.items():
|
for key, value in database.items():
|
||||||
if value['start_at'] == closest_hour:
|
if value['start_at'] == str(closest_hour):
|
||||||
fallback_stream_id = key
|
fallback_stream_id = key
|
||||||
fallback_stream_name = value['name']
|
fallback_stream_name = value['name']
|
||||||
fallback_hls_url = value['src']
|
fallback_hls_url = value['src']
|
||||||
|
|
Loading…
Reference in a new issue