mischah / itunes-remote

:notes: Control iTunes via CLI
MIT License
427 stars 31 forks source link

Feature: Add flag to run one command and exit right away #9

Closed ratberryjam closed 7 years ago

ratberryjam commented 8 years ago

It would be nice to have a flag when running itunes-remote to tell it to just perform the specified command and exit, say if you just want to quickly pause or stop playback.

mischah commented 8 years ago

@ratberryjam

Just to make sure I get it straight.

You man instead of:

$ itunes-remote 
iTunes: play
Hold on …
✔ Playing ♪♬
iTunes: exit --force
$ 

Something like:

$ itunes-remote 
iTunes: play --exit
Hold on …
✔ Playing ♪♬
$ 

This is definitely a reasonable use case :ok_hand:

ratberryjam commented 8 years ago

Exactly 👍

al-the-x commented 8 years ago

Additionally:

$> itunes-remote play --exit
Hold on …
✔ Playing ♪♬
$>

But I assume that providing --exit to play would support both use cases?

I WILL SUBMIT A PR TODAY FOR THIS.

And immediately alias play='itunes-remote play --exit'...

jamesratcliffe commented 8 years ago

@al-the-x Ideally it would work for play, stop, pause, next, previous and back

quentindemetz commented 8 years ago

Would also like to see this :)

odedpriva commented 7 years ago

would be great !

mischah commented 7 years ago

Implemented for the following commands: play, stop, pause, next, previous and back.

Example usage from the interactive mode:

$ itunes
iTunes: start --exit
$

Example usage from outside:

$ itunes stop --exit
iTunes:
✔ Stopped playing ♪♬
$
mischah commented 7 years ago

Published with 2.3.0 🎉