|
62 | 62 | import org.schabi.newpipe.error.UserAction; |
63 | 63 | import org.schabi.newpipe.extractor.InfoItem; |
64 | 64 | import org.schabi.newpipe.extractor.NewPipe; |
| 65 | +import org.schabi.newpipe.extractor.exceptions.ContentNotSupportedException; |
65 | 66 | import org.schabi.newpipe.extractor.exceptions.ExtractionException; |
66 | 67 | import org.schabi.newpipe.extractor.stream.AudioStream; |
67 | 68 | import org.schabi.newpipe.extractor.stream.Stream; |
@@ -1547,8 +1548,19 @@ public void handleResult(@NonNull final StreamInfo info) { |
1547 | 1548 | } |
1548 | 1549 |
|
1549 | 1550 | if (!info.getErrors().isEmpty()) { |
1550 | | - showSnackBarError(new ErrorInfo(info.getErrors(), |
1551 | | - UserAction.REQUESTED_STREAM, info.getUrl(), info)); |
| 1551 | + // Bandcamp fan pages are not yet supported and thus a ContentNotAvailableException is |
| 1552 | + // thrown. This is not an error and thus should not be shown to the user. |
| 1553 | + for (final Throwable throwable : info.getErrors()) { |
| 1554 | + if (throwable instanceof ContentNotSupportedException |
| 1555 | + && "Fan pages are not supported".equals(throwable.getMessage())) { |
| 1556 | + info.getErrors().remove(throwable); |
| 1557 | + } |
| 1558 | + } |
| 1559 | + |
| 1560 | + if (!info.getErrors().isEmpty()) { |
| 1561 | + showSnackBarError(new ErrorInfo(info.getErrors(), |
| 1562 | + UserAction.REQUESTED_STREAM, info.getUrl(), info)); |
| 1563 | + } |
1552 | 1564 | } |
1553 | 1565 |
|
1554 | 1566 | binding.detailControlsDownload.setVisibility(info.getStreamType() == StreamType.LIVE_STREAM |
|
0 commit comments