forked from importerror/pms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
259 lines (155 loc) · 5.86 KB
/
Copy pathREADME
File metadata and controls
259 lines (155 loc) · 5.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
mps
===
[UPDATE 13/Feb/2014: To assist with packaging and resolve a nameclash with
other software, this program has been renamed from pms to mps]
[UPDATE 3/Feb/2014 - see `mps-youtube <https://github.com/np1/mps-youtube>`_
for accessing youtube content]
.. image:: http://badge.fury.io/py/mps.png
:target: https://pypi.python.org/pypi/mps
.. image:: https://pypip.in/d/mps/badge.png
:target: https://pypi.python.org/pypi/mps
Features
--------
- Search and stream music
- Create playlists
- Download music
- Works with Python 2.7 and 3.x
- Works with Windows, Linux and Mac OS X
- No Python dependencies
- Requires mplayer
Screenshots
-----------
Search
~~~~~~
.. image:: http://i.imgur.com/SnqxqZz.png
Playback
~~~~~~~~
.. image:: http://i.imgur.com/3sYlktI.png
Playlists
~~~~~~~~~
.. image:: http://i.imgur.com/RDEXLPW.png
Installation
------------
Using `pip <http://www.pip-installer.org>`_::
sudo pip install mps
Using `git <http://www.git-scm.com>`_::
git clone https://github.com/np1/mps.git
Manually::
Download zip file or tar.gz and extract:
https://github.com/np1/mps/archive/master.zip
https://github.com/np1/mps/archive/master.tar.gz
Mac OS X installation notes
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Install mplayer with `MacPorts <http://www.macports.org>`_::
sudo port install MPlayer
Windows installation notes
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Install the python `colorama <https://pypi.python.org/pypi/colorama>`_ module to get colors (optional)::
pip install colorama
Download mplayer for your CPU type from the "Build Selection table" `here
<http://oss.netfarm.it/mplayer-win32.php>`_.
Extract the mplayer.exe file, saving it to your mps directory
Upgrading
---------
It is recommended you update to the latest version.
Upgrade pip installation::
sudo pip install mps --upgrade
Upgrade git clone::
(from within the mps directory)
git pull
Usage
-----
mps is run on the command line using the command::
mps
or on Linux/MacOS if you are in the same directory::
./mps
Enter ``h`` from within the program for help.
Searching
~~~~~~~~~
You can enter an artist/song name to search whenever the program is expecting
text input. Searches must be prefixed with either a . or / character.
Enter ``n`` or ``p`` to go to the next / previous page of results
When a list of songs is displayed, such as search results or a playlist, you
can use the following commands:
Downloading
~~~~~~~~~~~
``d 3`` to download song 3
Playback
~~~~~~~~
``all`` to play all displayed tracks
``1,2,3`` to play songs 1 2 and 3
``2-4,6,6-3`` to play songs 2, 3, 4, 6, 6, 5, 4, 3
Note: The commands ``shuffle`` and ``repeat`` can be inserted at the start or
end of any of the above to enable those play modes: eg, ``shuffle 1-4`` or
``2-4,1 repeat``
Editing
~~~~~~~
``rm 1,5`` to remove songs 1 and 5.
``rm 1,2,5-7`` to remove songs 1,2 and 5-7.
``rm all`` to remove all songs
``sw 1,3`` to swap the position of songs 1 and 3
``mv 1,3`` to move song 1 to postion 3
Playlist commands
~~~~~~~~~~~~~~~~~
``add 1,2,3`` to add songs 1,2 and 3 to the current playlist.
``add 1-4,6,8-10`` to add songs 1-4, 6, and 8-10 to the current playlist
``add 1-4,7 <playlist_name>`` to add songs 1-4 and 7 to a saved playlist. A
new playlist will be created if the given name doesn't already exist.
``vp`` to view the current playlist (then use rm, mv and sw to modify it)
``ls`` to list your saved playlists
``open <playlist_name or ID>`` to open a saved playlist as the current playlist
``view <playlist_name or ID>`` to view a playlist (leaves current playlist intact)
``play <playlist_name or ID>`` to play a saved playlist directly.
``save`` or ``save <playlist_name>`` to save the currently displayed songs as a
stored playlist on disk
``rmp <playlist_name or ID>`` to delete a playlist from disk
``mv <old_name or ID> <new_name>`` to rename a playlist
``q`` to quit
``h`` for help
Other Commands
--------------
``top`` show top tracks this week
``top3m`` show top tracks for last 3 months
``top6m`` show top tracks for last 6 months
``topyear`` show top tracks for last year
``topall`` show all time top tracks
``list [pleer playlist url]``` to import a playlist from the web.
Advanced Tips
-------------
Playlist Name Completion
~~~~~~~~~~~~~~~~~~~~~~~~
When using ``open``, ``view`` or ``play`` to access a playlist, you can enter
the first few characters instead of the whole name. The first alphabetically
matching playlist will be opened / displayed.
Invocation
~~~~~~~~~~
To play a saved playlist when invoking mps use the following command:
``mps play <playlistname>``
This also works for other commands, eg:
``mps .mozart`` to search
``mps view <playlistname>`` to view a saved playlist
``mps ls`` to list saved playlists
``mps top`` to list top tracks this week
``mps open moz`` to open a saved playlist called mozart.
Specifying Ranges
~~~~~~~~~~~~~~~~~
When selecting songs for playback, removing or adding you can use ``5-`` to
select song 5 upward and ``-5`` to select up to song 5. This can be included
with other choices so for example: ``5,3,7-,-2``. You can also use spaces
instead of commas eg. ``5 3 7- -2``.
Quality / Bitrate
~~~~~~~~~~~~~~~~~
Add ``+best`` to a search query to return high bitrate results or ``+good`` to
exclude them.
Using MPV instead of MPlayer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you have `mpv <http://mpv.io>`_ installed and want to use that instead of mplayer;
From within mps::
set player mpv
set playerargs --really-quiet --no-video
Other Configuration
~~~~~~~~~~~~~~~~~~~
To view configuration, enter ``set`` and to change any item enter:
``set <item> <value>``. This can be used to change the download path (DDIR)
and will persist after exiting the program. To reset all settings to default,
use ``set all default`` or for a single item, ``set <item> default``