diff options
author | Max Kellermann <max@duempel.org> | 2009-12-25 22:59:13 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-12-27 14:46:04 +0100 |
commit | a038bca74580359a883dc8d526feb7104a677d8c (patch) | |
tree | 0ade8231ea065723839086f135d715d4284a21e9 /src/song_print.c | |
parent | cf38505d8fddbfee431936969e34b9d438243f31 (diff) | |
download | mpd-a038bca74580359a883dc8d526feb7104a677d8c.tar.gz mpd-a038bca74580359a883dc8d526feb7104a677d8c.tar.xz mpd-a038bca74580359a883dc8d526feb7104a677d8c.zip |
song: added support for selecting a time range
Added attributes start_ms, end_ms. This allows us to address a
portion of a song file (important for CUE support). There is no
support yet for storing these attributes in the state file.
Diffstat (limited to '')
-rw-r--r-- | src/song_print.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/song_print.c b/src/song_print.c index 3e6252ed6..3ba653d1c 100644 --- a/src/song_print.c +++ b/src/song_print.c @@ -51,6 +51,19 @@ 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->mtime > 0) { #ifndef G_OS_WIN32 struct tm tm; |