summaryrefslogtreecommitdiff
path: root/cgme.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-10-11 17:14:10 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-10-11 17:14:10 +0200
commit4326a465afb45622d22d2dd52fe6f4d25f1a17ef (patch)
treec9480b530aa077ab43f5bc9a3940eda556accb03 /cgme.c
parent9425bbc1716081cff72c73744a4fc82251b9db41 (diff)
added total playtime display to statusbar
Diffstat (limited to 'cgme.c')
-rw-r--r--cgme.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cgme.c b/cgme.c
index cf63a730..21aeb292 100644
--- a/cgme.c
+++ b/cgme.c
@@ -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 != '.') {