From 98bdb436088a92525d54b03cb9a1f7174eef85ae Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 19 Mar 2014 18:35:10 +0100 Subject: [PATCH] upnpbrowser.cpp: -add albumArtURI parse --- src/gui/upnpbrowser.cpp | 15 ++++++++++----- src/gui/upnpbrowser.h | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index 54a09a72f..2274d9267 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -260,7 +260,7 @@ std::vector *CUpnpBrowserGui::decodeResult(std::string result) for (node=root->GetChild(); node; node=node->GetNext()) { bool isdir; - std::string title, artist = "", album = "", id, children; + std::string title, artist = "", album = "", albumArtURI = "", id, children; const char *type, *p; if (!strcmp(node->GetType(), "container")) @@ -291,7 +291,7 @@ std::vector *CUpnpBrowserGui::decodeResult(std::string result) p = ""; children=std::string(p); - UPnPEntry entry={id, isdir, title, artist, album, children, resources, -1}; + UPnPEntry entry={id, isdir, title, artist, album, albumArtURI, children, resources, -1}; entries->push_back(entry); } if (!strcmp(node->GetType(), "item")) @@ -330,6 +330,13 @@ std::vector *CUpnpBrowserGui::decodeResult(std::string result) p = ""; album=std::string(p); } + else if (!strcmp(type,"albumArtURI")) + { + p=snode->GetData(); + if (!p) + p = ""; + albumArtURI=std::string(p); + } else if (!strcmp(type,"res")) { p = snode->GetData(); @@ -416,8 +423,7 @@ std::vector *CUpnpBrowserGui::decodeResult(std::string result) p = ""; children=std::string(p); - UPnPEntry entry={id, isdir, title, artist, album, children, resources, preferred}; - + UPnPEntry entry={id, isdir, title, artist, album, albumArtURI, children, resources, preferred}; entries->push_back(entry); } } @@ -1140,7 +1146,6 @@ void CUpnpBrowserGui::paintDetails(std::vector *entry, unsigned int i // Foot info int top = m_y + (m_height - m_info_height - 1 * m_buttonHeight) + 2; int text_start = m_x + 10; - printf("paintDetails: index %d use_playing %d shown %d\n", index, use_playing, m_playing_entry_is_shown); if ((!use_playing) && ((*entry)[index].isdir)) { diff --git a/src/gui/upnpbrowser.h b/src/gui/upnpbrowser.h index 4014ff6aa..ae7dba0f4 100644 --- a/src/gui/upnpbrowser.h +++ b/src/gui/upnpbrowser.h @@ -57,6 +57,7 @@ struct UPnPEntry std::string title; std::string artist; std::string album; + std::string albumArtURI; std::string children; std::vector resources; int preferred;