tr("TomAmp is a simple playlist-based music player.\n\n"
"(c) 2010 Tamas Marki <tmarki@gmail.com>\n\n"
"Please send comments and bug reports to the above e-mail address.\n\n"
- "Icons by http://itweek.deviantart.com/"));
+ "Icons by http://itweek.deviantart.com/\n\n"
+ "Thanks to Attila Csipa for the Diablo build"));
}
void MainWindow::stateChanged(Phonon::State newState, Phonon::State /* oldState */)
#include <QMainWindow>
#include <QSettings>
+#if QT_VERSION < 0x040600
+#include <audiooutput.h>
+#include <seekslider.h>
+#include <mediaobject.h>
+#include <volumeslider.h>
+#include <backendcapabilities.h>
+#else
#include <phonon/audiooutput.h>
#include <phonon/seekslider.h>
#include <phonon/mediaobject.h>
#include <phonon/volumeslider.h>
#include <phonon/backendcapabilities.h>
+#endif
#include <QList>
#include "playlistmanager.h"
PlaylistManager::PlaylistManager(QWidget* parent)
: parentWidget (parent), lastMetaRead (-1)
{
- allowedExtensions << "mp3" << "ogg" << "wav" << "wmv" << "wma";
+ allowedExtensions << "mp3" << "ogg" << "wav" << "wmv" << "wma" << "flac";
// qDebug () << Phonon::BackendCapabilities::availableMimeTypes();
metaInformationResolver = new Phonon::MediaObject(parent);
connect(metaInformationResolver, SIGNAL(stateChanged(Phonon::State,Phonon::State)),
bool PlaylistManager::fileSupported (const QString& fname) const
{
- QString ext = fname.right(3).toLower();
+ if (fname.lastIndexOf('.') < 0)
+ return false;
+ QString ext = fname.right(fname.size() - fname.lastIndexOf('.') - 1).toLower();
foreach (QString e, allowedExtensions)
{
if (ext == e)