temp fix für rekursion

pull/24/head
eric 2025-08-07 15:03:06 +02:00
parent 938788715c
commit 13eafaf06a
1 changed files with 13 additions and 13 deletions

View File

@ -72,19 +72,19 @@ package eric.Roullette.service;
}
try {
// GetCurrentUsersRecentlyPlayedTracksRequest request = userApi.getCurrentUsersRecentlyPlayedTracks()
// .limit(limit)
// .build();
// PagingCursorbased<PlayHistory> history = request.execute();
// if (history == null || history.getItems() == null) {
// return Collections.emptyList();
// }
// return Arrays.stream(history.getItems())
// .map(item -> item.getTrack().getUri())
//
// .toList();
// Verwende die limitierte Methode, um die Anzahl der Tracks zu begrenzen
return getRecentTracksLimit(userApi, limit);
GetCurrentUsersRecentlyPlayedTracksRequest request = userApi.getCurrentUsersRecentlyPlayedTracks()
.limit(limit)
.build();
PagingCursorbased<PlayHistory> history = request.execute();
if (history == null || history.getItems() == null) {
return Collections.emptyList();
}
return Arrays.stream(history.getItems())
.map(item -> item.getTrack().getUri())
.toList();
// Verwende die limitierte Methode, um die Anzahl der Tracks zu begrenzen
// return getRecentTracksLimit(userApi, limit);
} catch (IOException | SpotifyWebApiException | ParseException e) {
e.printStackTrace();
return Collections.emptyList();