<commit_before>/* global services:true */

'use strict';

services.service('KodiPlayer', ['KodiWS', '$q',
  function(KodiWS, $q) {

    var hash = {
      active: function() {
        var deferred = $q.defer();
        KodiWS.send('Player.GetActivePlayers', {}).then(function(data) {
          var result = null;
          for (var i = 0; i < data.length ; i++)
            {
              if (data[i].type != 'picture')
                {
                  result = data[i];
                }
            }
          deferred.resolve(result);
        });
        return deferred.promise;
      },
      get: function(player) {
        var deferred = $q.defer();
        KodiWS.send('Player.getItem', { playerid: player.playerid, properties: ['title', 'artist', 'duration', 'streamdetails'] }).then(function(data) {
          var item = {
            label: data.item.label,
            time: null,
            totalTime: null,
            percentage: null
          };
          if (data.item.type == 'song')
            {
              item.label = data.item.title + ' - ' + data.item.artist[0];<commit_msg>Remove useless properties from request<commit_after>/* global services:true */

'use strict';

services.service('KodiPlayer', ['KodiWS', '$q',
  function(KodiWS, $q) {

    var hash = {
      active: function() {
        var deferred = $q.defer();
        KodiWS.send('Player.GetActivePlayers', {}).then(function(data) {
          var result = null;
          for (var i = 0; i < data.length ; i++)
            {
              if (data[i].type != 'picture')
                {
                  result = data[i];
                }
            }
          deferred.resolve(result);
        });
        return deferred.promise;
      },
      get: function(player) {
        var deferred = $q.defer();
        KodiWS.send('Player.getItem', { playerid: player.playerid, properties: ['title', 'artist'] }).then(function(data) {
          var item = {
            label: data.item.label,
            time: null,
            totalTime: null,
            percentage: null
          };
          if (data.item.type == 'song')
            {
              item.label = data.item.title + ' - ' + data.item.artist[0];
{'fraction_non_alphanumeric': 0.1518987341772152, 'fraction_numerical': 0.0018083182640144665, 'mean_word_length': 1.6065959952885749, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3602684', 'n_tokens_mistral': 654, 'n_tokens_neox': 637, 'n_words': 135}