lib: fix segfault caused by player-prev

On Tue, Nov 13, 2012 at 4:48 PM, Philipp Hartwig <ph@phhart.de> wrote:
> with git HEAD and an empty ~/.cmus, the following steps produce a segfault for
> me:
>
> First
>  set repeat=true
>  set aaa_mode=album
>
> Then add some album, play the first track and execute player-prev. The track
> selection should wrap around to the last track of the album, but instead cmus
> crashes.

Fix it by replacing bad line of code with the obviously correct one.

Reported-by: Philipp Hartwig <ph@phhart.de>
Signed-off-by: Gregory Petrosyan <gregory.petrosyan@gmail.com>
Add show_playback_position option

Requested-by: Franco <franco00@gmx.com>
Signed-off-by: Gregory Petrosyan <gregory.petrosyan@gmail.com>
README: bump copyright year

Signed-off-by: Gregory Petrosyan <gregory.petrosyan@gmail.com>
Replace 'Gitorious' with 'GitHub' in docs

Signed-off-by: Gregory Petrosyan <gregory.petrosyan@gmail.com>
Convert README to Markdown

Signed-off-by: Gregory Petrosyan <gregory.petrosyan@gmail.com>
Improve README.md a bit

Signed-off-by: Gregory Petrosyan <gregory.petrosyan@gmail.com>
Add opus codec support

Signed-off-by: Gregory Petrosyan <gregory.petrosyan@gmail.com>
opus: add missing breaks in opus_read
opus: fix comment
opus: avoid allocating buffer as suggested by Gregory
opus: fix error handling in opus_read
Bump VA copyright year with the help of sed

Signed-off-by: Gregory Petrosyan <gregory.petrosyan@gmail.com>
Minor gramar / wording changes
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