upnpbrowser.cpp: paint picture when reentry same folder

This commit is contained in:
GetAway
2018-09-26 21:19:04 +02:00
parent 2c3e4afa26
commit 23a76e6f64

View File

@@ -1144,10 +1144,10 @@ void CUpnpBrowserGui::paintItemInfo(UPnPEntry *entry)
if (!entry->isdir && preferred != -1)
tmp += "URL: " + entry->resources[preferred].url;
static std::string lastname = "", tmpname = "";
if(!entry->albumArtURI.empty()){
if(lastname != entry->albumArtURI){
tmpname = lastname = entry->albumArtURI.c_str();
std::string tmpname = "";
if(!entry->albumArtURI.empty())
{
tmpname = entry->albumArtURI.c_str();
tmpname = g_PicViewer->DownloadImage(tmpname);
int h_image = infobox.getHeight() - OFFSET_INTER - infobox.getCornerRadius();
int y_image = infobox.getYPos() + infobox.getHeight()/2 - h_image/2;
@@ -1160,7 +1160,6 @@ void CUpnpBrowserGui::paintItemInfo(UPnPEntry *entry)
image->setHeight(h_image, true);
int x_image = infobox.getXPos() + infobox.getWidth() - image->getWidth() - OFFSET_INTER - infobox.getCornerRadius();
image->setXPos(x_image);
}
}else{
if (image){
delete image; image = NULL;