diff --git a/Changelog b/Changelog index 57cde245c..aa3846072 100644 --- a/Changelog +++ b/Changelog @@ -38,6 +38,7 @@ - BUGFIX: Search plugin update is not making the GUI freeze anymore (moved to a thread) - BUGFIX: DHT settings were not saved correctly - BUGFIX: Workaround to build on Fedora system (pkg-config problem) + - BUGFIX: search plugin update - do not display only last version changelog - COSMETIC: Redesigned torrent properties a little - COSMETIC: Redesigned options a little - COSMETIC: Display more logs messages concerning features diff --git a/TODO b/TODO index c5be9d5fd..41623995f 100644 --- a/TODO +++ b/TODO @@ -45,7 +45,6 @@ - Windows port (Chris - Peerkoel) - Translations update - .ico support? - - improve mininova search engine support - Download/Finished lists cleanup - Move transfer lists refreshers to threads - Wait for some bug fixes in libtorrent : diff --git a/src/searchEngine.cpp b/src/searchEngine.cpp index e35c0ff07..2d2f4942e 100644 --- a/src/searchEngine.cpp +++ b/src/searchEngine.cpp @@ -386,7 +386,7 @@ float SearchEngine::getNovaVersion(QString novaPath) const{ } // Returns changelog of nova.py search engine -QByteArray SearchEngine::getNovaChangelog(QString novaPath) const{ +QByteArray SearchEngine::getNovaChangelog(QString novaPath, float my_version) const{ QFile dest_nova(novaPath); if(!dest_nova.exists()){ return QByteArray("None"); @@ -402,10 +402,15 @@ QByteArray SearchEngine::getNovaChangelog(QString novaPath) const{ if(line.startsWith("# Changelog:")){ in_changelog = true; }else{ - if(in_changelog && line.isEmpty()){ - // end of changelog - return changelog; + if(line.isEmpty()){ + in_changelog = false; } + if(line.startsWith("# End Changelog")) break; + QString end_version = "# Version: "; + char tmp[5]; + snprintf(tmp, 5, "%.2f", my_version); + end_version+=QString(tmp); + if(line.startsWith((const char*)end_version.toUtf8())) break; if(in_changelog){ line.remove(0,1); changelog.append(line); @@ -437,10 +442,11 @@ void SearchEngine::updateNova() const{ void SearchEngine::novaUpdateDownloaded(QString url, QString filePath){ float version_on_server = getNovaVersion(filePath); qDebug("Version on qbittorrent.org: %.2f", version_on_server); - if(version_on_server > getNovaVersion(misc::qBittorrentPath()+"nova.py")){ + float my_version = getNovaVersion(misc::qBittorrentPath()+"nova.py"); + if(version_on_server > my_version){ if(QMessageBox::question(this, tr("Search plugin update -- qBittorrent"), - tr("Search plugin can be updated, do you want to update it?\n\nChangelog:\n")+getNovaChangelog(filePath), + tr("Search plugin can be updated, do you want to update it?\n\nChangelog:\n")+getNovaChangelog(filePath, my_version), tr("&Yes"), tr("&No"), QString(), 0, 1)){ return; diff --git a/src/searchEngine.h b/src/searchEngine.h index fcff9ddc8..447b3a544 100644 --- a/src/searchEngine.h +++ b/src/searchEngine.h @@ -57,7 +57,7 @@ class SearchEngine : public QWidget, public Ui::search_engine{ SearchEngine(bittorrent *BTSession, QSystemTrayIcon *myTrayIcon, bool systrayIntegration); ~SearchEngine(); float getNovaVersion(QString novaPath) const; - QByteArray getNovaChangelog(QString novaPath) const; + QByteArray getNovaChangelog(QString novaPath, float my_version) const; bool loadColWidthSearchList(); public slots: diff --git a/src/search_engine/nova.py b/src/search_engine/nova.py index ed1329a08..1da67f5e2 100755 --- a/src/search_engine/nova.py +++ b/src/search_engine/nova.py @@ -12,21 +12,21 @@ # Changelog: # - Use multiple threads to optimize speed -# Version: 2.0 +# Version: 2.00 # Changelog: # - Fixed ThePirateBay search engine # - Fixed Meganova search engine # - Fixed Mininova search engine -# Version: 1.9 +# Version: 1.90 # Changelog: # - Various fixes -# Version: 1.8 +# Version: 1.80 # Changelog: # - Fixed links from isohunt -# Version: 1.7 +# Version: 1.70 # Changelog: # - merged with qbittorrent branch (code cleanup, indentation mistakes) # - separate standalone and slave mode @@ -34,6 +34,8 @@ # - added meganova # - added multithreaded mode +# End Changelog + # Author: # Fabien Devaux # Contributors: