pass serviceId instead of item, reduce duplication

This commit is contained in:
khimaros 2021-01-02 11:24:33 -08:00
parent 48a5107296
commit ac59382b84
6 changed files with 7 additions and 12 deletions

View file

@ -932,9 +932,7 @@ public class VideoPlayerImpl extends VideoPlayer
service.getString(R.string.show_play_with_kodi_key), false);
// show kodi button if it supports the current service and it is enabled in settings
final boolean showKodiButton = playQueue != null && playQueue.getItem() != null
&& KoreUtil.isServiceSupportedByKore(playQueue.getItem().getServiceId())
&& PreferenceManager.getDefaultSharedPreferences(context)
.getBoolean(context.getString(R.string.show_play_with_kodi_key), false);
&& KoreUtil.shouldShowPlayWithKodi(context, playQueue.getItem().getServiceId());
playWithKodi.setVisibility(videoPlayerSelected() && kodiEnabled && showKodiButton
? View.VISIBLE : View.GONE);
}