mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 04:24:23 +00:00
search plugin update - do not display only last version changelog
This commit is contained in:
parent
e9126aedc3
commit
a370503eb3
@ -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
|
||||
|
1
TODO
1
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 :
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
@ -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 <fab AT gnux DOT info>
|
||||
# Contributors:
|
||||
|
Loading…
x
Reference in New Issue
Block a user