song_print: simplified start_ms/end_ms check

This commit is contained in:
Max Kellermann 2010-06-25 20:02:53 +02:00
parent ca6110d92f
commit 6bb7a7439d

View File

@ -51,18 +51,16 @@ song_print_info(struct client *client, struct song *song)
{ {
song_print_uri(client, song); song_print_uri(client, song);
if (song->start_ms > 0 || song->end_ms > 0) {
if (song->end_ms > 0) if (song->end_ms > 0)
client_printf(client, "Range: %u.%03u-%u.%03u\n", client_printf(client, "Range: %u.%03u-%u.%03u\n",
song->start_ms / 1000, song->start_ms / 1000,
song->start_ms % 1000, song->start_ms % 1000,
song->end_ms / 1000, song->end_ms / 1000,
song->end_ms % 1000); song->end_ms % 1000);
else else if (song->start_ms > 0)
client_printf(client, "Range: %u.%03u-\n", client_printf(client, "Range: %u.%03u-\n",
song->start_ms / 1000, song->start_ms / 1000,
song->start_ms % 1000); song->start_ms % 1000);
}
if (song->mtime > 0) { if (song->mtime > 0) {
#ifndef G_OS_WIN32 #ifndef G_OS_WIN32