Skip to content

Commit

Permalink
handle ContentNotSupportedException in ExtractorHelper.handleGeneralE…
Browse files Browse the repository at this point in the history
…xception()
  • Loading branch information
B0pol committed Apr 7, 2020
1 parent 6e41044 commit 47aa4ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ dependencies {
exclude module: 'support-annotations'
})

implementation 'com.github.B0pol:NewPipeExtractor:cf24e2935cbb46117ab7bd2705d5e86f68f649e1'
implementation 'com.github.B0pol:NewPipeExtractor:9a7c6b7ab00c0f5b8337232fc66d3d9b538c229f'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.23.0'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.schabi.newpipe.extractor.channel.ChannelInfo;
import org.schabi.newpipe.extractor.comments.CommentsInfo;
import org.schabi.newpipe.extractor.exceptions.ContentNotAvailableException;
import org.schabi.newpipe.extractor.exceptions.ContentNotSupportedException;
import org.schabi.newpipe.extractor.exceptions.ParsingException;
import org.schabi.newpipe.extractor.exceptions.ReCaptchaException;
import org.schabi.newpipe.extractor.feed.FeedExtractor;
Expand Down Expand Up @@ -293,6 +294,8 @@ public static void handleGeneralException(final Context context, final int servi
Toast.makeText(context, R.string.network_error, Toast.LENGTH_LONG).show();
} else if (exception instanceof ContentNotAvailableException) {
Toast.makeText(context, R.string.content_not_available, Toast.LENGTH_LONG).show();
} else if (exception instanceof ContentNotSupportedException) {
Toast.makeText(context, R.string.content_not_supported, Toast.LENGTH_LONG).show();
} else {
int errorId = exception instanceof YoutubeStreamExtractor.DecryptException
? R.string.youtube_signature_decryption_error
Expand Down

0 comments on commit 47aa4ea

Please sign in to comment.