summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index c08fc57..4f63404 100644
--- a/src/main.c
+++ b/src/main.c
@@ -126,7 +126,8 @@ int main (int argc, char **argv) {
scrobbleSong.length = player.songDuration / BAR_PLAYER_MS_TO_S_FACTOR;
/* scrobble when >= nn% are played; use seconds, not
* milliseconds */
- if (player.songPlayed / BAR_PLAYER_MS_TO_S_FACTOR * 100 /
+ if (scrobbleSong.length > 0 &&
+ player.songPlayed / BAR_PLAYER_MS_TO_S_FACTOR * 100 /
scrobbleSong.length >= settings.lastfmScrobblePercent &&
settings.enableScrobbling) {
WardrobeReturn_t wRet;