From 695ef27ae0c8f86fa251dd4f8e3108c01d3f8ac4 Mon Sep 17 00:00:00 2001
From: Manuel Kaufmann <humitos@gmail.com>
Date: Mon, 4 Feb 2013 17:36:07 -0300
Subject: [PATCH Jukebox] 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>
---
activity.py | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/activity.py b/activity.py
index e3feb65..380cc2c 100644
a
|
b
|
class JukeboxActivity(activity.Activity): |
223 | 223 | self.playlist_widget._current_playing = index |
224 | 224 | |
225 | 225 | path = self.playlist_widget._items[index]['path'] |
226 | | if self.playlist_widget.is_from_journal(path): |
227 | | path = self.playlist_widget.get_path_from_journal(path) |
228 | | self.control.check_if_next_prev() |
| 226 | if self.playlist_widget.check_available_media(path): |
| 227 | if self.playlist_widget.is_from_journal(path): |
| 228 | path = self.playlist_widget.get_path_from_journal(path) |
| 229 | self.control.check_if_next_prev() |
229 | 230 | |
230 | | self.player.set_uri(path) |
231 | | self.player.play() |
| 231 | self.player.set_uri(path) |
| 232 | self.player.play() |
| 233 | else: |
| 234 | self.songchange('next') |
232 | 235 | |
233 | 236 | def __play_index_cb(self, widget, index, path): |
234 | 237 | # README: this line is no more necessary because of the |