1
0
Fork 0
mirror of https://github.com/Findus23/RadioStats.git synced 2024-09-19 16:03:48 +02:00
RadioStats/update_channels.py

13 lines
402 B
Python
Raw Normal View History

import channelInfo
from models import Channel
for id, channel in channelInfo.channels.items():
print("update", channel.stationname)
db_chan = Channel.get(shortname=channel.shortname)
db_chan.stationname = channel.stationname
db_chan.has_data = channel.has_data
db_chan.primary_color = channel.primary_color
db_chan.secondary_color = channel.secondary_color
db_chan.save()