mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-25 01:20:34 +00:00
-Changed failed media source exception to use cause instead of top level exception.
This commit is contained in:
parent
3de9da0528
commit
50392ed67d
@ -716,9 +716,9 @@ public abstract class BasePlayer implements
|
|||||||
playQueue.error(/*isNetworkProblem=*/true);
|
playQueue.error(/*isNetworkProblem=*/true);
|
||||||
} else if (isCurrentWindowValid()) {
|
} else if (isCurrentWindowValid()) {
|
||||||
playQueue.error(/*isTransitioningToBadStream=*/true);
|
playQueue.error(/*isTransitioningToBadStream=*/true);
|
||||||
} else if (error instanceof FailedMediaSource.MediaSourceResolutionException) {
|
} else if (cause instanceof FailedMediaSource.MediaSourceResolutionException) {
|
||||||
playQueue.error(/*recoverableWithNoAvailableStream=*/false);
|
playQueue.error(/*recoverableWithNoAvailableStream=*/false);
|
||||||
} else if (error instanceof FailedMediaSource.StreamInfoLoadException) {
|
} else if (cause instanceof FailedMediaSource.StreamInfoLoadException) {
|
||||||
playQueue.error(/*recoverableIfLoadFailsWhenNetworkIsFine=*/false);
|
playQueue.error(/*recoverableIfLoadFailsWhenNetworkIsFine=*/false);
|
||||||
} else {
|
} else {
|
||||||
playQueue.error(/*noIdeaWhatHappenedAndLetUserChooseWhatToDo=*/true);
|
playQueue.error(/*noIdeaWhatHappenedAndLetUserChooseWhatToDo=*/true);
|
||||||
|
@ -14,7 +14,7 @@ import java.io.IOException;
|
|||||||
public class FailedMediaSource implements ManagedMediaSource {
|
public class FailedMediaSource implements ManagedMediaSource {
|
||||||
private final String TAG = "FailedMediaSource@" + Integer.toHexString(hashCode());
|
private final String TAG = "FailedMediaSource@" + Integer.toHexString(hashCode());
|
||||||
|
|
||||||
public static class FailedMediaSourceException extends IOException {
|
public static class FailedMediaSourceException extends Exception {
|
||||||
FailedMediaSourceException(String message) {
|
FailedMediaSourceException(String message) {
|
||||||
super(message);
|
super(message);
|
||||||
}
|
}
|
||||||
@ -79,7 +79,7 @@ public class FailedMediaSource implements ManagedMediaSource {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void maybeThrowSourceInfoRefreshError() throws IOException {
|
public void maybeThrowSourceInfoRefreshError() throws IOException {
|
||||||
throw error;
|
throw new IOException(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user