Skip to content

Commit 171f2c4

Browse files
committed
Ignore subscriptions with invalid url and keep ones with empty title.
if a channel if deleted (thus it has an empty title), it is imported in NewPipe anyway, so that if it becomes undeleted in the future, it will be shown in the app.
1 parent d5043cd commit 171f2c4

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeSubscriptionExtractor.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,10 @@ private List<SubscriptionItem> getItemsFromOPML(InputStream contentInputStream)
6363
String title = outline.attr("title");
6464
String xmlUrl = outline.attr("abs:xmlUrl");
6565

66-
if (title.isEmpty()) {
67-
continue;
68-
}
69-
70-
if (xmlUrl.isEmpty()) {
71-
throw new InvalidSourceException("document has invalid entries");
72-
}
73-
7466
try {
7567
String id = Parser.matchGroup1(ID_PATTERN, xmlUrl);
7668
result.add(new SubscriptionItem(service.getServiceId(), BASE_CHANNEL_URL + id, title));
77-
} catch (Parser.RegexException e) {
78-
throw new InvalidSourceException("document has invalid entries", e);
79-
}
69+
} catch (Parser.RegexException ignored) { /* ignore invalid subscriptions */ }
8070
}
8171

8272
return result;

0 commit comments

Comments
 (0)