aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src/github/daneren2005
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-07-02 23:08:49 -0700
committerScott Jackson <daneren2005@gmail.com>2013-07-02 23:08:49 -0700
commit6078909b80422dbfdb97947e48b6cca454196354 (patch)
treeeb4c0725a45d831494984e494e5cb971a204db7e /subsonic-android/src/github/daneren2005
parent4873d4b726981f55f389e965c0ecd70cb596acb8 (diff)
downloaddsub-6078909b80422dbfdb97947e48b6cca454196354.tar.gz
dsub-6078909b80422dbfdb97947e48b6cca454196354.tar.bz2
dsub-6078909b80422dbfdb97947e48b6cca454196354.zip
Convert all fragments over to displaying nothing while refreshing/in error
Diffstat (limited to 'subsonic-android/src/github/daneren2005')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/fragments/SelectGenreFragment.java3
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java2
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java3
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java2
4 files changed, 8 insertions, 2 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectGenreFragment.java b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectGenreFragment.java
index 7ac7ace8..623aba4e 100644
--- a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectGenreFragment.java
+++ b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectGenreFragment.java
@@ -94,6 +94,7 @@ public class SelectGenreFragment extends SubsonicFragment implements AdapterView
private void load(final boolean refresh) {
setTitle(R.string.main_albums_genres);
+ genreListView.setVisibility(View.INVISIBLE);
BackgroundTask<List<Genre>> task = new TabBackgroundTask<List<Genre>>(this) {
@Override
@@ -117,8 +118,8 @@ public class SelectGenreFragment extends SubsonicFragment implements AdapterView
if (result != null) {
genreListView.setAdapter(new GenreAdapter(context, result));
+ genreListView.setVisibility(View.VISIBLE);
}
-
}
};
task.execute();
diff --git a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java
index 00830b72..0d7fce76 100644
--- a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java
+++ b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java
@@ -162,6 +162,7 @@ public class SelectPlaylistFragment extends SubsonicFragment implements AdapterV
private void load(final boolean refresh) {
setTitle(R.string.playlist_label);
+ list.setVisibility(View.INVISIBLE);
BackgroundTask<List<Playlist>> task = new TabBackgroundTask<List<Playlist>>(this) {
@Override
@@ -178,6 +179,7 @@ public class SelectPlaylistFragment extends SubsonicFragment implements AdapterV
protected void done(List<Playlist> result) {
list.setAdapter(playlistAdapter = new PlaylistAdapter(context, result));
emptyTextView.setVisibility(result.isEmpty() ? View.VISIBLE : View.GONE);
+ list.setVisibility(View.VISIBLE);
}
};
task.execute();
diff --git a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java
index dc563135..ac12e17d 100644
--- a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java
+++ b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java
@@ -95,6 +95,7 @@ public class SelectPodcastsFragment extends SubsonicFragment implements AdapterV
@Override
protected void refresh(final boolean refresh) {
setTitle(R.string.button_bar_podcasts);
+ podcastListView.setVisibility(View.INVISIBLE);
BackgroundTask<List<PodcastChannel>> task = new TabBackgroundTask<List<PodcastChannel>>(this) {
@Override
@@ -118,8 +119,8 @@ public class SelectPodcastsFragment extends SubsonicFragment implements AdapterV
if (result != null) {
podcastListView.setAdapter(new PodcastChannelAdapter(context, result));
+ podcastListView.setVisibility(View.VISIBLE);
}
-
}
};
task.execute();
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java
index 900d0661..a002dcb6 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java
@@ -888,6 +888,8 @@ public class RESTMusicService implements MusicService {
@Override
public List<PodcastChannel> getPodcastChannels(boolean refresh, Context context, ProgressListener progressListener) throws Exception {
+ checkServerVersion(context, "1.9", "Podcasts not supported.");
+
Reader reader = getReader(context, progressListener, "getPodcasts", null, Arrays.asList("includeEpisodes"), Arrays.<Object>asList("false"));
try {
return new PodcastChannelParser(context).parse(reader, progressListener);