Fix crash in iTunes loader (#6341)

This commit is contained in:
ByteHamster 2023-02-23 23:05:54 +01:00 committed by GitHub
parent 240737e3ac
commit 28844af6ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -58,8 +58,9 @@ public class ItunesTopListLoader {
List<PodcastSearchResult> suggestedPodcasts, List<Feed> subscribedFeeds, int limit) {
Set<String> subscribedPodcastsSet = new HashSet<>();
for (Feed subscribedFeed : subscribedFeeds) {
String subscribedTitle = subscribedFeed.getTitle().trim() + " - " + subscribedFeed.getAuthor().trim();
subscribedPodcastsSet.add(subscribedTitle);
if (subscribedFeed.getTitle() != null && subscribedFeed.getAuthor() != null) {
subscribedPodcastsSet.add(subscribedFeed.getTitle().trim() + " - " + subscribedFeed.getAuthor().trim());
}
}
List<PodcastSearchResult> suggestedNotSubscribed = new ArrayList<>();
for (PodcastSearchResult suggested : suggestedPodcasts) {