Add support for zero-width characters

Signed-off-by: Gregory Petrosyan <gregory.petrosyan@gmail.com>
Merge pull request #20 from flyingmutant/zero-width

Add support for zero-width characters
Adding stream metadata to `cmus-remote -Q`

Currently if you play a stream using cmus, you can see the
artist/album/title information in the curses display, but the same
information is not available by querying the server with cmus-remote -Q.

I wanted to be able to get to that information, and I think my way makes
sense ... basically I've added a new field (stream) to the output of
cmus-remote -Q which contains the stream metadata.

Here's an example of how this new functionality looks:

% cmus-remote -Q
status playing
file http://stream.mybox.com
duration -1
position 2
tag title Some Cool stream
tag genre Some Cool Genre
tag comment http://some-stream-url
stream Fila Brazillia - Brazilification Remixes 95-99 (CD2) - Freakpower / New Direction (Fila Brazillia Mix) # <- NEW!
set aaa_mode album
set continue true
set play_library false
set play_sorted true
set replaygain disabled
set replaygain_limit true
set replaygain_preamp 6.000000
set repeat true
set repeat_current false
set shuffle false
set softvol false
set vol_left 16
set vol_right 16

Incidentally, this field can also be used as a boolean to let a client
know whether or not a stream is being played.
Merge pull request #23 from noah/master

Adding stream metadata to cmus-remote -Q
Fix segfault in add_ti()

Commit 12553e19c1180551541abbd217eab4e9ed7a511a made `add_ti` in command_mode.c
depend on `data` parameter being non-NULL. At the same time, one case in
`cmd_run` function still called `add_ti` with NULL — which leads to segfault.

Reported-by: @cjsthompson
Signed-off-by: Gregory Petrosyan <gregory.petrosyan@gmail.com>
cdio: make it work with libcdio 0.90+

Signed-off-by: Gregory Petrosyan <gregory.petrosyan@gmail.com>
add reverse sort order
Merge pull request #35 from CBke/reverse_sort

Allow reverse sort order
Fix add_dir() in the case of symlinks to hidden directories

add_dir() tries to ignore symlinks that point within directory being added
(since those files would be added anyway). Unfortunately, it failed to account
for the case of symlinks that point to *hidden* files within directory being
added.

On Mon, Apr 22, 2013 at 9:37 PM, Markus Rothe <markus@unixforces.net> wrote:
> On Mon, Apr 22, 2013 at 04:13:57PM +0400, Gregory Petrosyan wrote:
>> Can you please simplify the test case — try to repeat adding the
>> music, but e.g. one directory containing one (symlinked) file, and go
>> from there?
>
> You are correct. I also discovered that adding symlinked files works in
> some cases. But here is a minimal testcase, which I cannot add by
> running ":add ~/tmp/music/"; i.e. no files are added.
>
>     % tree ~/tmp/music -aN
>     /home/markus/tmp/music
>     |-- .content
>     |   `-- 01 - Speak To Me - Breathe In The Air.flac
>     `-- Pink Floyd
>         `-- 1973 - The Dark Side Of The Moon
>             `-- 01 - Speak To Me - Breathe In The Air.flac -> ../../.content/01 - Speak To Me - Breathe In The Air.flac
>
>     3 directories, 2 files
>
> [ .content would be .git in my case ]
>
> Note that I *can* add it using ":add ~/tmp/music/Pink Floyd/".

Reported-by: Markus Rothe <markus@unixforces.net>
Signed-off-by: Gregory Petrosyan <gregory.petrosyan@gmail.com>