song_print: simplified start_ms/end_ms check
This commit is contained in:
parent
ca6110d92f
commit
6bb7a7439d
@ -51,18 +51,16 @@ song_print_info(struct client *client, struct song *song)
|
||||
{
|
||||
song_print_uri(client, song);
|
||||
|
||||
if (song->start_ms > 0 || song->end_ms > 0) {
|
||||
if (song->end_ms > 0)
|
||||
client_printf(client, "Range: %u.%03u-%u.%03u\n",
|
||||
song->start_ms / 1000,
|
||||
song->start_ms % 1000,
|
||||
song->end_ms / 1000,
|
||||
song->end_ms % 1000);
|
||||
else
|
||||
client_printf(client, "Range: %u.%03u-\n",
|
||||
song->start_ms / 1000,
|
||||
song->start_ms % 1000);
|
||||
}
|
||||
if (song->end_ms > 0)
|
||||
client_printf(client, "Range: %u.%03u-%u.%03u\n",
|
||||
song->start_ms / 1000,
|
||||
song->start_ms % 1000,
|
||||
song->end_ms / 1000,
|
||||
song->end_ms % 1000);
|
||||
else if (song->start_ms > 0)
|
||||
client_printf(client, "Range: %u.%03u-\n",
|
||||
song->start_ms / 1000,
|
||||
song->start_ms % 1000);
|
||||
|
||||
if (song->mtime > 0) {
|
||||
#ifndef G_OS_WIN32
|
||||
|
Loading…
Reference in New Issue
Block a user