Search in sources :

Example 6 with ArtistUserTag

use of com.github.hakko.musiccabinet.domain.model.aggr.ArtistUserTag in project musiccabinet by hakko.

the class TagUpdateService method updateTag.

/*
	 * Async method that registers tag updates for later submission, in case
	 * last.fm is down.
	 */
public void updateTag(Artist artist, String lastFmUsername, String tagName, int tagCount, boolean increase) {
    LastFmUser lastFmUser = lastFmDao.getLastFmUser(lastFmUsername);
    register(new ArtistUserTag(artist, lastFmUser, tagName, tagCount, increase));
    if (!started.getAndSet(true)) {
        startTagUpdateService();
    }
}
Also used : ArtistUserTag(com.github.hakko.musiccabinet.domain.model.aggr.ArtistUserTag) LastFmUser(com.github.hakko.musiccabinet.domain.model.library.LastFmUser)

Aggregations

ArtistUserTag (com.github.hakko.musiccabinet.domain.model.aggr.ArtistUserTag)6 ApplicationException (com.github.hakko.musiccabinet.exception.ApplicationException)2 WSResponse (com.github.hakko.musiccabinet.ws.lastfm.WSResponse)2 NameValuePair (org.apache.http.NameValuePair)2 Test (org.junit.Test)2 LastFmUser (com.github.hakko.musiccabinet.domain.model.library.LastFmUser)1