From 097b04ed83250619def3935df3808b9d57bbc391 Mon Sep 17 00:00:00 2001 From: daneren2005 Date: Fri, 27 Jun 2014 15:52:41 -0700 Subject: Don't try to scrobble if supposed to be online but isn't --- src/github/daneren2005/dsub/service/Scrobbler.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/github/daneren2005') diff --git a/src/github/daneren2005/dsub/service/Scrobbler.java b/src/github/daneren2005/dsub/service/Scrobbler.java index 1f831a80..9958ff9e 100644 --- a/src/github/daneren2005/dsub/service/Scrobbler.java +++ b/src/github/daneren2005/dsub/service/Scrobbler.java @@ -24,6 +24,11 @@ public class Scrobbler { if (song == null || !Util.isScrobblingEnabled(context)) { return; } + + // Ignore if online with no network access + if(!Util.isOffline(context) && !Util.isNetworkConnected(context)) { + return; + } // Ignore podcasts if(song.getSong() instanceof PodcastEpisode) { -- cgit v1.2.3