banshee r4354 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.PlaybackController
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4354 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.PlaybackController
- Date: Tue, 12 Aug 2008 18:02:28 +0000 (UTC)
Author: gburt
Date: Tue Aug 12 18:02:28 2008
New Revision: 4354
URL: http://svn.gnome.org/viewvc/banshee?rev=4354&view=rev
Log:
2008-08-12 Gabriel Burt <gabriel burt gmail com>
* src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs:
If there is no track loaded/playing and the user presses Play, if one or
more items are selected, play the first intead of playing the first item
in the source.
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs Tue Aug 12 18:02:28 2008
@@ -109,7 +109,15 @@
private void OnPlayerEnginePlayWhenIdleRequest (object o, EventArgs args)
{
- Next ();
+ ITrackModelSource next_source = NextSource;
+ if (next_source != null && next_source.TrackModel.Selection.Count > 0) {
+ Source = NextSource;
+ CancelErrorTransition ();
+ CurrentTrack = next_source.TrackModel[next_source.TrackModel.Selection.FirstIndex];
+ QueuePlayTrack ();
+ } else {
+ Next ();
+ }
}
private void OnPlayerEvent (PlayerEventArgs args)
@@ -120,7 +128,7 @@
break;
case PlayerEvent.EndOfStream:
EosTransition ();
- break;
+ break;
case PlayerEvent.Error:
if (++consecutive_errors >= 5) {
consecutive_errors = 0;
@@ -130,6 +138,7 @@
}
CancelErrorTransition ();
+ // TODO why is this so long? any reason not to be instantaneous?
Application.RunTimeout (500, EosTransition);
break;
case PlayerEvent.StateChange:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]