Fix bug when fetching unavailable content

- Fix #482
- When opening a invalid/deleted/unavailable video, the popup was just printing the error, now it shows a message to the user and exits
This commit is contained in:
mauriciocolli 2017-03-17 11:50:27 -03:00 committed by GitHub
parent 16b757d9a3
commit c100d15ba8

View file

@ -819,8 +819,15 @@ public class PopupVideoPlayer extends Service implements StateInterface {
} }
}); });
} 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();
} }
} }
} }
} }