aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/upnp/Object.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-14 12:22:37 +0100
committerMax Kellermann <max@duempel.org>2014-01-14 12:22:37 +0100
commitefdb41f2a6c194f0ec6371684a8f6b8fcdbe0bcd (patch)
treed6ece56552200b98168018ecb3bde94dfa885bdc /src/db/upnp/Object.hxx
parent26b850c15c605b4fc1404c4e8683791603f0e43c (diff)
downloadmpd-efdb41f2a6c194f0ec6371684a8f6b8fcdbe0bcd.tar.gz
mpd-efdb41f2a6c194f0ec6371684a8f6b8fcdbe0bcd.tar.xz
mpd-efdb41f2a6c194f0ec6371684a8f6b8fcdbe0bcd.zip
db/upnp/Object: add attribute "name"
Call titleToPathElt() only once for each object.
Diffstat (limited to 'src/db/upnp/Object.hxx')
-rw-r--r--src/db/upnp/Object.hxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/db/upnp/Object.hxx b/src/db/upnp/Object.hxx
index d158ab6f7..1346c15d4 100644
--- a/src/db/upnp/Object.hxx
+++ b/src/db/upnp/Object.hxx
@@ -52,6 +52,12 @@ public:
std::string m_id; // ObjectId
std::string m_pid; // Parent ObjectId
std::string url;
+
+ /**
+ * A copy of "dc:title" sanitized as a file name.
+ */
+ std::string name;
+
std::string m_title; // dc:title. Directory name for a container.
Type type;
ItemClass item_class;
@@ -71,8 +77,8 @@ public:
* @param[out] value
* @return true if found.
*/
- const char *getprop(const char *name) const {
- auto it = m_props.find(name);
+ const char *getprop(const char *_name) const {
+ auto it = m_props.find(_name);
if (it == m_props.end())
return nullptr;
return it->second.c_str();