void SetupCommonArtists(Tasteometer ts) { mMyRecentAdapter.resetList(); if (ts != null) { for (String name : ts.getResults()) { String url = "lastfm://artist/" + Uri.encode(name) + "/similarartists"; mMyRecentAdapter.putStation(name, url); } } mMyRecentAdapter.updateModel(); }
private void SetupRecentStations() { if (!isAuthenticatedUser) return; SharedPreferences settings = getSharedPreferences(LastFm.PREFS, 0); mMyRecentAdapter.resetList(); List<Station> stations = RecentStationsDao.getInstance().getRecentStations(); if (stations != null) { for (Station station : stations) { String name = station.getName(); String url = station.getUrl(); if (url.startsWith("lastfm://playlist/") && settings.getBoolean("remove_playlists", false)) continue; if (url.startsWith("lastfm://usertags/") && settings.getBoolean("remove_tags", false)) continue; if (url.endsWith("/loved") && settings.getBoolean("remove_loved", false)) continue; mMyRecentAdapter.putStation(name, url); } } mMyRecentAdapter.updateModel(); }