From: Flavio Date: Tue, 8 Jan 2013 15:19:49 +0000 (+0100) Subject: do not emit name changed multiple times X-Git-Tag: 2.0~40 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=990c27af49da1647e66fbc7d4ae8f564b1b3e265;p=minitube do not emit name changed multiple times --- diff --git a/src/ytsearch.cpp b/src/ytsearch.cpp index a5d03df..c9e3c40 100644 --- a/src/ytsearch.cpp +++ b/src/ytsearch.cpp @@ -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 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);