mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 13:47:26 +02:00
Make tomahawk.js more portable
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// if run in phantomjs add fake Tomahawk environment
|
// if run in phantomjs add fake Tomahawk environment
|
||||||
if (window.Tomahawk === undefined) {
|
if ((typeof Tomahawk === "undefined") || (Tomahawk === null)) {
|
||||||
var Tomahawk = {
|
var Tomahawk = {
|
||||||
fakeEnv: function () {
|
fakeEnv: function () {
|
||||||
return true;
|
return true;
|
||||||
@@ -302,8 +302,8 @@ Tomahawk.asyncRequest = function (url, callback, extraHeaders, options) {
|
|||||||
xmlHttpRequest.send(null);
|
xmlHttpRequest.send(null);
|
||||||
};
|
};
|
||||||
|
|
||||||
Tomahawk.sha256 = CryptoJS.SHA256;
|
Tomahawk.sha256 = Tomahawk.sha256 || CryptoJS.SHA256;
|
||||||
|
|
||||||
// some aliases
|
// some aliases
|
||||||
Tomahawk.setTimeout = window.setTimeout;
|
Tomahawk.setTimeout = Tomahawk.setTimeout || window.setTimeout;
|
||||||
Tomahawk.setInterval = window.setInterval;
|
Tomahawk.setInterval = Tomahawk.setInterval || window.setInterval;
|
||||||
|
@@ -940,7 +940,7 @@ SpotifyAccount::resolverMessage( const QString &msgType, const QVariantMap &msg
|
|||||||
{
|
{
|
||||||
const QString plid = msg.value( "playlistid" ).toString();
|
const QString plid = msg.value( "playlistid" ).toString();
|
||||||
// We should already be syncing this playlist if we get updates for it
|
// We should already be syncing this playlist if we get updates for it
|
||||||
Q_ASSERT( m_updaters.contains( plid ) );
|
// Q_ASSERT( m_updaters.contains( plid ) );
|
||||||
|
|
||||||
if ( !m_updaters.contains( plid ) )
|
if ( !m_updaters.contains( plid ) )
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user