summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-06-08 13:56:03 +0200
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-06-08 13:56:03 +0200
commit1fd01b19689e1328cf51cab4ebd350c9434a3396 (patch)
tree0298079bbb96882ac275132981e9b18ab9afbfa5 /plugins
parent1a7ec54699dbb1aaffba4c1d5cfdad54528bcd69 (diff)
lfm: fixed tiny track support
Diffstat (limited to 'plugins')
-rw-r--r--plugins/lastfm/lastfm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/lastfm/lastfm.c b/plugins/lastfm/lastfm.c
index d7e0a7e1..4d112acf 100644
--- a/plugins/lastfm/lastfm.c
+++ b/plugins/lastfm/lastfm.c
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
+#include <math.h>
#include "../../deadbeef.h"
//#define trace(...) { fprintf(stderr, __VA_ARGS__); }
@@ -356,6 +357,9 @@ lfm_fetch_song_info (DB_playItem_t *song, float playtime, char *a, char *t, char
if (*l <= 0) {
*l = playtime;
}
+ if (*l < 30 && deadbeef->conf_get_int ("lastfm.submit_tiny_tracks", 0)) {
+ *l = 30;
+ }
if (!deadbeef->pl_get_meta (song, "track", n, META_FIELD_SIZE)) {
*n = 0;
}