use of com.github.hakko.musiccabinet.domain.model.library.LastFmUser in project musiccabinet by hakko.
the class StarService method unstarAlbum.
public void unstarAlbum(String lastFmUsername, int albumId) {
LastFmUser lastFmUser = getLastFmUser(lastFmUsername);
starDao.unstarAlbum(lastFmUser, albumId);
getStarredAlbumIds(lastFmUser).remove(albumId);
}
use of com.github.hakko.musiccabinet.domain.model.library.LastFmUser in project musiccabinet by hakko.
the class StarService method starAlbum.
public void starAlbum(String lastFmUsername, int albumId) {
LastFmUser lastFmUser = getLastFmUser(lastFmUsername);
starDao.starAlbum(lastFmUser, albumId);
getStarredAlbumIds(lastFmUser).add(albumId);
}
use of com.github.hakko.musiccabinet.domain.model.library.LastFmUser in project musiccabinet by hakko.
the class StarService method unstarTrack.
public void unstarTrack(String lastFmUsername, int trackId) throws ApplicationException {
LastFmUser lastFmUser = getLastFmUser(lastFmUsername);
starDao.unstarTrack(lastFmUser, trackId);
getStarredTracks(lastFmUser).remove(trackId);
if (lastFmSettingsService.isSyncStarredAndLovedTracks()) {
trackUnLoveClient.unlove(browserDao.getTrack(trackId), lastFmUser);
}
}
use of com.github.hakko.musiccabinet.domain.model.library.LastFmUser in project musiccabinet by hakko.
the class StarService method starTrack.
public void starTrack(String lastFmUsername, int trackId) throws ApplicationException {
LastFmUser lastFmUser = getLastFmUser(lastFmUsername);
starDao.starTrack(lastFmUser, trackId);
getStarredTracks(lastFmUser).add(trackId);
if (lastFmSettingsService.isSyncStarredAndLovedTracks()) {
trackLoveClient.love(browserDao.getTrack(trackId), lastFmUser);
}
}
use of com.github.hakko.musiccabinet.domain.model.library.LastFmUser 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();
}
}
Aggregations