diff runner/main.cpp @ 117:5be4995f4029

Tests (and minor resulting fixes) for remote file download
author Chris Cannam
date Wed, 08 Oct 2014 13:14:39 +0100
parents 1c0799754670
children dcecd6997214
line wrap: on
line diff
--- a/runner/main.cpp	Fri Oct 03 15:42:55 2014 +0100
+++ b/runner/main.cpp	Wed Oct 08 13:14:39 2014 +0100
@@ -354,14 +354,17 @@
 {
     QStringList expanded;
     foreach (QString path, sources) {
-        cerr << "expandPlaylists: looking at " << path << endl;
         if (QFileInfo(path).suffix().toLower() == "m3u") {
             ProgressPrinter retrievalProgress("Opening playlist file...");
             FileSource source(path, &retrievalProgress);
             if (!source.isAvailable()) {
-                cerr << "ERROR: File or URL \"" << path.toStdString()
-                     << "\" could not be located" << endl;
-                throw FileNotFound(path);
+                // Don't fail or throw an exception here, just keep
+                // the file in the list -- it will be tested again
+                // when adding it as a source and that's the proper
+                // time to fail. All we're concluding here is that it
+                // isn't a valid playlist
+                expanded.push_back(path);
+                continue;
             }
             source.waitForData();
             PlaylistFileReader reader(source);
@@ -728,7 +731,7 @@
     }
 
     sources = expandPlaylists(sources);
-
+        
     bool good = true;
     QSet<QString> badSources;