Commit 44a65fc5 authored by Max Kellermann's avatar Max Kellermann

db/upnp/Object: add attribute "url"

Don't store in the std::map.
parent f031eb1e
...@@ -237,7 +237,7 @@ static Song * ...@@ -237,7 +237,7 @@ static Song *
upnpItemToSong(const UPnPDirObject &dirent, const char *uri) upnpItemToSong(const UPnPDirObject &dirent, const char *uri)
{ {
if (*uri == 0) if (*uri == 0)
uri = dirent.getprop("url"); uri = dirent.url.c_str();
Song *s = Song::NewFile(uri, nullptr); Song *s = Song::NewFile(uri, nullptr);
......
...@@ -168,7 +168,7 @@ protected: ...@@ -168,7 +168,7 @@ protected:
break; break;
case 'r': case 'r':
if (!m_path.back().compare("res")) { if (!m_path.back().compare("res")) {
m_tobj.m_props["url"] += str; m_tobj.url = str;
} }
break; break;
case 'u': case 'u':
......
...@@ -51,6 +51,7 @@ public: ...@@ -51,6 +51,7 @@ public:
std::string m_id; // ObjectId std::string m_id; // ObjectId
std::string m_pid; // Parent ObjectId std::string m_pid; // Parent ObjectId
std::string url;
std::string m_title; // dc:title. Directory name for a container. std::string m_title; // dc:title. Directory name for a container.
Type type; Type type;
ItemClass item_class; ItemClass item_class;
...@@ -81,6 +82,7 @@ public: ...@@ -81,6 +82,7 @@ public:
{ {
m_id.clear(); m_id.clear();
m_pid.clear(); m_pid.clear();
url.clear();
m_title.clear(); m_title.clear();
type = Type::UNKNOWN; type = Type::UNKNOWN;
item_class = ItemClass::UNKNOWN; item_class = ItemClass::UNKNOWN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment