Search in sources :

Example 6 with Indexes

use of org.moire.ultrasonic.domain.Indexes in project ultrasonic by ultrasonic.

the class CachedMusicService method getIndexes.

@Override
public Indexes getIndexes(String musicFolderId, boolean refresh, Context context, ProgressListener progressListener) throws Exception {
    checkSettingsChanged(context);
    if (refresh) {
        cachedIndexes.clear();
        cachedMusicFolders.clear();
        cachedMusicDirectories.clear();
    }
    Indexes result = cachedIndexes.get();
    if (result == null) {
        result = musicService.getIndexes(musicFolderId, refresh, context, progressListener);
        cachedIndexes.set(result);
    }
    return result;
}
Also used : Indexes(org.moire.ultrasonic.domain.Indexes)

Aggregations

Indexes (org.moire.ultrasonic.domain.Indexes)6 ArrayList (java.util.ArrayList)2 Artist (org.moire.ultrasonic.domain.Artist)2 File (java.io.File)1 GetArtistsResponse (org.moire.ultrasonic.api.subsonic.response.GetArtistsResponse)1 GetIndexesResponse (org.moire.ultrasonic.api.subsonic.response.GetIndexesResponse)1 MusicFolder (org.moire.ultrasonic.domain.MusicFolder)1 MusicService (org.moire.ultrasonic.service.MusicService)1 TabActivityBackgroundTask (org.moire.ultrasonic.util.TabActivityBackgroundTask)1 ArtistAdapter (org.moire.ultrasonic.view.ArtistAdapter)1