1
0
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:
Dominik Schmidt
2015-12-15 01:10:12 +01:00
parent 5395908cbe
commit 5a45bd0882
3 changed files with 5 additions and 5 deletions

View File

@@ -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));
} }
}; };

View File

@@ -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};
}); });

View File

@@ -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();
} }