int DirectoryPlaylist::count() const
{
- return m_directory.count();
+ return entryList.count();
}
int DirectoryPlaylist::currentIndex() const
#ifdef KDE_PHONON
# include <phonon/videowidget.h>
#else
-# include <Phonon>
+# include <Phonon/phonon>
#endif
class VideoWidget : public Phonon::VideoWidget
void VideoWindow::open(bool closeOnStop)
{
QString dir;
- QFileInfo fileInfo(m_currentFile);
- if (fileInfo.exists())
+
+ if (m_currentFile == "")
{
- dir = fileInfo.absolutePath();
+ dir = QDesktopServices::storageLocation(QDesktopServices::MoviesLocation);
}
else
{
- dir = QDesktopServices::storageLocation(QDesktopServices::MoviesLocation);
+ QFileInfo fileInfo(m_currentFile);
+ QDir dirObj = fileInfo.absoluteDir();
+ while (!dirObj.exists())
+ dirObj = dirObj.absolutePath() + "/..";
+
+ dir = dirObj.absolutePath();
}
QString file = QFileDialog::getOpenFileName(
anidb->setPass(settings.value("pass").toString());
m_automark = settings.value("automark", 0).toInt();
settings.endGroup();
- QFileInfo file(m_currentFile);
- if (!file.exists())
- {
- m_currentFile = "";
- }
#endif
}