mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 22:26:32 +02:00
Remove more comp hacks
This commit is contained in:
@@ -1795,61 +1795,3 @@ Tomahawk.Collection = {
|
||||
return params;
|
||||
}
|
||||
};
|
||||
|
||||
// Legacy compability for 0.8 and before
|
||||
Tomahawk.reportCapabilities = function (capabilities) {
|
||||
if (capabilities & TomahawkResolverCapability.Browsable) {
|
||||
Tomahawk.PluginManager.registerPlugin("collection", Tomahawk.resolver.instance);
|
||||
}
|
||||
|
||||
Tomahawk.nativeReportCapabilities(capabilities);
|
||||
};
|
||||
|
||||
Tomahawk.addArtistResults = Tomahawk.addAlbumResults = Tomahawk.addAlbumTrackResults
|
||||
= function (result) {
|
||||
Tomahawk.PluginManager.resolve[result.qid](result);
|
||||
delete Tomahawk.PluginManager.resolve[result.qid];
|
||||
};
|
||||
|
||||
Tomahawk.addTrackResults = function (result) {
|
||||
Tomahawk.PluginManager.resolve[result.qid](result.results);
|
||||
delete Tomahawk.PluginManager.resolve[result.qid];
|
||||
};
|
||||
|
||||
Tomahawk.addUrlResult = function (url, result) {
|
||||
/* Merge the whole mess into one consistent result which is independent of type
|
||||
var cleanResult = {
|
||||
type: result.type,
|
||||
guid: result.guid,
|
||||
info: result.info,
|
||||
creator: result.creator,
|
||||
linkUrl: result.url
|
||||
};
|
||||
if (cleanResult.type == "track") {
|
||||
cleanResult.track = result.title;
|
||||
cleanResult.artist = result.artist;
|
||||
} else if (cleanResult.type == "artist") {
|
||||
cleanResult.artist = result.name;
|
||||
} else if (cleanResult.type == "album") {
|
||||
cleanResult.album = result.name;
|
||||
cleanResult.artist = result.artist;
|
||||
} else if (cleanResult.type == "playlist") {
|
||||
cleanResult.title = result.title;
|
||||
} else if (cleanResult.type == "xspf-url") {
|
||||
cleanResult.url = result.url;
|
||||
}
|
||||
if (result.tracks) {
|
||||
cleanResult.tracks = [];
|
||||
var i;
|
||||
for (i=0;i<result.tracks.length;i++) {
|
||||
var cleanTrack = {
|
||||
track: result.tracks[i].title,
|
||||
artist: result.tracks[i].artist
|
||||
};
|
||||
cleanResult.push(cleanTrack)
|
||||
}
|
||||
Tomahawk.PluginManager.resolve[url](cleanResult);
|
||||
*/
|
||||
Tomahawk.PluginManager.resolve[url](result);
|
||||
delete Tomahawk.PluginManager.resolve[url];
|
||||
};
|
||||
|
Reference in New Issue
Block a user