1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-09-05 12:27:55 +00:00

Merge pull request #483 from mauriciocolli/patch-2

Fix bug when fetching unavailable content
This commit is contained in:
Christian Schabesberger
2017-03-17 17:10:03 +01:00
committed by GitHub

View File

@@ -818,8 +818,24 @@ 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) { } 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();
} }
} }
} }