[banshee] Tidy
- From: Alexander Kojevnikov <alexk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] Tidy
- Date: Sat, 30 Jun 2012 00:15:06 +0000 (UTC)
commit bbead428a970d6b664108210192bb49fb9e9d478
Author: Alexander Kojevnikov <alexk gnome org>
Date: Fri Jun 29 17:59:01 2012 -0400
Tidy
.../Banshee.Lastfm.Audioscrobbler/Queue.cs | 2 +-
.../Lastfm/Lastfm/AudioscrobblerConnection.cs | 8 +-------
src/Libraries/Lastfm/Lastfm/IQueue.cs | 2 +-
src/Libraries/Lastfm/Lastfm/LastfmRequest.cs | 5 ++---
4 files changed, 5 insertions(+), 12 deletions(-)
---
diff --git a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/Queue.cs b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/Queue.cs
index e775ec1..7f896df 100644
--- a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/Queue.cs
+++ b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/Queue.cs
@@ -256,7 +256,7 @@ namespace Banshee.Lastfm.Audioscrobbler
}
}
- public List<IQueuedTrack> GetTransmitInfo ()
+ public List<IQueuedTrack> GetTracks ()
{
/* Last.fm can handle up to 50 songs in one request */
return queue.GetRange (0, Math.Min (queue.Count, 50));
diff --git a/src/Libraries/Lastfm/Lastfm/AudioscrobblerConnection.cs b/src/Libraries/Lastfm/Lastfm/AudioscrobblerConnection.cs
index 0c0d38e..8d9fa4c 100644
--- a/src/Libraries/Lastfm/Lastfm/AudioscrobblerConnection.cs
+++ b/src/Libraries/Lastfm/Lastfm/AudioscrobblerConnection.cs
@@ -137,10 +137,6 @@ namespace Lastfm
{
StopTransitionHandler ();
- /*if (current_web_req != null) {
- current_web_req.Abort ();
- }*/
-
queue.Save ();
started = false;
@@ -203,7 +199,7 @@ namespace Lastfm
}
current_scrobble_request = new LastfmRequest ("track.scrobble", RequestType.Write, ResponseFormat.Json);
- IList<IQueuedTrack> tracks = queue.GetTransmitInfo ();
+ IList<IQueuedTrack> tracks = queue.GetTracks ();
for (int i = 0; i < tracks.Count; i ++) {
IQueuedTrack track = tracks[i];
@@ -234,8 +230,6 @@ namespace Lastfm
next_interval = DateTime.Now + new TimeSpan (0, 0, RETRY_SECONDS);
hard_failures++;
state = State.Idle;
-
- //current_web_req.Abort();
}
}
diff --git a/src/Libraries/Lastfm/Lastfm/IQueue.cs b/src/Libraries/Lastfm/Lastfm/IQueue.cs
index b44b63c..7f7b23a 100644
--- a/src/Libraries/Lastfm/Lastfm/IQueue.cs
+++ b/src/Libraries/Lastfm/Lastfm/IQueue.cs
@@ -56,7 +56,7 @@ namespace Lastfm
void Save ();
void Load ();
- List<IQueuedTrack> GetTransmitInfo ();
+ List<IQueuedTrack> GetTracks ();
void Add (object track, DateTime started);
void RemoveRange (int first, int count);
diff --git a/src/Libraries/Lastfm/Lastfm/LastfmRequest.cs b/src/Libraries/Lastfm/Lastfm/LastfmRequest.cs
index 691df75..769c205 100644
--- a/src/Libraries/Lastfm/Lastfm/LastfmRequest.cs
+++ b/src/Libraries/Lastfm/Lastfm/LastfmRequest.cs
@@ -217,8 +217,7 @@ namespace Lastfm
private string GetSignature ()
{
// We need to have trackNumber[0] before track[0], so we use StringComparer.Ordinal
- SortedDictionary<string, string> sorted_params =
- new SortedDictionary<string, string> (parameters, StringComparer.Ordinal);
+ var sorted_params = new SortedDictionary<string, string> (parameters, StringComparer.Ordinal);
if (!sorted_params.ContainsKey ("api_key")) {
sorted_params.Add ("api_key", LastfmCore.ApiKey);
@@ -227,7 +226,7 @@ namespace Lastfm
sorted_params.Add ("method", method);
}
StringBuilder signature = new StringBuilder ();
- foreach (KeyValuePair<string, string> parm in sorted_params) {
+ foreach (var parm in sorted_params) {
if (parm.Key.Equals ("format")) {
continue;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]