diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-08-05 21:13:15 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-08-05 21:13:15 -0700 |
commit | d971012a1d33280165fa890fc598b16ed27195ec (patch) | |
tree | 9c6bff2f34841e9b30e3a36623a73ed6eb545626 /src/github | |
parent | cfe88f3592e523311696339f6a4a0967bcbebaa3 (diff) | |
download | dsub-d971012a1d33280165fa890fc598b16ed27195ec.tar.gz dsub-d971012a1d33280165fa890fc598b16ed27195ec.tar.bz2 dsub-d971012a1d33280165fa890fc598b16ed27195ec.zip |
Fix null ptr exception on download all podcasts
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index 7be4b8f3..be8cf91e 100644 --- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -654,11 +654,12 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter @Override
protected Void doInBackground() throws Throwable {
MusicService musicService = MusicServiceFactory.getMusicService(context);
-
- int count = entryList.getCount();
- for(int i = 0; i < count; i++) {
- PodcastEpisode episode = (PodcastEpisode) entryList.getItemAtPosition(i);
- musicService.downloadPodcastEpisode(episode.getEpisodeId(), context, null);
+
+ for(int i = 0; i < entries.size(); i++) {
+ PodcastEpisode episode = (PodcastEpisode) entries.get(i);
+ if("skipped".equals(episode.getStatus())) {
+ musicService.downloadPodcastEpisode(episode.getEpisodeId(), context, null);
+ }
}
return null;
}
|