Permalink
Browse files

add bd="true" test to playercorefactory (simplified)

  • Loading branch information...
1 parent 8f6fac1 commit c95d33ff8a1bdadf9f18b195c0a05db8bdcfee68 @ScudLee committed Mar 17, 2012
@@ -48,6 +48,7 @@ void CPlayerSelectionRule::Initialize(TiXmlElement* pRule)
m_tAudio = GetTristate(pRule->Attribute("audio"));
m_tVideo = GetTristate(pRule->Attribute("video"));
+ m_tBD = GetTristate(pRule->Attribute("bd"));
m_tDVD = GetTristate(pRule->Attribute("dvd"));
m_tDVDFile = GetTristate(pRule->Attribute("dvdfile"));
m_tDVDImage = GetTristate(pRule->Attribute("dvdimage"));
@@ -111,6 +112,7 @@ void CPlayerSelectionRule::GetPlayers(const CFileItem& item, VECPLAYERCORES &vec
if (m_tVideo >= 0 && (m_tVideo > 0) != item.IsVideo()) return;
if (m_tInternetStream >= 0 && (m_tInternetStream > 0) != item.IsInternetStream()) return;
+ if (m_tBD >= 0 && (m_tBD > 0) != (item.IsBDFile() && item.IsOnDVD())) return;
if (m_tDVD >= 0 && (m_tDVD > 0) != item.IsDVD()) return;
if (m_tDVDFile >= 0 && (m_tDVDFile > 0) != item.IsDVDFile()) return;
if (m_tDVDImage >= 0 && (m_tDVDImage > 0) != item.IsDVDImage()) return;
@@ -49,6 +49,7 @@ class CPlayerSelectionRule
int m_tVideo;
int m_tInternetStream;
+ int m_tBD;
int m_tDVD;
int m_tDVDFile;
int m_tDVDImage;

0 comments on commit c95d33f

Please sign in to comment.