mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Small JS fixes
This commit is contained in:
@@ -102,7 +102,7 @@ Tomahawk.InfoSystem.InfoPlugin = {
|
|||||||
notInCache: function (infoType, criteria) {
|
notInCache: function (infoType, criteria) {
|
||||||
var requestMethod = 'request' + this.infoTypeString(infoType);
|
var requestMethod = 'request' + this.infoTypeString(infoType);
|
||||||
|
|
||||||
return Promise.resolve(this[requestMethod](criteria));
|
return RSVP.Promise.resolve(this[requestMethod](criteria));
|
||||||
},
|
},
|
||||||
pushInfo: function (pushData) {
|
pushInfo: function (pushData) {
|
||||||
var pushMethod = 'push' + this.infoTypeString(pushData.type);
|
var pushMethod = 'push' + this.infoTypeString(pushData.type);
|
||||||
@@ -114,6 +114,6 @@ Tomahawk.InfoSystem.InfoPlugin = {
|
|||||||
getInfo: function (type, infoHash) {
|
getInfo: function (type, infoHash) {
|
||||||
var getInfoMethod = 'get' + this.infoTypeString(type);
|
var getInfoMethod = 'get' + this.infoTypeString(type);
|
||||||
|
|
||||||
return Promise.resolve(this[getInfoMethod](infoHash));
|
return RSVP.Promise.resolve(this[getInfoMethod](infoHash));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@@ -237,7 +237,7 @@ var TomahawkResolver = {
|
|||||||
collection: function () {
|
collection: function () {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
_testConfig: function (config) {
|
_adapter_testConfig: function (config) {
|
||||||
return RSVP.Promise.resolve(this.testConfig(config)).then(function () {
|
return RSVP.Promise.resolve(this.testConfig(config)).then(function () {
|
||||||
return {result: Tomahawk.ConfigTestResultType.Success};
|
return {result: Tomahawk.ConfigTestResultType.Success};
|
||||||
});
|
});
|
||||||
@@ -289,7 +289,7 @@ Tomahawk.Resolver = {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
_testConfig: function (config) {
|
_adapter_testConfig: function (config) {
|
||||||
return RSVP.Promise.resolve(this.testConfig(config)).then(function () {
|
return RSVP.Promise.resolve(this.testConfig(config)).then(function () {
|
||||||
return {result: Tomahawk.ConfigTestResultType.Success};
|
return {result: Tomahawk.ConfigTestResultType.Success};
|
||||||
});
|
});
|
||||||
|
@@ -217,7 +217,7 @@ DownloadJob::download()
|
|||||||
arguments[ "url" ] = m_format.url;
|
arguments[ "url" ] = m_format.url;
|
||||||
|
|
||||||
// HACK: *shrug* WIP.
|
// HACK: *shrug* WIP.
|
||||||
Tomahawk::ScriptJob* job = collection->scriptObject()->invoke( "getStreamUrlPromise", arguments );
|
Tomahawk::ScriptJob* job = collection->scriptObject()->invoke( "getStreamUrl", arguments );
|
||||||
connect( job, SIGNAL( done(QVariantMap) ), SLOT( onUrlRetrieved(QVariantMap) ) );
|
connect( job, SIGNAL( done(QVariantMap) ), SLOT( onUrlRetrieved(QVariantMap) ) );
|
||||||
job->start();
|
job->start();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user