mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-22 08:52:12 +02:00
Add default implementations of search and resolve to the QtScriptResolver API
This commit is contained in:
parent
6f0321f585
commit
c276e58c55
@ -48,20 +48,31 @@ var TomahawkResolver = {
|
||||
},
|
||||
getUserConfig: function()
|
||||
{
|
||||
var configJson = window.localStorage[this.scriptPath()];
|
||||
if(configJson === undefined)
|
||||
var configJson = window.localStorage[ this.scriptPath() ];
|
||||
if( configJson === undefined )
|
||||
configJson = "{}";
|
||||
|
||||
var config = JSON.parse(configJson);
|
||||
var config = JSON.parse( configJson );
|
||||
|
||||
return config;
|
||||
},
|
||||
saveUserConfig: function()
|
||||
{
|
||||
var config = Tomahawk.resolverData().config;
|
||||
var configJson = JSON.stringify(config);
|
||||
var configJson = JSON.stringify( config );
|
||||
|
||||
window.localStorage[this.scriptPath()] = configJson;
|
||||
window.localStorage[ this.scriptPath() ] = configJson;
|
||||
},
|
||||
resolve: function( qid, artist, album, title )
|
||||
{
|
||||
return {
|
||||
qid: qid,
|
||||
results: []
|
||||
};
|
||||
},
|
||||
search: function( qid, searchString )
|
||||
{
|
||||
return this.resolve( qid, "", "", searchString );
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user