Ticket #3493: coverart.2.patch
File coverart.2.patch, 3.8 KB (added by , 17 years ago) |
---|
-
libs/libmythtv/osd.cpp
diff -rup ../mythtv-videoosd/libs/libmythtv/osd.cpp ./libs/libmythtv/osd.cpp
old new void OSD::SetText(const QString &name, 1631 1631 cs->LoadImage(" ", wmult, hmult, 30, 30); 1632 1632 } 1633 1633 1634 OSDTypeImage *cs1 = (OSDTypeImage *)container->GetType("coverart"); 1635 if (cs1) 1636 { 1637 if ((infoMap.contains("coverartpath")) && (infoMap["coverartpath"] != "")) 1638 cs1->LoadImage(infoMap["coverartpath"], wmult, hmult, 30, 30); 1639 } 1640 1634 1641 m_setsvisible = true; 1635 1642 changed = true; 1636 1643 } … … void OSD::SetInfoText(QMap<QString, QStr 1654 1661 cs->LoadImage(" ", wmult, hmult, 30, 30); 1655 1662 } 1656 1663 1664 OSDTypeImage *cs1 = (OSDTypeImage *)container->GetType("coverart"); 1665 if (cs1) 1666 { 1667 if ((infoMap.contains("coverartpath")) && (infoMap["coverartpath"] != "")) 1668 cs1->LoadImage(infoMap["coverartpath"], wmult, hmult, 30, 30); 1669 } 1670 1657 1671 container->DisplayFor(length * 1000000); 1658 1672 m_setsvisible = true; 1659 1673 changed = true; … … void OSD::SetInfoText(const QString &tex 1703 1717 type = (OSDTypeText *)container->GetType("callsign"); 1704 1718 if (type) 1705 1719 type->SetText(callsign.left(5)); 1720 1706 1721 OSDTypeImage *cs = (OSDTypeImage *)container->GetType("channelicon"); 1707 1722 if (cs) 1708 1723 cs->LoadImage(iconpath, wmult, hmult, 30, 30); -
libs/libmythtv/programinfo.cpp
old new void ProgramInfo::ToMap(QMap<QString, QS 449 449 450 450 QString length; 451 451 int hours, minutes, seconds; 452 bool isDVDImage = false; 452 453 453 454 progMap["title"] = title; 454 455 progMap["subtitle"] = subtitle; … … void ProgramInfo::ToMap(QMap<QString, QS 501 502 progMap["channel"] = ChannelText(channelFormat); 502 503 progMap["longchannel"] = ChannelText(longChannelFormat); 503 504 progMap["iconpath"] = ""; 505 progMap["coverartpath"] = ""; 504 506 505 507 QString tmpSize; 506 508 … … void ProgramInfo::ToMap(QMap<QString, QS 573 575 574 576 MSqlQuery query(MSqlQuery::InitCon()); 575 577 576 query.prepare("SELECT icon FROM channel WHERE chanid = :CHANID ;"); 577 query.bindValue(":CHANID", chanid); 578 if (!isVideo) 579 { 580 query.prepare("SELECT icon FROM channel WHERE chanid = :CHANID ;"); 581 query.bindValue(":CHANID", chanid); 578 582 579 if (query.exec() && query.isActive() && query.size() > 0)583 if (query.exec() && query.isActive() && query.size() > 0) 580 584 if (query.next()) 581 585 progMap["iconpath"] = query.value(0).toString(); 586 } 587 else 588 { 589 if (pathname.findRev(".iso", -1, false) == (int)pathname.length() - 4 || 590 pathname.findRev(".img", -1, false) == (int)pathname.length() - 4) 591 { 592 isDVDImage = true; 593 } 594 595 if (pathname.startsWith("dvd:") && !isDVDImage) 596 { 597 progMap["coverartpath"] = ""; 598 } 599 else 600 { 601 QString fn; 602 603 if (isDVDImage) 604 fn = pathname.right(pathname.length() - 4); 605 else 606 fn = pathname; 607 608 query.prepare("SELECT coverfile FROM videometadata WHERE filename = :FILENAME ;"); 609 query.bindValue(":FILENAME", fn); 610 611 if (query.exec() && query.isActive() && query.size() > 0) 612 613 if (query.next()) 614 progMap["coverartpath"] = query.value(0).toString(); 615 } 582 616 617 } 618 583 619 progMap["RECSTATUS"] = RecStatusText(); 584 620 585 621 if (repeat)