diff options
author | Manuel Kaufmann <humitos@gmail.com> | 2013-02-04 20:36:07 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2013-03-27 13:59:21 (GMT) |
commit | 6916c90b5a462fcc480d27ad996b2fe87e0333f9 (patch) | |
tree | 90fb7e8faf5efe7a002c7d667d295583a48bced2 | |
parent | d5b6b7c802237c9d0abb717bf9026553d018952f (diff) |
Play the next stream if the current one is not available SL #4404
If we are playing a stream from the Journal and when it finishes the
next one is an unavailable one, it's skipped and the next available
stream is played.
Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
-rw-r--r-- | activity.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/activity.py b/activity.py index 79e9912..c780980 100644 --- a/activity.py +++ b/activity.py @@ -223,12 +223,15 @@ class JukeboxActivity(activity.Activity): self.playlist_widget._current_playing = index path = self.playlist_widget._items[index]['path'] - if self.playlist_widget.is_from_journal(path): - path = self.playlist_widget.get_path_from_journal(path) - self.control.check_if_next_prev() + if self.playlist_widget.check_available_media(path): + if self.playlist_widget.is_from_journal(path): + path = self.playlist_widget.get_path_from_journal(path) + self.control.check_if_next_prev() - self.player.set_uri(path) - self.player.play() + self.player.set_uri(path) + self.player.play() + else: + self.songchange('next') def __play_index_cb(self, widget, index, path): # README: this line is no more necessary because of the |