|
@@ -12,12 +12,12 @@ config_file = 'stations.yml'
|
|
|
|
|
|
|
|
|
|
class Station:
|
|
class Station:
|
|
- def __init__(self, uid, name, url, category, icon):
|
|
|
|
|
|
+ def __init__(self, uid, name, url, category):
|
|
self.id = generic.generate_stationid_with_prefix(uid, ID_PREFIX)
|
|
self.id = generic.generate_stationid_with_prefix(uid, ID_PREFIX)
|
|
self.name = name
|
|
self.name = name
|
|
self.url = url
|
|
self.url = url
|
|
self.tag = category
|
|
self.tag = category
|
|
- self.icon = icon
|
|
|
|
|
|
+ self.icon = None
|
|
|
|
|
|
def to_vtuner(self):
|
|
def to_vtuner(self):
|
|
return vtuner.Station(self.id, self.name, self.tag, self.url, self.icon, self.tag, None, None, None, None)
|
|
return vtuner.Station(self.id, self.name, self.tag, self.url, self.icon, self.tag, None, None, None, None)
|
|
@@ -70,10 +70,9 @@ def get_stations_by_category(category):
|
|
stations = []
|
|
stations = []
|
|
if my_stations_yaml and category in my_stations_yaml:
|
|
if my_stations_yaml and category in my_stations_yaml:
|
|
for station_name in my_stations_yaml[category]:
|
|
for station_name in my_stations_yaml[category]:
|
|
- station_url = my_stations_yaml[category][station_name]['url']
|
|
|
|
- station_icon = my_stations_yaml[category][station_name]['icon']
|
|
|
|
|
|
+ station_url = my_stations_yaml[category][station_name]
|
|
station_id = str(get_checksum(station_name + station_url)).upper()
|
|
station_id = str(get_checksum(station_name + station_url)).upper()
|
|
- stations.append(Station(station_id, station_name, station_url, category, station_icon))
|
|
|
|
|
|
+ stations.append(Station(station_id, station_name, station_url, category))
|
|
return stations
|
|
return stations
|
|
|
|
|
|
|
|
|