Skip to content

Commit

Permalink
Make host checks in Video Library scanner case insensitive.
Browse files Browse the repository at this point in the history
  • Loading branch information
wagnerrp committed Feb 24, 2012
1 parent 5d7c01d commit 23d5167
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions mythtv/libs/libmythmetadata/videoscan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,17 @@ VideoScannerThread::~VideoScannerThread()
delete m_dbmetadata;
}

void VideoScannerThread::SetHosts(const QStringList &hosts)
{
m_liveSGHosts.clear();
QStringList::const_iterator iter = hosts.begin();
for (; iter != hosts.end(); ++iter)
m_liveSGHosts << iter->toLower();
}

void VideoScannerThread::SetDirs(QStringList dirs)
{
QString master = gCoreContext->GetMasterHostName();
QString master = gCoreContext->GetMasterHostName().toLower();
QStringList searchhosts, mdirs;
m_offlineSGHosts.clear();

Expand All @@ -100,7 +108,7 @@ void VideoScannerThread::SetDirs(QStringList dirs)
if (iter->startsWith("myth://"))
{
QUrl sgurl = *iter;
QString host = sgurl.host();
QString host = sgurl.host().toLower();
QString path = sgurl.path();

if (!m_liveSGHosts.contains(host))
Expand Down Expand Up @@ -168,7 +176,7 @@ void VideoScannerThread::run()
if (iter->startsWith("myth://"))
{
QUrl sgurl = *iter;
QString host = sgurl.host();
QString host = sgurl.host().toLower();
QString path = sgurl.path();

m_liveSGHosts.removeAll(host);
Expand Down Expand Up @@ -244,7 +252,7 @@ void VideoScannerThread::verifyFiles(FileCheckList &files,
p != m_dbmetadata->getList().end(); ++p)
{
QString lname = (*p)->GetFilename();
QString lhost = (*p)->GetHost();
QString lhost = (*p)->GetHost().toLower();
if (lname != QString::null)
{
iter = files.find(lname);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythmetadata/videoscan.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class META_PUBLIC VideoScannerThread : public MThread

void run();
void SetDirs(QStringList dirs);
void SetHosts(const QStringList &hosts) { m_liveSGHosts = hosts; };
void SetHosts(const QStringList &hosts);
void SetProgressDialog(MythUIProgressDialog *dialog) { m_dialog = dialog; };
QStringList GetOfflineSGHosts(void) { return m_offlineSGHosts; };
bool getDataChanged() { return m_DBDataChanged; };
Expand Down

0 comments on commit 23d5167

Please sign in to comment.