Call history listener for Kodi (closes #798)

If Kore (the Kodi App) was sucessfully started the history listener is
invoked.
This commit is contained in:
Coffeemakr 2017-10-30 21:31:59 +01:00
parent 7340bc05b4
commit 6f18dd26a2
No known key found for this signature in database
GPG key ID: 3F35676D8FF6E743
4 changed files with 19 additions and 6 deletions

View file

@ -560,7 +560,10 @@ public class VideoDetailFragment extends BaseStateFragment<StreamInfo> implement
@Override
public void onActionSelected(int selectedStreamId) {
try {
NavigationHelper.startKore(activity, Uri.parse(info.url.replace("https", "http")));
NavigationHelper.playWithKore(activity, Uri.parse(info.url.replace("https", "http")));
if(activity instanceof HistoryListener) {
((HistoryListener) activity).onVideoPlayed(info, null);
}
} catch (Exception e) {
if(DEBUG) Log.i(TAG, "Failed to start kore", e);
showInstallKoreDialog(activity);