Mercurial > hg > sonic-visualiser
changeset 375:62e9f62752e1 macness_autotpl
only do genre stuff etc if itunes returns a file
author | Dan Stowell <dan.stowell@eecs.qmul.ac.uk> |
---|---|
date | Fri, 15 Oct 2010 15:12:24 +0100 |
parents | 11f804c7582a |
children | |
files | main/MainWindow.cpp |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/main/MainWindow.cpp Fri Oct 15 13:30:41 2010 +0100 +++ b/main/MainWindow.cpp Fri Oct 15 15:12:24 2010 +0100 @@ -2218,16 +2218,16 @@ { QStringList nowPlaying = iTunesNowPlaying(); QString path = nowPlaying.at(0); - QString genre = (nowPlaying.size() > 1) ? nowPlaying.at(1) : ""; - std::cerr << "MainWindow::importITunesAudio(): genre is " << genre.toStdString() << std::endl; - QString tplName = templateNameFromGenre(genre); if (path != "") { - if (openAudio(path, ReplaceMainModel, tplName) == FileOpenFailed) { - emit hideSplash(); - QMessageBox::critical(this, tr("Failed to open file"), - tr("<b>File open failed</b><p>Audio file \"%1\" could not be opened").arg(path)); - } + QString genre = (nowPlaying.size() > 1) ? nowPlaying.at(1) : ""; + std::cerr << "MainWindow::importITunesAudio(): genre is " << genre.toStdString() << std::endl; + QString tplName = templateNameFromGenre(genre); + if (openAudio(path, ReplaceMainModel, tplName) == FileOpenFailed) { + emit hideSplash(); + QMessageBox::critical(this, tr("Failed to open file"), + tr("<b>File open failed</b><p>Audio file \"%1\" could not be opened").arg(path)); + } } } #endif