diff options
author | Max Kellermann <max@duempel.org> | 2014-11-08 10:55:59 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-11-08 10:55:59 +0100 |
commit | e67afc35b80943480964a39e9f65d9143d49461a (patch) | |
tree | db6a43e508fd27ef40e27391e7f225df181d938d /src/db/plugins/upnp/Directory.cxx | |
parent | 5e73007b1d44589bb9232a73b534814414bc56d7 (diff) | |
download | mpd-e67afc35b80943480964a39e9f65d9143d49461a.tar.gz mpd-e67afc35b80943480964a39e9f65d9143d49461a.tar.xz mpd-e67afc35b80943480964a39e9f65d9143d49461a.zip |
db/upnp/Directory: move checkobjok() to class UPnPDirObject
Diffstat (limited to 'src/db/plugins/upnp/Directory.cxx')
-rw-r--r-- | src/db/plugins/upnp/Directory.cxx | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/db/plugins/upnp/Directory.cxx b/src/db/plugins/upnp/Directory.cxx index c7fd04236..b6c40c69d 100644 --- a/src/db/plugins/upnp/Directory.cxx +++ b/src/db/plugins/upnp/Directory.cxx @@ -197,16 +197,6 @@ protected: } } - bool checkobjok() { - if (m_tobj.id.empty() || m_tobj.parent_id.empty() || - m_tobj.name.empty() || - (m_tobj.type == UPnPDirObject::Type::ITEM && - m_tobj.item_class == UPnPDirObject::ItemClass::UNKNOWN)) - return false; - - return true; - } - virtual void EndElement(const XML_Char *name) { if (tag_type != TAG_NUM_OF_ITEM_TYPES) { @@ -223,7 +213,7 @@ protected: } if ((!strcmp(name, "container") || !strcmp(name, "item")) && - checkobjok()) { + m_tobj.Check()) { tag.Commit(m_tobj.tag); m_dir.objects.emplace_back(std::move(m_tobj)); } |