aboutsummaryrefslogtreecommitdiffstats
path: root/test/dump_playlist.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-12-25 22:59:13 +0100
committerMax Kellermann <max@duempel.org>2009-12-27 14:46:04 +0100
commita038bca74580359a883dc8d526feb7104a677d8c (patch)
tree0ade8231ea065723839086f135d715d4284a21e9 /test/dump_playlist.c
parentcf38505d8fddbfee431936969e34b9d438243f31 (diff)
downloadmpd-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--test/dump_playlist.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/dump_playlist.c b/test/dump_playlist.c
index bf31400fe..1a569dfcb 100644
--- a/test/dump_playlist.c
+++ b/test/dump_playlist.c
@@ -128,6 +128,14 @@ int main(int argc, char **argv)
while ((song = playlist_plugin_read(playlist)) != NULL) {
g_print("%s\n", song->uri);
+
+ if (song->start_ms > 0 || song->end_ms > 0)
+ g_print("range: %u:%02u..%u:%02u\n",
+ song->start_ms / 60000,
+ (song->start_ms / 1000) % 60,
+ song->end_ms / 60000,
+ (song->end_ms / 1000) % 60);
+
if (song->tag != NULL)
tag_save(stdout, song->tag);