diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index 80d5741e5..cdb02fce1 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -1100,15 +1100,17 @@ void CUpnpBrowserGui::paintItemInfo(std::vector *entry, unsigned int xstart = (m_width - w) / 2; g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + xstart, m_y + 4 + 3*m_mheight, m_width - 20, tmp, COL_MENUCONTENTSELECTED_TEXT, 0, true); // UTF-8 - static std::string lastname = ""; - if(!((*entry)[selected].albumArtURI.empty()) && lastname != (*entry)[selected].albumArtURI){ - lastname = (*entry)[selected].albumArtURI.c_str(); - std::string tmpname = (*entry)[selected].albumArtURI.c_str(); - tmpname = g_PicViewer->DownloadImage(tmpname ); - int flogo_w = 0, flogo_h = 0; - g_PicViewer->getSize(tmpname.c_str(), &flogo_w, &flogo_h); - if((flogo_h > m_title_height-14) || (m_title_height*2 > flogo_h)){ - g_PicViewer->rescaleImageDimensions(&flogo_w, &flogo_h, m_title_height*2, m_title_height-14); + static std::string lastname = "", tmpname = ""; + if(!(*entry)[selected].albumArtURI.empty()){ + static int flogo_w = 0, flogo_h = 0; + if(lastname != (*entry)[selected].albumArtURI){ + tmpname = lastname = (*entry)[selected].albumArtURI.c_str(); + tmpname = g_PicViewer->DownloadImage(tmpname ); + flogo_w = 0, flogo_h = 0; + g_PicViewer->getSize(tmpname.c_str(), &flogo_w, &flogo_h); + if((flogo_h > m_title_height-14) || (m_title_height*2 > flogo_h)){ + g_PicViewer->rescaleImageDimensions(&flogo_w, &flogo_h, m_title_height*2, m_title_height-14); + } } g_PicViewer->DisplayImage(tmpname.c_str(), m_x+m_width-flogo_w-2, m_y + 2, flogo_w, flogo_h); }