Skip to content
This repository
Browse code

[Fix] PlayerSelectionRule GetPlayers().

This partially reverts commit e575a7f
[Cores] Remove redundant predicates in conditions.
  • Loading branch information...
commit 81aea9b19c853695dac8f4ced0569adfdf57c24e 1 parent c1413ad
Andreas Zelend authored
18  xbmc/cores/playercorefactory/PlayerSelectionRule.cpp
@@ -108,15 +108,15 @@ void CPlayerSelectionRule::GetPlayers(const CFileItem& item, VECPLAYERCORES &vec
108 108
   CLog::Log(LOGDEBUG, "CPlayerSelectionRule::GetPlayers: considering rule: %s", m_name.c_str());
109 109
 
110 110
   if (m_bStreamDetails && !item.HasVideoInfoTag()) return;
111  
-  if ((m_tAudio > 0) != item.IsAudio()) return;
112  
-  if ((m_tVideo > 0) != item.IsVideo()) return;
113  
-  if ((m_tInternetStream > 0) != item.IsInternetStream()) return;
114  
-  if ((m_tRemote > 0) != item.IsRemote()) return;
115  
-
116  
-  if ((m_tBD > 0) != (item.IsBDFile() && item.IsOnDVD())) return;
117  
-  if ((m_tDVD > 0) != item.IsDVD()) return;
118  
-  if ((m_tDVDFile > 0) != item.IsDVDFile()) return;
119  
-  if ((m_tDVDImage > 0) != item.IsDVDImage()) return;
  111
+  if (m_tAudio >= 0 && (m_tAudio > 0) != item.IsAudio()) return;
  112
+  if (m_tVideo >= 0 && (m_tVideo > 0) != item.IsVideo()) return;
  113
+  if (m_tInternetStream >= 0 && (m_tInternetStream > 0) != item.IsInternetStream()) return;
  114
+  if (m_tRemote >= 0 && (m_tRemote > 0) != item.IsRemote()) return;
  115
+
  116
+  if (m_tBD >= 0 && (m_tBD > 0) != (item.IsBDFile() && item.IsOnDVD())) return;
  117
+  if (m_tDVD >= 0 && (m_tDVD > 0) != item.IsDVD()) return;
  118
+  if (m_tDVDFile >= 0 && (m_tDVDFile > 0) != item.IsDVDFile()) return;
  119
+  if (m_tDVDImage >= 0 && (m_tDVDImage > 0) != item.IsDVDImage()) return;
120 120
 
121 121
   CRegExp regExp;
122 122
 

0 notes on commit 81aea9b

Please sign in to comment.
Something went wrong with that request. Please try again.