Ticket #3493: coverart.082109.diff
File coverart.082109.diff, 2.8 KB (added by , 15 years ago) |
---|
-
libs/libmythtv/osd.cpp
1714 1714 OSDTypeImage *cs = (OSDTypeImage *)container->GetType("channelicon"); 1715 1715 if (cs) 1716 1716 { 1717 if ((infoMap.contains("iconpath")) && (infoMap["iconpath"] != ""))1717 if ((infoMap.contains("iconpath")) && !infoMap["iconpath"].isEmpty()) 1718 1718 cs->Load(infoMap["iconpath"], wmult, hmult, 30, 30); 1719 1719 else 1720 1720 cs->Load(" ", wmult, hmult, 30, 30); 1721 1721 } 1722 1722 1723 OSDTypeImage *cs1 = (OSDTypeImage *)container->GetType("coverart"); 1724 if (cs1) 1725 { 1726 if ((infoMap.contains("coverartpath")) && !infoMap["coverartpath"].isEmpty()) 1727 cs1->Load(infoMap["coverartpath"], wmult, hmult, 30, 30); 1728 } 1729 1723 1730 m_setsvisible = true; 1724 1731 changed = true; 1725 1732 } … … 1743 1750 cs->Load(" ", wmult, hmult, 30, 30); 1744 1751 } 1745 1752 1753 OSDTypeImage *cs1 = (OSDTypeImage *)container->GetType("coverart"); 1754 if (cs1) 1755 { 1756 if ((infoMap.contains("coverartpath")) && (infoMap["coverartpath"] != "")) 1757 cs1->Load(infoMap["coverartpath"], wmult, hmult, 30, 30); 1758 } 1759 1746 1760 container->DisplayFor(length * 1000000); 1747 1761 m_setsvisible = true; 1748 1762 changed = true; -
libs/libmyth/programinfo.cpp
722 722 progMap["channel"] = ChannelText(channelFormat); 723 723 progMap["longchannel"] = ChannelText(longChannelFormat); 724 724 progMap["iconpath"] = ""; 725 progMap["coverartpath"] = ""; 725 726 727 if (isVideo && !pathname.startsWith("dvd:")) 728 { 729 QString result; 730 QFileInfo fi(pathname); 731 QString fn = fi.fileName(); 732 fn.prepend("%"); 733 734 MSqlQuery query(MSqlQuery::InitCon()); 735 query.prepare("SELECT coverfile FROM videometadata WHERE filename LIKE :FILENAME ;"); 736 query.bindValue(":FILENAME", fn); 737 738 if (query.exec() && query.next()) 739 result = query.value(0).toString(); 740 741 if (!result.startsWith("/") && pathname.startsWith("myth://")) 742 { 743 QString workURL = pathname; 744 workURL.replace("Videos","Coverart"); 745 QUrl baseURL(workURL); 746 QString finalURL = baseURL.toString(QUrl::RemovePath) + "/" + result; 747 progMap["coverartpath"] = finalURL; 748 } 749 else 750 progMap["coverartpath"] = result; 751 } 752 726 753 QString tmpSize; 727 754 728 755 tmpSize.sprintf("%0.2f ", filesize / 1024.0 / 1024.0 / 1024.0);