Skip to content

Commit

Permalink
Plugin installer: add ?qgis=[QGIS_VERSION] GET parameter to each repo…
Browse files Browse the repository at this point in the history
…sitory URL to allow filtering also on reposiotory side
  • Loading branch information
borysiasty committed Apr 27, 2013
1 parent dfd8444 commit c47fbbe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions python/plugins/plugin_installer/installer_data.py
Expand Up @@ -356,6 +356,8 @@ def requestFetching(self,key):
self.mRepositories[key]["state"] = 1
url = QUrl(self.mRepositories[key]["url"])
path = QString(url.toPercentEncoding(url.path(), "!$&'()*+,;=:@/"))
v=str(QGis.QGIS_VERSION_INT)
path += "?qgis=%s" % ('.'.join([str(int(s)) for s in [v[0], v[1:3], v[3:5]]]))
port = url.port()
if port < 0:
port = 80
Expand Down
6 changes: 3 additions & 3 deletions python/plugins/plugin_installer/metadata.txt
Expand Up @@ -2,11 +2,11 @@
name=Plugin Installer
description=Downloads and installs QGIS python plugins
category=Plugins
version=1.2.1
qgisMinimumVersion=1.0
version=1.3
qgisMinimumVersion=1.9

author=Borys Jurgiel
email=borysiasty@aster.pl
email=qgis@borysjurgiel.pl

icon=plugin_installer.png

Expand Down

2 comments on commit c47fbbe

@NathanW2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea to filter by versions when fetching.

@borysiasty
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's even necessary, because the new official repository doesn't return the complete set of all versions of all plugins. It only returns the recent stable and the recent experimental version of each plugin, so needs to filter out all incompatible versions first.

Please sign in to comment.