public class LastFmPluginImpl extends Object implements LastFmPluginInterface, Observer
Modifier and Type | Field and Description |
---|---|
private String |
artist |
private List<BlackList> |
blackList |
private String |
key |
private static String |
lastfm_api_key |
private Boolean |
lastfm_debugmode |
private String |
lastfm_password |
private String |
lastfm_proxy_ip |
private Integer |
lastfm_proxy_port |
private Proxy.Type |
lastfm_proxymode |
private static String |
lastfm_secret |
private String |
lastfm_username |
private static org.apache.log4j.Logger |
log |
private static de.umass.lastfm.Session |
session |
private String |
title |
private static String |
userAgent |
Constructor and Description |
---|
LastFmPluginImpl() |
Modifier and Type | Method and Description |
---|---|
private boolean |
changedTrack(String title,
String artist) |
private String |
decrypt(String key,
String encrypted) |
private String |
encrypt(String key,
String value) |
private void |
getConfig() |
private String |
getElementTest(Element element,
String name,
String default_value) |
private void |
init()
Initializes the connection to lastfm, it stores the details of the connection (session) inside the local
session member.
|
private void |
scrobble(String title,
String artist)
Convenience method to call scrobble without an album.
|
private void |
scrobble(String title,
String artist,
String album)
Sends the track data to lastfm (scrobbles the track), if the track and/or the artist is not in the blacklist.
|
void |
update(Observable o,
Object e) |
void |
updateMyXML(Document doc,
String path,
String def) |
private static org.apache.log4j.Logger log
private static final String lastfm_api_key
private static final String lastfm_secret
private static final String userAgent
private String lastfm_username
private String lastfm_password
private String key
private Boolean lastfm_debugmode
private Proxy.Type lastfm_proxymode
private String lastfm_proxy_ip
private Integer lastfm_proxy_port
private String title
private String artist
private static de.umass.lastfm.Session session
public void update(Observable o, Object e)
private void scrobble(String title, String artist)
title
- artist
- private void scrobble(String title, String artist, String album)
title
- artist
- album
- private void init()
private void getConfig()
public void updateMyXML(Document doc, String path, String def)
doc
- path
- def
- private boolean changedTrack(String title, String artist)
title
- artist
- private String getElementTest(Element element, String name, String default_value)
element
- name
- Copyright © 2013–2014. All rights reserved.