Ticket #7888: mythvideo_png_coverfile.patch

File mythvideo_png_coverfile.patch, 741 bytes (added by mythtv@…, 11 years ago)
  • mythvideo/mythvideo/metadata.cpp

    old new  
    518518    m_filename = query.value(7).toString();
    519519    m_showlevel = ParentalLevel(query.value(8).toInt()).GetLevel();
    520520    m_coverfile = query.value(9).toString();
     521    // If no coverfile is given, check for a PNG alongside the file.
     522    if (IsDefaultCoverFile(m_coverfile))
     523    {
     524        QFileInfo fi (m_filename + ".png");
     525        if (fi.exists())
     526            m_coverfile = m_filename + ".png";
     527    }
    521528    m_inetref = query.value(10).toString();
    522529    m_childID = query.value(11).toUInt();
    523530    m_browse = query.value(12).toBool();