diff options
Diffstat (limited to 'pydora/player.py')
-rw-r--r-- | pydora/player.py | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/pydora/player.py b/pydora/player.py index c4ce2e0..18209b1 100644 --- a/pydora/player.py +++ b/pydora/player.py | |||
@@ -26,23 +26,19 @@ class PlayerCallbacks: | |||
26 | """ | 26 | """ |
27 | 27 | ||
28 | def play(self, song): | 28 | def play(self, song): |
29 | """Called once when a song starts playing | 29 | """Called once when a song starts playing""" |
30 | """ | ||
31 | pass | 30 | pass |
32 | 31 | ||
33 | def pre_poll(self): | 32 | def pre_poll(self): |
34 | """Called before polling for process status | 33 | """Called before polling for process status""" |
35 | """ | ||
36 | pass | 34 | pass |
37 | 35 | ||
38 | def post_poll(self): | 36 | def post_poll(self): |
39 | """Called after polling for process status | 37 | """Called after polling for process status""" |
40 | """ | ||
41 | pass | 38 | pass |
42 | 39 | ||
43 | def input(self, value, song): | 40 | def input(self, value, song): |
44 | """Called after user input during song playback | 41 | """Called after user input during song playback""" |
45 | """ | ||
46 | pass | 42 | pass |
47 | 43 | ||
48 | 44 | ||
@@ -113,8 +109,7 @@ class PlayerApp: | |||
113 | sys.exit(1) | 109 | sys.exit(1) |
114 | 110 | ||
115 | def station_selection_menu(self, error=None): | 111 | def station_selection_menu(self, error=None): |
116 | """Format a station menu and make the user select a station | 112 | """Format a station menu and make the user select a station""" |
117 | """ | ||
118 | self.screen.clear() | 113 | self.screen.clear() |
119 | 114 | ||
120 | if error: | 115 | if error: |
@@ -127,8 +122,7 @@ class PlayerApp: | |||
127 | return self.stations[self.screen.get_integer("Station: ")] | 122 | return self.stations[self.screen.get_integer("Station: ")] |
128 | 123 | ||
129 | def play(self, song): | 124 | def play(self, song): |
130 | """Play callback | 125 | """Play callback""" |
131 | """ | ||
132 | if song.is_ad: | 126 | if song.is_ad: |
133 | print("{} ".format(Colors.cyan("Advertisement"))) | 127 | print("{} ".format(Colors.cyan("Advertisement"))) |
134 | else: | 128 | else: |
@@ -231,8 +225,7 @@ class PlayerApp: | |||
231 | print("") | 225 | print("") |
232 | 226 | ||
233 | def input(self, input, song): | 227 | def input(self, input, song): |
234 | """Input callback, handles key presses | 228 | """Input callback, handles key presses""" |
235 | """ | ||
236 | try: | 229 | try: |
237 | cmd = getattr(self, self.CMD_MAP[input][1]) | 230 | cmd = getattr(self, self.CMD_MAP[input][1]) |
238 | except (IndexError, KeyError): | 231 | except (IndexError, KeyError): |