diff --git a/lib/services/jellyfin_client/parts/collections.dart b/lib/services/jellyfin_client/parts/collections.dart index 2bb9fa01..9e89bc26 100644 --- a/lib/services/jellyfin_client/parts/collections.dart +++ b/lib/services/jellyfin_client/parts/collections.dart @@ -6,11 +6,6 @@ mixin _JellyfinCollectionMethods on MediaServerCacheMixin { List _mapItems(Iterable> items); static const int _collectionsPageSize = 36; - static const String _collectionBrowseFields = 'ChildCount,SortName,Overview'; - static const Map _collectionImageQueryParameters = { - 'EnableImageTypes': 'Primary', - 'ImageTypeLimit': '1', - }; String? _boxSetsViewId; @@ -53,9 +48,8 @@ mixin _JellyfinCollectionMethods on MediaServerCacheMixin { 'Limit': pageSize.toString(), 'SortBy': 'SortName', 'SortOrder': 'Ascending', - 'Fields': _collectionBrowseFields, - 'EnableTotalRecordCount': 'false', - ..._collectionImageQueryParameters, + 'Fields': _browseFields, + ...jellyfinImageQueryParameters, }, abort: abort, ); diff --git a/test/services/jellyfin_client_urls_test.dart b/test/services/jellyfin_client_urls_test.dart index fbde6e58..b3d63aa5 100644 --- a/test/services/jellyfin_client_urls_test.dart +++ b/test/services/jellyfin_client_urls_test.dart @@ -1736,9 +1736,12 @@ void main() { expect(itemsRequest.queryParameters['Limit'], '36'); expect(itemsRequest.queryParameters['SortBy'], 'SortName'); expect(itemsRequest.queryParameters['SortOrder'], 'Ascending'); - expect(itemsRequest.queryParameters['Fields'], 'ChildCount,SortName,Overview'); - expect(itemsRequest.queryParameters['EnableTotalRecordCount'], 'false'); - expect(itemsRequest.queryParameters['EnableImageTypes'], 'Primary'); + expect( + itemsRequest.queryParameters['Fields'], + 'RecursiveItemCount,ChildCount,UserData,PremiereDate,OriginalTitle,SortName,Overview', + ); + expect(itemsRequest.queryParameters.containsKey('EnableTotalRecordCount'), isFalse); + expect(itemsRequest.queryParameters['EnableImageTypes'], 'Primary,Backdrop,Thumb,Logo'); expect(itemsRequest.queryParameters['ImageTypeLimit'], '1'); }); @@ -1783,7 +1786,7 @@ void main() { expect(itemsRequest!.queryParameters['ParentId'], 'lib-boxsets'); expect(itemsRequest!.queryParameters['StartIndex'], '20'); expect(itemsRequest!.queryParameters['Limit'], '10'); - expect(itemsRequest!.queryParameters['EnableTotalRecordCount'], 'false'); + expect(itemsRequest!.queryParameters.containsKey('EnableTotalRecordCount'), isFalse); }); test('fetchCollectionsPage uses sentinel total when total count is missing', () async {