diff options
author | ByteHamster <info@bytehamster.com> | 2019-08-30 13:35:30 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2019-08-30 13:35:30 +0200 |
commit | af8dc2c9b98151f96dd74e74926d33c954ffa7bd (patch) | |
tree | 4daf6382d6f78e271f26a54a90fde0fcd96827cb /app/src/main/java | |
parent | f35286f1dc37b2df86a95dbf8d3fce23aef73529 (diff) | |
download | AntennaPod-af8dc2c9b98151f96dd74e74926d33c954ffa7bd.zip |
Do not crash on undeliverable InterruptedException
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/discovery/ItunesTopListLoader.java | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/discovery/ItunesTopListLoader.java b/app/src/main/java/de/danoeh/antennapod/discovery/ItunesTopListLoader.java index bc9133258..79ccd9532 100644 --- a/app/src/main/java/de/danoeh/antennapod/discovery/ItunesTopListLoader.java +++ b/app/src/main/java/de/danoeh/antennapod/discovery/ItunesTopListLoader.java @@ -33,16 +33,12 @@ public class ItunesTopListLoader { OkHttpClient client = AntennapodHttpClient.getHttpClient(); String feedString; try { - try { - feedString = getTopListFeed(client, lang, limit); - } catch (IOException e) { - feedString = getTopListFeed(client, "us", limit); - } - List<PodcastSearchResult> podcasts = parseFeed(feedString); - emitter.onSuccess(podcasts); - } catch (IOException | JSONException e) { - emitter.onError(e); + feedString = getTopListFeed(client, lang, limit); + } catch (IOException e) { + feedString = getTopListFeed(client, "us", limit); } + List<PodcastSearchResult> podcasts = parseFeed(feedString); + emitter.onSuccess(podcasts); }) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()); |