Forked from jherskowitz/Example Tomahawk Resolver
Last active
December 24, 2015 07:29
-
-
Save sydlawrence/6763916 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* (c) 2011 Dominik Schmidt <[email protected]> | |
*/ | |
var DummyResolver = Tomahawk.extend(TomahawkResolver, | |
{ | |
settings: | |
{ | |
name: 'Dummy Resolver', | |
weight: 75, | |
timeout: 5 | |
}, | |
resolve: function( qid, artist, album, title ) | |
{ | |
var searchString = artist+" "+title"; | |
return Tomahawk.addTrackResults( this.internalSearch( qid, searchString) ); | |
}, | |
search: function( qid, searchString ) | |
{ | |
Tomahawk.addTrackResults( this.internalSearch( qid, searchString ) ); | |
}, | |
internalSearch: function( qid, searchString ) | |
{ | |
return { | |
qid: qid, | |
results: [ | |
{ | |
artist: "Mokele", | |
album: "You Yourself are Me Myself and I am in Love", | |
track: "Hiding In Your Insides (js)", | |
source: "Mokele.co.uk", | |
url: "http://play.mokele.co.uk/music/Hiding%20In%20Your%20Insides.mp3", | |
bitrate: 160, | |
duration: 248, | |
size: 4971780, | |
score: 1.0, | |
extension: "mp3", | |
mimetype: "audio/mpeg" | |
} | |
] | |
}; | |
} | |
}); | |
Tomahawk.resolver.instance = DummyResolver; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment