Minor cleanup.

This commit is contained in:
Andrew Dunai 2018-04-06 11:28:46 +03:00
parent e144f4bf36
commit 797ad90122
No known key found for this signature in database
GPG key ID: 592B181FC403814E
3 changed files with 10 additions and 6 deletions

View file

@ -232,10 +232,11 @@ Made by Andrew Dunai.
Regards to [gmusicapi] and [VLC] who made this possible.
Special thanks to the people who contribute to this project:
People who contribute to this project:
- [Valentijn (@ValentijnvdBeek)](https://github.com/ValentijnvdBeek)
- [Sam Kingston (@sjkingo)](https://github.com/sjkingo)
- [@ValentijnvdBeek (Valentijn)](https://github.com/ValentijnvdBeek)
- [@Fluctuz](https://github.com/Fluctuz)
- [@sjkingo (Sam Kingston)](https://github.com/sjkingo)
[gmusicapi]: https://github.com/simon-weber/gmusicapi
[VLC]: https://wiki.videolan.org/python_bindings

View file

@ -14,6 +14,7 @@ from clay.log import logger
STATION_FETCH_LEN = 50
def asynchronous(func):
"""
Decorates a function to become asynchronous.
@ -287,11 +288,12 @@ class Track(object):
Returns :class:`.Station` instance.
"""
station_name = u'Station - {}'.format(self.title)
station_id = gp.mobile_client.create_station(
name=u'Station - {}'.format(self.title),
name=station_name,
track_id=self.store_id
)
station = Station(station_id)
station = Station(station_id, station_name)
station.load_tracks()
return station

View file

@ -9,6 +9,7 @@ from clay.notifications import notification_area
from clay.pages.page import AbstractPage
from clay.hotkeys import hotkey_manager
class MyStationListItem(urwid.Columns):
"""
One station in the list of stations.
@ -17,7 +18,7 @@ class MyStationListItem(urwid.Columns):
def __init__(self, station):
self.station = station
self.text = urwid.SelectableIcon(u' \u2630 {} '.format(
self.text = urwid.SelectableIcon(u' \u2708 {} '.format(
self.station.name
), cursor_position=3)
self.text.set_layout('left', 'clip', None)