mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 06:36:55 +02:00
[0.9 api]Fix built-in custom url
This commit is contained in:
@@ -268,7 +268,8 @@ Tomahawk.Resolver = Tomahawk.extend(TomahawkResolver, {
|
|||||||
var merged = [];
|
var merged = [];
|
||||||
return merged.concat.apply(merged,collectionResults);
|
return merged.concat.apply(merged,collectionResults);
|
||||||
}).then(function(collectionResults) {
|
}).then(function(collectionResults) {
|
||||||
Promise.resolve(that.resolve({artist: artist, album: album, track:title})).then(function(results){
|
if(typeof results === 'undefined')
|
||||||
|
results = [];
|
||||||
Tomahawk.addTrackResults({
|
Tomahawk.addTrackResults({
|
||||||
'qid': qid,
|
'qid': qid,
|
||||||
'results': that._convertUrls(results.concat(collectionResults))
|
'results': that._convertUrls(results.concat(collectionResults))
|
||||||
@@ -279,7 +280,7 @@ Tomahawk.Resolver = Tomahawk.extend(TomahawkResolver, {
|
|||||||
|
|
||||||
_adapter_init: function ()
|
_adapter_init: function ()
|
||||||
{
|
{
|
||||||
this._urlProtocol = this.settings.name.replace(/\s+/g, '').toLowerCase();
|
this._urlProtocol = this.settings.name.replace(/[^a-zA-Z]/g, '').toLowerCase();
|
||||||
Tomahawk.addCustomUrlHandler( this._urlProtocol, 'getStreamUrl', true );
|
Tomahawk.addCustomUrlHandler( this._urlProtocol, 'getStreamUrl', true );
|
||||||
Tomahawk.log('Registered custom url handler for protocol "' + this._urlProtocol + '"');
|
Tomahawk.log('Registered custom url handler for protocol "' + this._urlProtocol + '"');
|
||||||
this.init();
|
this.init();
|
||||||
|
Reference in New Issue
Block a user