aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Brown <themagnificentmrb@gmail.com>2020-01-28 22:04:41 -0800
committerGarrett Brown <themagnificentmrb@gmail.com>2020-01-30 13:29:56 -0800
commit40ff1f2109890a084f4190a37234178c049d7460 (patch)
tree968807bc296d9cae61a07785c0c588c9a1ec5a7e
parenta8d5d48829f2a14769c40b190d42cb086b5916b2 (diff)
Rename "dvdimage" selection tag to "discimage"
The prior behavior was kept as a fallback. If the fallback is used, a deprecation warning is logged.
-rw-r--r--system/playercorefactory.xml2
-rw-r--r--xbmc/cores/playercorefactory/PlayerSelectionRule.cpp10
-rw-r--r--xbmc/cores/playercorefactory/PlayerSelectionRule.h2
3 files changed, 10 insertions, 4 deletions
diff --git a/system/playercorefactory.xml b/system/playercorefactory.xml
index bb57a08e6c..f928311cf0 100644
--- a/system/playercorefactory.xml
+++ b/system/playercorefactory.xml
@@ -26,7 +26,7 @@
<!-- DVDs -->
<rule name="dvd" dvd="true" player="VideoPlayer" />
- <rule name="dvdimage" dvdimage="true" game="false" player="VideoPlayer" />
+ <rule name="discimage" discimage="true" game="false" player="VideoPlayer" />
<!-- Only VideoPlayer can handle these normally -->
<rule name="sdp/asf" filetypes="sdp|asf" player="VideoPlayer" />
diff --git a/xbmc/cores/playercorefactory/PlayerSelectionRule.cpp b/xbmc/cores/playercorefactory/PlayerSelectionRule.cpp
index 2a89a6f64d..b2fb5ef71c 100644
--- a/xbmc/cores/playercorefactory/PlayerSelectionRule.cpp
+++ b/xbmc/cores/playercorefactory/PlayerSelectionRule.cpp
@@ -52,7 +52,13 @@ void CPlayerSelectionRule::Initialize(TiXmlElement* pRule)
m_tBD = GetTristate(pRule->Attribute("bd"));
m_tDVD = GetTristate(pRule->Attribute("dvd"));
m_tDVDFile = GetTristate(pRule->Attribute("dvdfile"));
- m_tDVDImage = GetTristate(pRule->Attribute("dvdimage"));
+ m_tDiscImage = GetTristate(pRule->Attribute("discimage"));
+ if (m_tDiscImage < 0)
+ {
+ m_tDiscImage = GetTristate(pRule->Attribute("dvdimage"));
+ if (m_tDiscImage >= 0)
+ CLog::Log(LOGWARNING, "\"dvdimage\" tag is deprecated. use \"discimage\"");
+ }
m_protocols = XMLUtils::GetAttribute(pRule, "protocols");
m_fileTypes = XMLUtils::GetAttribute(pRule, "filetypes");
@@ -126,7 +132,7 @@ void CPlayerSelectionRule::GetPlayers(const CFileItem& item, std::vector<std::st
return;
if (m_tDVDFile >= 0 && (m_tDVDFile > 0) != item.IsDVDFile())
return;
- if (m_tDVDImage >= 0 && (m_tDVDImage > 0) != item.IsDiscImage())
+ if (m_tDiscImage >= 0 && (m_tDiscImage > 0) != item.IsDiscImage())
return;
CRegExp regExp(false, CRegExp::autoUtf8);
diff --git a/xbmc/cores/playercorefactory/PlayerSelectionRule.h b/xbmc/cores/playercorefactory/PlayerSelectionRule.h
index 82b5ea0fd4..f613cbdbf7 100644
--- a/xbmc/cores/playercorefactory/PlayerSelectionRule.h
+++ b/xbmc/cores/playercorefactory/PlayerSelectionRule.h
@@ -42,7 +42,7 @@ private:
int m_tBD;
int m_tDVD;
int m_tDVDFile;
- int m_tDVDImage;
+ int m_tDiscImage;
std::string m_protocols;
std::string m_fileTypes;