1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-30 19:00:12 +02:00

Add album and tracks view to script collections

This commit is contained in:
Dominik Schmidt
2015-01-11 21:25:36 +01:00
parent 8ac87615c9
commit 1cbae9b957
9 changed files with 154 additions and 34 deletions

View File

@@ -624,6 +624,14 @@ Tomahawk.PluginManager = {
resolve: [],
invokeSync: function (requestId, objectId, methodName, params) {
if (!Tomahawk.resolver.instance.apiVersion || Tomahawk.resolver.instance.apiVersion < 0.9) {
if (methodName === 'artistAlbums') {
methodName = 'albums';
} else if ( methodName === 'albumTracks' ) {
methodName = 'tracks';
}
}
var pluginManager = this;
if (!this.objects[objectId]) {
Tomahawk.log("Object not found! objectId: " + objectId + " methodName: " + methodName);
@@ -694,6 +702,15 @@ Tomahawk.ConfigTestResultType = {
};
Tomahawk.Collection = {
BrowseCapability: {
Artists: 1,
Albums: 2,
Tracks: 4
}
};
// Legacy compability for 0.8 and before
Tomahawk.reportCapabilities = function (capabilities) {
if (capabilities & TomahawkResolverCapability.Browsable) {