Ticket #3493: coverartosd.081809.diff
File coverartosd.081809.diff, 2.5 KB (added by , 15 years ago) |
---|
-
libs/libmythtv/programinfo.cpp
683 683 progMap["channel"] = ChannelText(channelFormat); 684 684 progMap["longchannel"] = ChannelText(longChannelFormat); 685 685 progMap["iconpath"] = ""; 686 progMap["coverartpath"] = ""; 686 687 687 688 QString tmpSize; 688 689 … … 769 770 recstartts.time().toString(timeFormat); 770 771 771 772 QString iconpath = ChannelUtil::GetIcon(chanid.toUInt()); 772 if (!iconpath.isEmpty())773 progMap["iconpath"] = iconpath;774 773 774 if (!isVideo) 775 { 776 if (!iconpath.isEmpty()) 777 progMap["iconpath"] = iconpath; 778 } 779 else 780 { 781 782 if (pathname.startsWith("dvd:")) 783 { 784 progMap["coverartpath"] = ""; 785 } 786 else 787 { 788 QFileInfo fi(pathname); 789 QString fn = fi.fileName(); 790 fn.prepend("%"); 791 792 MSqlQuery query(MSqlQuery::InitCon()); 793 query.prepare("SELECT coverfile FROM videometadata WHERE filename LIKE :FILENAME ;"); 794 query.bindValue(":FILENAME", fn); 795 796 if (query.exec() && query.next()) 797 progMap["coverartpath"] = query.value(0).toString(); 798 } 799 } 800 775 801 progMap["recstatus"] = RecStatusText(); 776 802 777 803 if (repeat) -
libs/libmythtv/osd.cpp
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"] != "")) 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;