Giter Site home page Giter Site logo

squeezy's Introduction

squeezy

A command-line utility for controlling squeezebox network audio players via their squeezeserver.

squeezy's People

Contributors

lmiphay avatar pssc avatar rcampbel3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

squeezy's Issues

exit if not playing

Hello, last one, regards, D.J.

'-exit_if_not_playing' =>
{
help => 'if is not playing, then exit immediately; exit code 0',
command =>
sub { if ( not command('-mode') eq 'play' )
{ print "$player is not playing, exiting immediately\n"; exit(0); } }
},

-nt operator in zsh completion file

Hello.

In the zsh completion file (_squeezy) there is this line:

if ! [ -r $cache -a -s $cache ] || [ "$squeezy" -nt $cache ]

Can someone please explain to me what the -nt operator does? I can't find any explanation and this is really driving me crazy :-)

Handover...

Hi @pssc . Steve Blott here. I originally wrote squeezy

This is not really an issue. Just a note to say thanks for working on this. I've left a note on the Google code page pointing to here as the actively-developed version.

See here.

commands for connection

Hello, additionally I needed some commands regarding connection state, sincerely D.J.

'-connected' =>
{
help => 'is player connected?',
command => sub { report 'connected', pick_field 2, send_command urlencode($player)." connected ?"; }
},

'-exit_if_not_connected' =>
{
help => 'if this player is not connected, then exit immediately; exit code 0',
command =>
sub {
if ( not command('-connected') eq 1 )
{ print "$player is not connected, exiting immediately\n"; exit(0); } }
},

commands for alarms

Hello, I wrote some crude command for alarms, in the end I wanted the -die_if_no_alarms, regards D.J.

'-enabled_alarms' =>
{
help => 'enabled alarms count (can only sound if not generally disabled)',
command => sub { report 'enabled alarms', pick_field 6, send_command urlencode($player)." alarms 0 99 filter:enabled"; }
},

'-alarms_enabled' =>
{
help => 'alarms generally enabled?',
command => sub { report 'alarms enabled', pick_field 3, send_command urlencode($player)." playerpref alarmsEnabled ?"; }
},

'-die_if_no_alarms' =>
{
help => 'if alarms are disabled generally or no alarm is enabled, then die immediately; exit code 1',
command =>
sub { if ( !command('-alarms_enabled') || command('-enabled_alarms') eq 'count:0')
{ print "$player has no enabled alarms or alarms are disabled generally, exiting immediately\n"; exit(1); } }
},

tput: unknown terminfo capability 'co'

Hello, running squeezy on a Synolgy NAS (which is using busybox) I ran in the dumb terminal problem (no columns):

./squeezy -all -playlist
Smiley playlist length 1
Smiley playlist index 0
tput: unknown terminfo capability 'co'

0 Here I go (unchain); -

I solved this - without any knowledge - by changing

sub terminal_cols
{
return undef;
}
Sincerely, D.J.

typo

The "-volume" option tries to "urnencode" :) and is therefore broken now -> s/urnencode/urlencode/

-if_alarm: Wrong help?

Hello and thank you very much!

But regarding -if_alarm, shouldn't the help state 'if alarms are enabled generally and at least one alarm is enabled'?

Sincerely, D.J.

Your unchanged code
'-if_alarm' =>
{
help => 'if alarms are disabled generally or no alarm is enabled',
command =>
sub { if (notted( my $r = command('-alarms_enabled') && command('-alarms') ne 'count:0'))
{ print "$player has ",$r ? "" : "no ","active alarm \n"; &$action; } }
},

-not works global

Hello,

a late thanks for the new version.

I just realized that -not works global on all following -if_..., which is - for me - unexpected behavior

I would like to suggest changing this e.g. with

    '-if_alarm' =>
    {
       help => 'if alarms are enabled generally and an alarm is enabled',
           command =>
       sub { if (notted( my $r = (command('-alarms_enabled') eq "1" && command('-alarms') ne 'count:0')))
       { print $cpo->{name}," has ",$r ? "" : "no ","active alarm \n"; &$action; }
       $not = 0},
    },

  '-if_connected' =>
    {
       help => 'if this player is not connected',
       command => sub { if (notted( my $r = command('-connected') eq 1) )
       { print $cpo->{name}," is ",$r ? "" : "not " ,"connected\n"; &$action; }
       $not = 0 },
    },

   '-if_playing' =>
        {
       help => 'if this player is on and playing',
       command => sub { if (notted( my $r = (command('-power') eq "1" && command('-mode') eq 'play')) )
       { print $cpo->{name}," is ",$r ? "on and" : "not" ," playing,\n"; &$action; }
       $not = 0 },
       },

   '-if_sleeping' =>
    {
     help    => 'if this player is on and is timing down to sleep',
     command =>
        sub { if ( notted( my $r = (command('-power') eq "1" && command('-sleeping') ) ) )
        { print $cpo->{name}," is ",$r ? "on and" : "not" ," timing down to sleep\n"; &$action; } 
        $not = 0 },
    },

Regards, D.J.

Server specified in squeezy.conf no longer used

Hi,

It seems that v0.18 no longer uses the server specified in the conf file. I've tried to track down the source of the problem and this it is in the changes to add multi-server support but I don't do perl so I can't really help fix this.

David

UTF8 in player name

Hello,

it seems that squeeze has a problem with UTF8 in player names, one of mine is called "Eichhörnchen".

It is autodetected:
squeezy
players: Eichhörnchen, Maus, Katze, Smiley, Dachs

But can not be addressed
squeezy -Eichhörnchen -mode
players: Eichhörnchen, Maus, Katze, Smiley, Dachs
Eichhörnchen selected
Eichhörnchen power ?
Eichhörnchen mode ?

same with
squeeze -e -mode

Sincerely, D.J.

play command

to be sure it will restart playing if the player was stopped or in pause)..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.