Re: [Banshee-List] banshee r3320 - in trunk/banshee: . src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea src/Libraries/Lastfm src/Libraries



Hey Alex,

This is overall pretty good - a comment or two, inline:

On Sun, Feb 24, 2008 at 3:47 AM,  <ahixon svn gnome org> wrote:
>  --- trunk/banshee/src/Libraries/Lastfm/Lastfm/AudioscrobblerConnection.cs       (original)
>  +++ trunk/banshee/src/Libraries/Lastfm/Lastfm/AudioscrobblerConnection.cs       Sun Feb 24 09:47:56 2008
>  @@ -62,6 +62,7 @@
>          const string SCROBBLER_VERSION = "1.2";
>
>          Account account;
>  +        string user_agent;
>          string post_url;
>          string session_id = null;
>          string now_playing_url;
>  @@ -75,6 +76,11 @@
>          public bool Started {
>              get { return started; }
>          }
>  +
>  +        public string UserAgent {
>  +            get { return user_agent; }
>  +            set { user_agent = value; }
>  +        }

Let's only actually store the user_agent string in LastfmCore - not
here or in RadioConnection.  You can keep the UserAgent getters, but
point them to LastfmCore.UserAgent.

==============================================================================
>  --- (empty file)
>  +++ trunk/banshee/src/Libraries/Lastfm/Lastfm/LastfmCore.cs     Sun Feb 24 09:47:56 2008
>  +        private static string user_agent;
>  +        public static string UserAgent {
>  +            get { return user_agent; }
>  +            set {
>  +                user_agent = value;
>  +                if (radio != null) {
>  +                    radio.UserAgent = value;
>  +                }
>  +
>  +                if (audioscrobbler != null) {
>  +                    audioscrobbler.UserAgent = value;
>  +                }
>  +            }
>  +        }

Which will also mean this is greatly simplified.

Thanks,

Gabriel


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