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 /plugins/lastfm | |
parent | 9425bbc1716081cff72c73744a4fc82251b9db41 (diff) |
added total playtime display to statusbar
Diffstat (limited to 'plugins/lastfm')
-rw-r--r-- | plugins/lastfm/lastfm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/lastfm/lastfm.c b/plugins/lastfm/lastfm.c index bd4577c9..e7c5cddb 100644 --- a/plugins/lastfm/lastfm.c +++ b/plugins/lastfm/lastfm.c @@ -247,7 +247,7 @@ lfm_fetch_song_info (DB_playItem_t *song, const char **a, const char **t, const if (!*b) { *b = ""; } - *l = song->duration; + *l = deadbeef->pl_get_item_duration (song); *n = deadbeef->pl_find_meta (song, "track"); if (!*n) { *n = ""; @@ -425,12 +425,12 @@ lastfm_songfinished (DB_event_song_t *ev, uintptr_t data) { #if !LFM_IGNORE_RULES // check submission rules // duration must be >= 30 sec - if (ev->song->duration < 30) { + if (deadbeef->pl_get_item_duration (ev->song) < 30) { trace ("song duration is %f seconds. not eligible for submission\n", ev->song->duration); return 0; } // must be played for >=240sec of half the total time - if (ev->song->playtime < 240 && ev->song->playtime < ev->song->duration/2) { + if (ev->song->playtime < 240 && ev->song->playtime < deadbeef->pl_get_item_duration (ev->song)/2) { trace ("song playtime=%f seconds. not eligible for submission\n", ev->song->playtime); return 0; } |