Ticket #1892: myth-dvddetectfix.diff

File myth-dvddetectfix.diff, 1.0 KB (added by devel@…, 13 years ago)

Patch for lowercase video_ts

  • libs/libmyth/mythcdrom.cpp

     
    6161
    6262void MythCDROM::onDeviceMounted()
    6363{
    64     QString DetectPath, DetectPath2;
     64    QString DetectPath, DetectPath2, detect;
    6565
    6666    // We should do some fine-grained checking using
    6767    // extensions or true filetype verification to determine
     
    7474    // Default is mounted media
    7575    m_Status = MEDIASTAT_MOUNTED;
    7676
    77     DetectPath.sprintf("%s%s", (const char*)m_MountPath, PATHTO_DVD_DETECT);
     77    detect=QString(PATHTO_DVD_DETECT);   
     78    DetectPath = m_MountPath+detect;
     79    DetectPath2 = m_MountPath+detect.lower();
    7880    VERBOSE(VB_IMPORTANT, QString("Looking for: '%1'").arg(DetectPath));
    7981
    8082    struct stat sbuf;
    81     if (stat(DetectPath, &sbuf) == 0)
     83    if (stat(DetectPath, &sbuf) == 0 || stat(DetectPath2, &sbuf) == 0)
    8284    {
    8385        VERBOSE(VB_GENERAL, "Probable DVD detected.");
    8486        m_MediaType = MEDIATYPE_DVD;