diff --git a/src/widgets/tracks_list_widget.py b/src/widgets/tracks_list_widget.py index e0b5bf4..f9830ab 100644 --- a/src/widgets/tracks_list_widget.py +++ b/src/widgets/tracks_list_widget.py @@ -47,6 +47,8 @@ def __init__(self, _title, _window, _function): self.more_button.set_visible(True) self.get_function = _function + self.tracks_list_box.connect("row-activated", self.on_tracks_row_selected) + self.tracks = self.get_function(10) for index, track in enumerate(self.tracks): listing = GenericTrackWidget(track, self.window, False) @@ -63,3 +65,10 @@ def on_more_clicked(self, *args): page = fromFunctionPage(self.window, self.get_function, "track") page.load() self.window.navigation_view.push(page) + + def on_tracks_row_selected(self, list_box, row): + index = int(row.get_name()) + + tracks = self.get_function(100) + + self.window.player_object.play_this(tracks, index)