upnpbrowser.cpp fix for show pic after play

This commit is contained in:
Jacek Jendrzej
2014-03-28 15:38:47 +01:00
parent 4d8a633532
commit d3a5e13f04

View File

@@ -1100,15 +1100,17 @@ void CUpnpBrowserGui::paintItemInfo(std::vector<UPnPEntry> *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);
}