-
Notifications
You must be signed in to change notification settings - Fork 0
/
mpc
87 lines (61 loc) · 2.11 KB
/
mpc
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
# toggle repeat
mpc repeat on
mpc repeat off
# formatting
mpc current -f '%title% \n%artist%'
# see statistics of library
mpc stats
# to loop only single song from playlist
# enable single mode and repeat
# search using tag values
mpc find "(Artist == \"K. J. Yesudas & K. S. Chithra\")"
# contains
mpc find "(Artist contains \"K. J. Yesudas\")"
mpc search filename "Brown"
mpc play
# shuffle songs without enabling random mode
mpc shuffle
# add all songs to queue
mpc add /
# or this
mpc search filename / | mpc add
# add a subset of song to the queue
mpc ls fixed/eng_fixed | mpc add
# insert a file to be played next
mpc insert "fixed/tamil_fixed/Anjali Anjali.mp3"
# play next song
mpc next
# list all songs in the library
mpc listall
# enable or disable single mode
mpc single on
mpc single off
# clear queue
mpc clear
# rate currently playing song
mpc sticker "`mpc -f %file% current`" set rating 7
# get rating of currently playing
mpc sticker "`mpc -f %file% current`" get rating
# list available stickers for file
mpc sticker fileuri list
# find songs that have a sticker value
mpc sticker path/to/dir find rating
# valid search queries
mpc find <any|Artist|Album|AlbumArtist|Title|Track|Name|Genre|Date|Composer|Performer|Comment|Disc|MUSICBRAINZ_ARTISTID|MUSICBRAINZ_ALBUMID|MUSICBRAINZ_ALBUMARTISTID|MUSICBRAINZ_TRACKID|MUSICBRAINZ_RELEASETRACKID|OriginalDate|ArtistSort|AlbumArtistSort|AlbumSort|Label|MUSICBRAINZ_WORKID|Grouping|Work|Conductor|ComposerSort|Ensemble|Movement|MovementNumber|Location|Mood|TitleSort|MUSICBRAINZ_RELEASEGROUPID>
# combine multiple criteria
mpc find "((Genre == \"Malayalam\") AND (Date == \"2000\"))"
# add all recenly added songs
# cd to Music directory
find . -type f -mtime -1 | awk '{ sub(/^\.\//, ""); print }' | mpc add
# find song later than a date
mpc list Date | grep -E '^[0-9]{4}' | while read date; do
if [[ "$date" -gt 2000 ]]; then
mpc find "((Genre == \"Malayalam\") AND (Date == \"$date\"))"
fi
done
# list playlists
mpc lsplaylists
# add file to playlist from pipe
cmd | mpc addplaylist playlistname
# save current queue as playlist file with .m3u
mpc save filename