Use new features of PyOtherSide 1.1.0

This commit is contained in:
Thomas Perl 2014-02-06 23:49:45 +01:00
parent 2ef9bfe581
commit 238cac1eb8
2 changed files with 11 additions and 6 deletions

View file

@ -40,9 +40,13 @@ Python {
signal updatedPodcast(var podcast)
Component.onCompleted: {
setHandler('hello', function (version, copyright) {
console.log('gPodder version ' + version + ' starting up');
console.log('Copyright: ' + copyright);
setHandler('hello', function (version, copyright, date, url) {
console.log('gPodder ' + version + ' (' + date + ')');
console.log(url);
console.log(copyright);
console.log('PyOtherSide ' + py.pluginVersion());
console.log('Python ' + py.pythonVersion());
});
setHandler('downloading', py.downloading);
@ -57,8 +61,7 @@ Python {
setHandler('updated-podcast', py.updatedPodcast);
setHandler('refreshing', function(v) { py.refreshing = v; });
var path = Qt.resolvedUrl('../..').substr('file://'.length);
addImportPath(path);
addImportPath(Qt.resolvedUrl('../..'));
// Load the Python side of things
importModule('main', function() {