diff options
author | H. Lehmann <ByteHamster@users.noreply.github.com> | 2019-08-30 13:44:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-30 13:44:13 +0200 |
commit | 46af0e0c36a0ef01aea7aa731ea9e0ad36fca0fe (patch) | |
tree | e603306ac5af727336557c6ff79340d22d6dc1ba /app/src/main/java/de/danoeh/antennapod | |
parent | 17d6d7fbbf27eed04387f15771cc835aa461807c (diff) | |
parent | af8dc2c9b98151f96dd74e74926d33c954ffa7bd (diff) | |
download | AntennaPod-46af0e0c36a0ef01aea7aa731ea9e0ad36fca0fe.zip |
Merge pull request #3349 from ByteHamster/no-crash-after-dispose
Do not crash on undeliverable InterruptedException
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod')
-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()); |