Ticket #2100: dvd_open_failed.diff

File dvd_open_failed.diff, 1.0 KB (added by skamithi, 19 years ago)
  • programs/mythfrontend/main.cpp

     
    561561                        const char* director, int lenMins, const char* year)
    562562{
    563563    int res = -1;
    564    
     564 
     565    QString filename = QString(mrl);
     566    QFile checkFile(filename);
     567    if (!checkFile.exists() && !filename.contains("dvd"))
     568    {
     569        QString filename = QString(mrl);
     570        QString errorText = QObject::tr("Failed to open \n '%1' in %2 \n"
     571                                        "Check if the video exists")
     572                                        .arg(filename.section("/", -1))
     573                                        .arg(filename.section("/", 0, -2));
     574        MythPopupBox::showOkPopup(gContext->GetMainWindow(),
     575                                    "Open Failed",
     576                                    errorText);
     577        return res;
     578    }
     579   
    565580    TV *tv = new TV();
    566581
    567582    if (!tv->Init())