diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2009-10-11 17:14:10 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2009-10-11 17:14:10 +0200 |
commit | 4326a465afb45622d22d2dd52fe6f4d25f1a17ef (patch) | |
tree | c9480b530aa077ab43f5bc9a3940eda556accb03 /cgme.c | |
parent | 9425bbc1716081cff72c73744a4fc82251b9db41 (diff) |
added total playtime display to statusbar
Diffstat (limited to 'cgme.c')
-rw-r--r-- | cgme.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -42,7 +42,7 @@ cgme_init (DB_playItem_t *it) { plugin.info.bps = 16; plugin.info.channels = 2; plugin.info.samplerate = deadbeef->playback_get_samplerate (); - duration = it->duration; + duration = deadbeef->pl_get_item_duration (it); reallength = inf.length; nzerosamples = 0; plugin.info.readpos = 0; @@ -136,10 +136,10 @@ cgme_insert (DB_playItem_t *after, const char *fname) { snprintf (trk, 10, "%d", i+1); deadbeef->pl_add_meta (it, "track", trk); if (inf.length == -1) { - it->duration = 300; + deadbeef->pl_set_item_duration (it, 300); } else { - it->duration = (float)inf.length/1000.f; + deadbeef->pl_set_item_duration (it, (float)inf.length/1000.f); } const char *ext = fname + strlen (fname) - 1; while (ext >= fname && *ext != '.') { |