This commit is contained in:
deathbybandaid 2020-11-27 15:50:34 -05:00
parent 6e9b535187
commit cc893e6c34

View File

@ -10,11 +10,22 @@ class OriginChannels():
def get_channels(self): def get_channels(self):
channels_json = self.fhdhr.web.session.get(self.base_api).json()
for channel_item in channels_json:
print(channel_item["identifier"])
channel_list = [] channel_list = []
channels_json = self.fhdhr.web.session.get(self.base_api).json()
print(channels_json[0])
for channel_dict in channels_json:
clean_station_item = {
"name": channel_dict["title"],
# "callsign": channel_dict["name"],
# "number": channel_dict["formatted-number"],
"id": channel_dict["identifier"],
}
channel_list.append(clean_station_item)
return []
return channel_list return channel_list
def get_channel_stream(self, chandict): def get_channel_stream(self, chandict):