Update Scrobbler.java
This commit is contained in:
@@ -36,7 +36,7 @@ public class Scrobbler{
|
|||||||
|
|
||||||
Log.d("Scrobbler", "scrobbleTrack: " + title + " - " + artist + " - " + duration + " - " + uid);
|
Log.d("Scrobbler", "scrobbleTrack: " + title + " - " + artist + " - " + duration + " - " + uid);
|
||||||
|
|
||||||
if (needToBeScrobble(uid)) {
|
if (!needToBeScrobble(uid)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,6 +114,7 @@ public class Scrobbler{
|
|||||||
public static void reset(){
|
public static void reset(){
|
||||||
edit().remove("username").apply();
|
edit().remove("username").apply();
|
||||||
edit().remove("sessionKey").apply();
|
edit().remove("sessionKey").apply();
|
||||||
|
scrobbled.clear();
|
||||||
sendToast("Вы успешно вышли из учетной записи");
|
sendToast("Вы успешно вышли из учетной записи");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,7 +125,7 @@ public class Scrobbler{
|
|||||||
public static boolean isLoggedIn(){
|
public static boolean isLoggedIn(){
|
||||||
return !getDefaultPrefs().getString("sessionKey", null).isEmpty();
|
return !getDefaultPrefs().getString("sessionKey", null).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isScrobblingEnabled(){
|
public static boolean isScrobblingEnabled(){
|
||||||
return getPreferences().getBoolean("lastfm_enabled", false);
|
return getPreferences().getBoolean("lastfm_enabled", false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user