From efdb41f2a6c194f0ec6371684a8f6b8fcdbe0bcd Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 14 Jan 2014 12:22:37 +0100 Subject: db/upnp/Object: add attribute "name" Call titleToPathElt() only once for each object. --- src/db/upnp/Object.hxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/db/upnp/Object.hxx') 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(); -- cgit v1.2.3