mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-02 10:23:33 +00:00
build: change of package name
This commit is contained in:
parent
49afdbe4eb
commit
b76a38cb30
274 changed files with 1981 additions and 2161 deletions
|
|
@ -0,0 +1,29 @@
|
|||
package com.cappielloantonio.tempo.util;
|
||||
|
||||
import androidx.annotation.OptIn;
|
||||
import androidx.media3.common.util.UnstableApi;
|
||||
|
||||
import com.cappielloantonio.tempo.subsonic.models.Artist;
|
||||
import com.cappielloantonio.tempo.subsonic.models.Index;
|
||||
import com.cappielloantonio.tempo.subsonic.models.Indexes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@OptIn(markerClass = UnstableApi.class)
|
||||
public class IndexUtil {
|
||||
public static List<Artist> getArtist(Indexes indexes) {
|
||||
if (indexes.getIndices() == null) return Collections.emptyList();
|
||||
|
||||
ArrayList<Artist> toReturn = new ArrayList<>();
|
||||
|
||||
for (Index index : indexes.getIndices()) {
|
||||
if (index.getArtists() != null) {
|
||||
toReturn.addAll(index.getArtists());
|
||||
}
|
||||
}
|
||||
|
||||
return toReturn;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue