Commit 6bb7a743 authored by Max Kellermann's avatar Max Kellermann

song_print: simplified start_ms/end_ms check

parent ca6110d9
...@@ -51,18 +51,16 @@ song_print_info(struct client *client, struct song *song) ...@@ -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 if (song->start_ms > 0)
else 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment