Skip to content

Commit 12e90a9

Browse files
committed
Rename option start to play
1 parent 4346a0f commit 12e90a9

File tree

3 files changed

+39
-26
lines changed

3 files changed

+39
-26
lines changed

cli.js

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,27 @@ var cli = meow([
88
' $ itunes-remote [<artist|album|song> ...]',
99
'',
1010
'Options',
11-
' --stop Stop playing the current selection. [Default: false]',
12-
' --start Start playing the current selection. [Default: true]',
11+
' --play Start playing the current selection or search result. [Default: true]',
12+
' --stop Stop playing the current selection or prevent playing the current search result. [Default: false]',
13+
' --pause Pause playing the current selection. [Default: false]',
1314
'',
1415
'Examples',
15-
' $ itunes-remote she',
16+
' $ itunes-remote nicknack',
1617
' Hold on …',
17-
' ✔ Found songs, albums and artists containing ”she“ and generated a playlist',
18-
' ✔ Playing 12 song(s) ♪♬',
18+
' ✔ Found songs, albums and artists containing ”nicknack“ and generated a temporary playlist',
19+
' ✔ Playing 44 song(s) ♪♬',
1920
'',
20-
' $ itunes-remote she --stop',
21+
' $ itunes-remote --pause',
2122
' Hold on …',
22-
' ✔ Found songs, albums and artists containing ”she“ and generated a playlist'
23+
' ✔ Paused playing ♪♬',
24+
'',
25+
' $ itunes-remote --play',
26+
' Hold on …',
27+
' ✔ Playing ♪♬',
28+
'',
29+
' $ itunes-remote emancipator --stop',
30+
' Hold on …',
31+
' ✔ Found songs, albums and artists containing ”emancipator“ and generated a temporary playlist'
2332
], {
2433
alias: {
2534
v: 'version',

index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function startSearch(searchTerm, opts) {
6363
if (err === null && amount) {
6464
console.log(logSymbols.success, 'Found songs, albums and artists containing ”' +
6565
chalk.inverse(searchTerm) + '“ and generated a temporary playlist');
66-
if (opts.start) {
66+
if (opts.play) {
6767
startPlaylist(playlist, amount);
6868
}
6969
} else if (err === null) {
@@ -82,12 +82,12 @@ module.exports = function (str, opts) {
8282

8383
if (str) {
8484
if (isEmptyObject(opts)) {
85-
opts = {start: true};
85+
opts = {play: true};
8686
}
8787
startSearch(str, opts);
8888
} else {
8989
// console.log(opts);
90-
if (opts.start === true) {
90+
if (opts.play === true) {
9191
startPlayBack();
9292
}
9393
if (opts.stop === true) {
@@ -104,5 +104,4 @@ module.exports = function (str, opts) {
104104
}
105105

106106
return 'Hold on …';
107-
// return str + ' & ' + (opts.postfix || 'rainbows');
108107
};

readme.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,40 @@
88
## Install
99

1010
```
11-
$ npm install --save itunes-remote
11+
$ npm install --global itunes-remote
1212
```
1313

1414

1515
## Usage
1616

17-
```
18-
$ npm install --global itunes-remote
19-
```
20-
2117
```
2218
$ itunes-remote --help
2319
2420
Usage
2521
$ itunes-remote [<artist|album|song> ...]
2622
2723
Options
28-
--stop Stop playing the current selection. [Default: false]
29-
--start Start playing the current selection. [Default: true]
24+
--play Start playing the current selection or search result. [Default: true]',
25+
--stop Stop playing the current selection or prevent playing the current search result. [Default: false]',
26+
--pause Pause playing the current selection. [Default: false]',
3027
3128
Examples
32-
$ itunes-remote she
33-
Hold on …
34-
✔ Found songs, albums and artists containing ”she“ and generated a playlist
35-
✔ Playing your songs (っ◕‿◕)っ
36-
37-
$ itunes-remote she --stop
38-
Hold on …
39-
✔ Found songs, albums and artists containing ”she“ and generated a playlist
29+
$ itunes-remote nicknack',
30+
Hold on …',
31+
✔ Found songs, albums and artists containing ”nicknack“ and generated a temporary playlist',
32+
✔ Playing 44 song(s) ♪♬',
33+
34+
$ itunes-remote --pause',
35+
Hold on …',
36+
✔ Paused playing ♪♬',
37+
38+
$ itunes-remote --play',
39+
Hold on …',
40+
✔ Playing ♪♬',
41+
42+
$ itunes-remote emancipator --stop',
43+
Hold on …',
44+
✔ Found songs, albums and artists containing ”emancipator“ and generated a temporary playlist'
4045
```
4146

4247

0 commit comments

Comments
 (0)