banshee r4368 - in trunk/banshee: . src/Extensions/Banshee.Torrent/Banshee.Torrent
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4368 - in trunk/banshee: . src/Extensions/Banshee.Torrent/Banshee.Torrent
- Date: Thu, 14 Aug 2008 20:50:45 +0000 (UTC)
Author: gburt
Date: Thu Aug 14 20:50:45 2008
New Revision: 4368
URL: http://svn.gnome.org/viewvc/banshee?rev=4368&view=rev
Log:
2008-08-14 Gabriel Burt <gabriel burt gmail com>
* src/Extensions/Banshee.Torrent/Banshee.Torrent/TorrentService.cs: Fix
style issues.
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Extensions/Banshee.Torrent/Banshee.Torrent/TorrentService.cs
Modified: trunk/banshee/src/Extensions/Banshee.Torrent/Banshee.Torrent/TorrentService.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Torrent/Banshee.Torrent/TorrentService.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.Torrent/Banshee.Torrent/TorrentService.cs Thu Aug 14 20:50:45 2008
@@ -75,13 +75,10 @@
ObjectPath path = engine.RegisterTorrent (torrentUri, savePath);
IDownloader downloader = bus.GetObject <IDownloader> (BusName, path);
- if (downloader.State == TorrentState.Stopped)
- {
+ if (downloader.State == TorrentState.Stopped) {
downloader.Start ();
Console.WriteLine ("Started: {0}", downloader.Path);
- }
- else
- {
+ } else {
Console.WriteLine ("{0} already running", downloader.Path);
}
return downloader;
@@ -89,7 +86,10 @@
public void Dispose ()
{
- service.DestroyEngine (EngineName);
+ if (service != null) {
+ service.DestroyEngine (EngineName);
+ service = null;
+ }
}
public void Initialize ()
@@ -100,16 +100,14 @@
{
bus = Bus.Session;
- try
- {
+ try {
// Get the service and call a method on it to ensure that it is
// running and able to answer queries.
service = bus.GetObject<ITorrentService> (BusName, ServicePath);
service.AvailableEngines ();
- }
- catch
- {
+ } catch {
Log.Error ("Torrent backend could not be found and could not be auto-started");
+ service = null;
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]