summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}