[banshee] Tidy



commit a160f2988bb5e1f5de7cefd0af6a86e89db1f4b3
Author: Alexander Kojevnikov <alexk gnome org>
Date:   Fri Jun 29 12:28:32 2012 -0400

    Tidy

 .../Banshee.Lastfm.Audioscrobbler/Queue.cs         |   29 ++++++++++++-------
 1 files changed, 18 insertions(+), 11 deletions(-)
---
diff --git a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/Queue.cs b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/Queue.cs
index 0973f95..3fdc59c 100644
--- a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/Queue.cs
+++ b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/Queue.cs
@@ -125,8 +125,10 @@ namespace Banshee.Lastfm.Audioscrobbler
 
             public override string ToString ()
             {
-                return String.Format ("{0} - {1} (on {2} - track {3}) <duration: {4}sec, start time: {5}sec>",
-                                      Artist, Title, Album, TrackNumber, Duration, StartTime);
+                return String.Format (
+                    "{0} - {1} (on {2} - track {3}) <duration: {4}sec, start time: {5}sec>",
+                    Artist, Title, Album, TrackNumber, Duration, StartTime
+                );
             }
 
             string artist;
@@ -286,7 +288,6 @@ namespace Banshee.Lastfm.Audioscrobbler
                     HttpUtility.UrlEncode (track.Album),
                     str_track_number,
                     track.MusicBrainzId,
-
                     i);
             }
 
@@ -302,8 +303,10 @@ namespace Banshee.Lastfm.Audioscrobbler
 
                 //FIXME Just log invalid tracks until we determine the root cause
                 if (IsInvalidQueuedTrack (new_queued_track)) {
-                    Log.WarningFormat ("Invalid data detected while adding to audioscrobbler queue for " +
-                                       "track '{0}', original start time: '{1}'", new_queued_track, started_at);
+                    Log.WarningFormat (
+                        "Invalid data detected while adding to audioscrobbler queue for " +
+                        "track '{0}', original start time: '{1}'", new_queued_track, started_at
+                    );
                 }
 
                 queue.Add (new_queued_track);
@@ -334,8 +337,10 @@ namespace Banshee.Lastfm.Audioscrobbler
         {
             int removed_track_count = queue.RemoveAll (IsInvalidQueuedTrack);
             if (removed_track_count > 0) {
-                Log.WarningFormat ("{0} invalid track(s) removed from audioscrobbler queue",
-                                   removed_track_count);
+                Log.WarningFormat (
+                    "{0} invalid track(s) removed from audioscrobbler queue",
+                    removed_track_count
+                );
                 dirty = true;
                 Save ();
             }
@@ -345,10 +350,12 @@ namespace Banshee.Lastfm.Audioscrobbler
         {
             DateTime trackStartTime = DateTimeUtil.FromTimeT (track.StartTime);
 
-            return (String.IsNullOrEmpty (track.Artist) ||
-                    String.IsNullOrEmpty (track.Title) ||
-                    trackStartTime < DateTimeUtil.LocalUnixEpoch ||
-                    trackStartTime > DateTime.Now.Add (MAXIMUM_TRACK_STARTTIME_IN_FUTURE));
+            return (
+                String.IsNullOrEmpty (track.Artist) ||
+                String.IsNullOrEmpty (track.Title) ||
+                trackStartTime < DateTimeUtil.LocalUnixEpoch ||
+                trackStartTime > DateTime.Now.Add (MAXIMUM_TRACK_STARTTIME_IN_FUTURE)
+            );
         }
     }
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]