aboutsummaryrefslogtreecommitdiff
path: root/src/github
diff options
context:
space:
mode:
authordaneren2005 <daneren2005@gmail.com>2014-06-27 15:52:41 -0700
committerdaneren2005 <daneren2005@gmail.com>2014-06-27 15:52:41 -0700
commit097b04ed83250619def3935df3808b9d57bbc391 (patch)
tree2b09395f32462be048d662590ea833f83d515891 /src/github
parented010604dfc7dcda226b99c39ade8204d8824a0b (diff)
downloaddsub-097b04ed83250619def3935df3808b9d57bbc391.tar.gz
dsub-097b04ed83250619def3935df3808b9d57bbc391.tar.bz2
dsub-097b04ed83250619def3935df3808b9d57bbc391.zip
Don't try to scrobble if supposed to be online but isn't
Diffstat (limited to 'src/github')
-rw-r--r--src/github/daneren2005/dsub/service/Scrobbler.java5
1 files changed, 5 insertions, 0 deletions
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) {