mirror of
https://github.com/Febbweiss/mopidy-touchscreen.git
synced 2026-03-04 22:25:39 +00:00
Fixed listview selected None crash
Do not use core.playback.cange_track() close #1
This commit is contained in:
@@ -87,7 +87,7 @@ class ListView():
|
||||
self.move_to(direction)
|
||||
else:
|
||||
return int(key)
|
||||
elif touch_event.type == InputManager.key:
|
||||
elif touch_event.type == InputManager.key and self.selected is not None:
|
||||
if touch_event.direction == InputManager.enter:
|
||||
if self.selected is not None:
|
||||
return self.selected
|
||||
|
||||
@@ -36,7 +36,7 @@ class Tracklist(BaseScreen):
|
||||
def touch_event(self, touch_event):
|
||||
pos = self.list_view.touch_event(touch_event)
|
||||
if pos is not None:
|
||||
self.manager.core.playback.change_track(self.tracks[pos],
|
||||
self.manager.core.playback.play(self.tracks[pos],
|
||||
on_error_step=1)
|
||||
|
||||
def track_started(self, track):
|
||||
|
||||
Reference in New Issue
Block a user