]> git.sur5r.net Git - minitube/commitdiff
do not emit name changed multiple times
authorFlavio <flavio@odisseo.local>
Tue, 8 Jan 2013 15:19:49 +0000 (16:19 +0100)
committerFlavio <flavio@odisseo.local>
Tue, 8 Jan 2013 15:19:49 +0000 (16:19 +0100)
src/ytsearch.cpp

index a5d03df721e5d32c9052b2e930f3f77b2b2a0138..c9e3c4075fd13780a561511e603721a3f1a82788 100644 (file)
@@ -16,7 +16,7 @@ YTSearch::YTSearch(SearchParams *searchParams, QObject *parent) :
 }
 
 void YTSearch::loadVideos(int max, int skip) {
-    this->aborted = false;
+    aborted = false;
 
     QUrl url("https://gdata.youtube.com/feeds/api/videos/");
     url.addQueryItem("v", "2");
@@ -102,7 +102,7 @@ void YTSearch::parseResults(QByteArray data) {
     QList<Video*> videos = reader.getVideos();
     suggestions = reader.getSuggestions();
 
-    if (!searchParams->author().isEmpty()) {
+    if (name.isEmpty() && !searchParams->author().isEmpty()) {
         if (videos.isEmpty()) name = searchParams->author();
         else name = videos.first()->author();
         emit nameChanged(name);