Skip to content

Commit

Permalink
Fixes #290
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Kabel committed Mar 10, 2013
1 parent 57e59b3 commit 161669e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 4 additions & 2 deletions data/MovieFileSearcher.cpp
Expand Up @@ -84,13 +84,15 @@ void MovieFileSearcher::reload(bool force)
if (QString::compare("index.bdmv", it.fileName(), Qt::CaseInsensitive) == 0) {
qDebug() << "Found BluRay structure";
QDir dir(it.fileInfo().dir());
dir.cdUp();
if (QString::compare(dir.dirName(), "BDMV", Qt::CaseInsensitive) == 0)
dir.cdUp();
bluRays << dir.path();
}
if (QString::compare("VIDEO_TS.IFO", it.fileName(), Qt::CaseInsensitive) == 0) {
qDebug() << "Found DVD structure";
QDir dir(it.fileInfo().dir());
dir.cdUp();
if (QString::compare(dir.dirName(), "VIDEO_TS", Qt::CaseInsensitive) == 0)
dir.cdUp();
dvds << dir.path();
}

Expand Down
10 changes: 8 additions & 2 deletions mediaCenterPlugins/XbmcXml.cpp
Expand Up @@ -1982,9 +1982,15 @@ QString XbmcXml::getPath(Movie *movie)
if (movie->files().isEmpty())
return QString();
QFileInfo fi(movie->files().first());
if (movie->discType() == DiscBluRay || movie->discType() == DiscDvd) {
if (movie->discType() == DiscBluRay) {
QDir dir = fi.dir();
dir.cdUp();
if (QString::compare(dir.dirName(), "BDMV", Qt::CaseInsensitive) == 0)
dir.cdUp();
return dir.absolutePath();
} else if (movie->discType() == DiscDvd) {
QDir dir = fi.dir();
if (QString::compare(dir.dirName(), "VIDEO_TS", Qt::CaseInsensitive) == 0)
dir.cdUp();
return dir.absolutePath();
}
return fi.absolutePath();
Expand Down

0 comments on commit 161669e

Please sign in to comment.