banshee r4016 - in trunk/banshee: . src/Clients/Halie/Halie src/Core/Banshee.Services/Banshee.MediaEngine src/Extensions/Banshee.FileSystemQueue/Banshee.FileSystemQueue
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4016 - in trunk/banshee: . src/Clients/Halie/Halie src/Core/Banshee.Services/Banshee.MediaEngine src/Extensions/Banshee.FileSystemQueue/Banshee.FileSystemQueue
- Date: Wed, 28 May 2008 22:07:52 +0000 (UTC)
Author: abock
Date: Wed May 28 22:07:51 2008
New Revision: 4016
URL: http://svn.gnome.org/viewvc/banshee?rev=4016&view=rev
Log:
2008-05-28 Aaron Bockover <abock gnome org>
* src/Extensions/Banshee.FileSystemQueue/Banshee.FileSystemQueue/FileSystemQueueSource.cs:
Load from the local instance argument queue at startup
* src/Clients/Halie/Halie/Client.cs: Handle some crasher cases
* src/Core/Banshee.Services/Banshee.MediaEngine/PlayerEngineService.cs:
Work around a shitty managed DBus bug where sending an empty dictionary
will crash - related to the other shitty null bug
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Clients/Halie/Halie/Client.cs
trunk/banshee/src/Core/Banshee.Services/Banshee.MediaEngine/PlayerEngineService.cs
trunk/banshee/src/Extensions/Banshee.FileSystemQueue/Banshee.FileSystemQueue/FileSystemQueueSource.cs
Modified: trunk/banshee/src/Clients/Halie/Halie/Client.cs
==============================================================================
--- trunk/banshee/src/Clients/Halie/Halie/Client.cs (original)
+++ trunk/banshee/src/Clients/Halie/Halie/Client.cs Wed May 28 22:07:51 2008
@@ -128,7 +128,10 @@
default:
if (arg.Key.StartsWith ("query-")) {
if (track == null) {
- track = player.CurrentTrack;
+ try {
+ track = player.CurrentTrack;
+ } catch {
+ }
}
HandleQuery (player, track, arg.Key.Substring (6));
} else {
@@ -153,8 +156,10 @@
switch (query) {
case "all":
- foreach (KeyValuePair<string, object> field in track) {
- DisplayTrackField (field.Key, field.Value);
+ if (track != null) {
+ foreach (KeyValuePair<string, object> field in track) {
+ DisplayTrackField (field.Key, field.Value);
+ }
}
HandleQuery (player, track, "position");
@@ -183,6 +188,11 @@
DisplayTrackField ("can-seek", player.CanSeek);
break;
default:
+ if (track == null) {
+ Error ("not playing");
+ break;
+ }
+
if (track.ContainsKey (query)) {
DisplayTrackField (query, track[query]);
} else {
@@ -194,6 +204,10 @@
private static void DisplayTrackField (string field, object value)
{
+ if (field == String.Empty) {
+ return;
+ }
+
string result = null;
if (value is bool) {
result = (bool)value ? "true" : "false";
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.MediaEngine/PlayerEngineService.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.MediaEngine/PlayerEngineService.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.MediaEngine/PlayerEngineService.cs Wed May 28 22:07:51 2008
@@ -441,8 +441,18 @@
get { return active_engine.CurrentTrack; }
}
+ private Dictionary<string, object> dbus_sucks;
IDictionary<string, object> IPlayerEngineService.CurrentTrack {
- get { return CurrentTrack == null ? null : CurrentTrack.GenerateExportable (); }
+ get {
+ // FIXME: Managed DBus sucks - it explodes if you transport null
+ // or even an empty dictionary (a{sv} in our case). Piece of shit.
+ if (dbus_sucks == null) {
+ dbus_sucks = new Dictionary<string, object> ();
+ dbus_sucks.Add (String.Empty, String.Empty);
+ }
+
+ return CurrentTrack == null ? dbus_sucks : CurrentTrack.GenerateExportable ();
+ }
}
public SafeUri CurrentSafeUri {
Modified: trunk/banshee/src/Extensions/Banshee.FileSystemQueue/Banshee.FileSystemQueue/FileSystemQueueSource.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.FileSystemQueue/Banshee.FileSystemQueue/FileSystemQueueSource.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.FileSystemQueue/Banshee.FileSystemQueue/FileSystemQueueSource.cs Wed May 28 22:07:51 2008
@@ -90,6 +90,10 @@
UpdateActions ();
ServiceManager.SourceManager.ActiveSourceChanged += delegate { UpdateActions (); };
+
+ foreach (string path in ApplicationContext.CommandLine.Files) {
+ Enqueue (path);
+ }
TrackModel.Reloaded += OnTrackModelReloaded;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]