diff --git a/app/js/services/rpc.js b/app/js/services/rpc.js index 960d4a4..79557ec 100644 --- a/app/js/services/rpc.js +++ b/app/js/services/rpc.js @@ -136,7 +136,19 @@ angular.module('EiskaltRPC', []).factory('EiskaltRPC', function($http, $q) { return jsonrpc('queue.listtargets', {separator: '┴'}, true); }, ListQueue: function() { - return jsonrpc('queue.list'); + const priorityOrder = ['Paused', 'Lowest', 'Low', 'Normal', 'High', 'Highest']; + var deferred = $q.defer(); + var promise = deferred.promise; + jsonrpc('queue.list').success(function(queue) { + var result = []; + angular.forEach(queue, function(value) { + value.PriorityOrder = priorityOrder.indexOf(value.Priority); + this.push(value); + }, result); + deferred.resolve(result); + }); + promise.success = promise.then; + return promise; }, ClearSearchResults: function(huburl) { return jsonrpc('search.clear', {huburl: huburl}); diff --git a/app/partials/queue.html b/app/partials/queue.html index 64b9d06..92b2fa9 100644 --- a/app/partials/queue.html +++ b/app/partials/queue.html @@ -9,7 +9,7 @@
-