Fix Kitsu

Resolved an issue where items could not be added to the tracker due to the use of an incorrect ID. This caused `parseTrackResponse()` to fail in locating the 'included' key within `jsonResponse`, leading to a null return. As a result, an exception was thrown in `tracker_widget.dart` at line 134 when accessing `widget.trackRes.title!,` triggering a _TypeError (Null check operator used on a null value)_.
This commit is contained in:
NBA2K1 2025-05-28 20:04:55 +02:00
parent 40a1697e86
commit e9af533a8d

View file

@ -179,7 +179,7 @@ class Kitsu extends _$Kitsu {
final accessToken = _getAccessToken();
final url = Uri.parse(
'${_baseUrl}library-entries?filter[${type}_id]=${track.libraryId}&filter[user_id]=$userId&include=$type',
'${_baseUrl}library-entries?filter[${type}_id]=${track.mediaId}&filter[user_id]=$userId&include=$type',
);
Response response = await _makeGetRequest(url, accessToken);
if (response.statusCode == 200) {