Skip to content

Commit 3af95d1

Browse files
author
Yevhen Babiichuk (DustDFG)
committed
acceptUrl problem showoff
1 parent 592b5ca commit 3af95d1

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/linkhandler/LinkHandlerFactory.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,13 @@ public LinkHandler fromId(final String id, final String baseUrl) throws ParsingE
9797
}
9898

9999
/**
100-
* When a VIEW_ACTION is caught this function will test if the url delivered within the calling
101-
* Intent was meant to be watched with this Service.
102-
* Return false if this service shall not allow to be called through ACTIONs.
100+
* Tests if the url is supported by this LinkHandler type
103101
*/
104-
public boolean acceptUrl(final String url) throws ParsingException {
105-
return onAcceptUrl(url);
102+
public final boolean acceptUrl(final String url) {
103+
try {
104+
return onAcceptUrl(url);
105+
} catch (final Exception ignored) {
106+
return false;
107+
}
106108
}
107109
}

0 commit comments

Comments
 (0)