Skip to content

Commit

Permalink
Add station name property
Browse files Browse the repository at this point in the history
  • Loading branch information
enen92 committed Sep 27, 2020
1 parent 690aa29 commit 81a420f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions resources/lib/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def __add_stations(stations):
'RunPlugin(%s)' % plugin.url_for(
endpoint='add_to_my_stations',
station_id=station_id,
station_name=station['name'].encode('utf-8')
station_name=station.get('name', '')
)
)]
else:
Expand All @@ -197,7 +197,7 @@ def __add_stations(stations):
if show_bitrate and station.get('bitrate'):
name = '%s [%s kbps]' % (station['name'], station['bitrate'])
else:
name = station['name']
name = station.get('name', '')
item = {
'label': name,
'thumbnail': icon,
Expand All @@ -216,7 +216,10 @@ def __add_stations(stations):
'path': plugin.url_for(
endpoint='resolve_play_url',
station_id=station['id'],
)
),
'properties': {
'StationName': station.get('name', '') # Matrix++ only
}
}
items.append(item)
finish_kwargs = {
Expand Down

0 comments on commit 81a420f

Please sign in to comment.