Ticket #3662: mythtv-ignoredevices.patch

File mythtv-ignoredevices.patch, 881 bytes (added by Daniel Burr, 17 years ago)
  • libs/libmyth/mediamonitor-unix.cpp

     
    510510 */
    511511bool MediaMonitorUnix::FindPartitions(const QString &dev, bool checkPartitions)
    512512{
     513    const QString ignore_str = gContext->GetSetting("IgnoreDevices");
     514    const QStringList ignore_list = QStringList::split(',', ignore_str);
     515
     516    if(ignore_list.contains(dev))
     517        return false;
     518
    513519    MythMediaDevice* pDevice = NULL;
    514520
    515521    if (checkPartitions)
     
    612618                removable.close();
    613619
    614620                if (c == '1')
    615                     FindPartitions((*it).section(' ', 1, 1), true);
     621                    FindPartitions(dev, true);
    616622            }
    617623        }
    618624        else if ((*it).startsWith("remove"))