<commit_before>var squeezenode = require('../');
var celeri = require('celeri');var options = require('./options');
var package = require('./package.json');

console.log(package.name.green + ' by ' + '<NAME>'.green);

var squeeze = new squeezenode(options.opts.url, options.opts.port);

function playerIdByName(name, callback) {
    var found = false;
    squeeze.getPlayers( function(reply) {
        for (var id in reply.result) {
            if(reply.result[id].name === name) {
                found = true;
                callback ({ok: true, playerId: reply.result[id].playerid});
            }
        }
        if (!found)
            callback ({ok: false});
    });
}

squeeze.on('register', function(){
        celeri.option({
            command: 'spotifySearch :query',
            description: 'Performs spotify search'
        }, function (data) {
            squeeze.apps.spotify.searchTracks(data.query, 0, 10, function (reply) {<commit_msg>added new commands to demo app.<commit_after>var squeezenode = require('../');
var celeri = require('celeri');var options = require('./options');
var package = require('./package.json');

console.log(package.name.green + ' by ' + '<NAME>'.green);

var squeeze = new squeezenode(options.opts.url, options.opts.port);

function playerIdByName(name, callback) {
    var found = false;
    squeeze.getPlayers( function(reply) {
        for (var id in reply.result) {
            if(reply.result[id].name === name) {
                found = true;
                callback ({ok: true, playerId: reply.result[id].playerid});
            }
        }
        if (!found)
            callback ({ok: false});
    });
}

squeeze.on('register', function(){
        celeri.option({
            command: 'spotifySearchTracks :query',
            description: 'Performs spotify tracks search'
        }, function (data) {
            squeeze.apps.spotify.searchTracks(data.query, 0, 20, function (reply) {
                if (reply.ok)
                    console.dir(reply.result);
            });
        });

        celeri.option({
            command: 'spotifySearchAlbums :query',
            description: 'Performs spotify albums search'
        }, function (data) {
            squeeze.apps.spotify.searchAlbums(data.query, 0, 20, function (reply) {
                if (reply.ok)
                    console.dir(reply.result);
            });
        });

        celeri.option({
            command: 'spotifySearchArtists :query',
            description: 'Performs spotify artists search'
        }, function (data) {
            squeeze.apps.spotify.searchArtists(data.query, 0, 20, function (reply) {
                if (reply.ok)
                    console.dir(reply.result);
            });
        });

        celeri.option({
            command: 'spotifySearch :query',
            description: 'Performs spotify general search'
        }, function (data) {
            squeeze.apps.spotify.searchAll(data.query, 0, 20, function (reply) {
{'fraction_non_alphanumeric': 0.1400933955970647, 'fraction_numerical': 0.005003335557038025, 'mean_word_length': 2.069600818833163, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '560943', 'n_tokens_mistral': 872, 'n_tokens_neox': 837, 'n_words': 189}