diff --git a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java index 7d211ecdb..95ce2e69c 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java @@ -818,9 +818,25 @@ public class PopupVideoPlayer extends Service implements StateInterface { }); } }); + } catch (IOException ie) { + if (DEBUG) ie.printStackTrace(); + mainHandler.post(new Runnable() { + @Override + public void run() { + Toast.makeText(PopupVideoPlayer.this, R.string.network_error, Toast.LENGTH_SHORT).show(); + } + }); + stopSelf(); } catch (Exception e) { - e.printStackTrace(); + if (DEBUG) e.printStackTrace(); + mainHandler.post(new Runnable() { + @Override + public void run() { + Toast.makeText(PopupVideoPlayer.this, R.string.content_not_available, Toast.LENGTH_SHORT).show(); + } + }); + stopSelf(); } } } -} \ No newline at end of file +}