private void UpdateForUser(string username) { if (username == last_user) { return; } last_user = username; while (main_box.Children.Length != 0) { main_box.Remove(main_box.Children[0]); } recently_loved = new NumberedList(lastfm, Catalog.GetString("Recently Loved Tracks")); recently_played = new NumberedList(lastfm, Catalog.GetString("Recently Played Tracks")); top_artists = new NumberedList(lastfm, Catalog.GetString("My Top Artists")); //recommended_artists = new NumberedList (Catalog.GetString ("Recommended Artists")); main_box.PackStart(recently_loved, false, false, 0); main_box.PackStart(new HSeparator(), false, false, 5); main_box.PackStart(recently_played, false, false, 0); main_box.PackStart(new HSeparator(), false, false, 5); main_box.PackStart(top_artists, false, false, 0); //PackStart (recommended_artists, true, true, 0); user = new LastfmUserData(username); recently_loved.SetList(user.RecentLovedTracks); recently_played.SetList(user.RecentTracks); top_artists.SetList(user.GetTopArtists(TopType.Overall)); ShowAll(); }
private void UpdateForUser(string username) { if (username == last_user) { return; } last_user = username; while (main_box.Children.Length != 0) { main_box.Remove(main_box.Children[0]); } recently_loved = new NumberedList(lastfm, Catalog.GetString("Recently Loved Tracks")); recently_played = new NumberedList(lastfm, Catalog.GetString("Recently Played Tracks")); top_artists = new NumberedList(lastfm, Catalog.GetString("My Top Artists")); //recommended_artists = new NumberedList (Catalog.GetString ("Recommended Artists")); main_box.PackStart(recently_loved, false, false, 0); main_box.PackStart(new HSeparator(), false, false, 5); main_box.PackStart(recently_played, false, false, 0); main_box.PackStart(new HSeparator(), false, false, 5); main_box.PackStart(top_artists, false, false, 0); //PackStart (recommended_artists, true, true, 0); try { user = new LastfmUserData(username); recently_loved.SetList(user.RecentLovedTracks); recently_played.SetList(user.RecentTracks); top_artists.SetList(user.GetTopArtists(TopType.Overall)); } catch (Exception e) { lastfm.SetStatus("Failed to get information from your Last.fm profile", true, ConnectionState.InvalidAccount); Log.Exception(String.Format("LastfmUserData query failed for {0}", username), e); } ShowAll(); }
private void UpdateForUser (string username) { if (username == last_user) { return; } last_user = username; while (main_box.Children.Length != 0) { main_box.Remove (main_box.Children[0]); } recently_loved = new NumberedList (lastfm, Catalog.GetString ("Recently Loved Tracks")); recently_played = new NumberedList (lastfm, Catalog.GetString ("Recently Played Tracks")); top_artists = new NumberedList (lastfm, Catalog.GetString ("My Top Artists")); //recommended_artists = new NumberedList (Catalog.GetString ("Recommended Artists")); main_box.PackStart (recently_loved, false, false, 0); main_box.PackStart (new HSeparator (), false, false, 5); main_box.PackStart (recently_played, false, false, 0); main_box.PackStart (new HSeparator (), false, false, 5); main_box.PackStart (top_artists, false, false, 0); //PackStart (recommended_artists, true, true, 0); user = new LastfmUserData (username); recently_loved.SetList (user.RecentLovedTracks); recently_played.SetList (user.RecentTracks); top_artists.SetList (user.GetTopArtists (TopType.Overall)); ShowAll (); }
private void UpdateForUser (string username) { if (username == last_user) { return; } last_user = username; while (main_box.Children.Length != 0) { main_box.Remove (main_box.Children[0]); } recently_loved = new NumberedList (lastfm, Catalog.GetString ("Recently Loved Tracks")); recently_played = new NumberedList (lastfm, Catalog.GetString ("Recently Played Tracks")); top_artists = new NumberedList (lastfm, Catalog.GetString ("My Top Artists")); //recommended_artists = new NumberedList (Catalog.GetString ("Recommended Artists")); main_box.PackStart (recently_loved, false, false, 0); main_box.PackStart (new HSeparator (), false, false, 5); main_box.PackStart (recently_played, false, false, 0); main_box.PackStart (new HSeparator (), false, false, 5); main_box.PackStart (top_artists, false, false, 0); //PackStart (recommended_artists, true, true, 0); try { user = new LastfmUserData (username); recently_loved.SetList (user.RecentLovedTracks); recently_played.SetList (user.RecentTracks); top_artists.SetList (user.GetTopArtists (TopType.Overall)); } catch (Exception e) { lastfm.SetStatus ("Failed to get information from your Last.fm profile", true, ConnectionState.InvalidAccount); Log.Exception (String.Format ("LastfmUserData query failed for {0}", username), e); } ShowAll (); }