Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/data/models/aggregated_library.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class AggregatedLibrary {
final String name;
final String collectionType;
final String serverId;
final double? primaryImageAspectRatio;
final Map<String, dynamic>? imageTags;
final List<String>? backdropImageTags;

Expand All @@ -11,6 +12,7 @@ class AggregatedLibrary {
required this.name,
required this.collectionType,
required this.serverId,
this.primaryImageAspectRatio,
this.imageTags,
this.backdropImageTags,
});
Expand Down
5 changes: 3 additions & 2 deletions lib/data/repositories/multi_server_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ class MultiServerRepository {
: name,
collectionType: data['CollectionType'] as String? ?? '',
serverId: session.server.id,
primaryImageAspectRatio: (data['PrimaryImageAspectRatio'] as num?)?.toDouble(),
imageTags: data['ImageTags'] != null ? Map<String, dynamic>.from(data['ImageTags'] as Map) : null,
backdropImageTags: (data['BackdropImageTags'] as List?)?.map((e) => e.toString()).toList(),
);
Expand All @@ -174,8 +175,7 @@ class MultiServerRepository {
),
);

return results.expand((e) => e).toList()
..sort((a, b) => a.name.compareTo(b.name));
return results.expand((e) => e).toList();
Comment thread
mattsigal marked this conversation as resolved.
}

Future<HomeRow> getAggregatedResume({int limit = _defaultLimit}) async {
Expand Down Expand Up @@ -694,6 +694,7 @@ class MultiServerRepository {
'Name': lib.name,
'CollectionType': lib.collectionType,
'Type': 'CollectionFolder',
if (lib.primaryImageAspectRatio != null) 'PrimaryImageAspectRatio': lib.primaryImageAspectRatio,
if (lib.imageTags != null) 'ImageTags': lib.imageTags,
if (lib.backdropImageTags != null) 'BackdropImageTags': lib.backdropImageTags,
},
Expand Down
1 change: 1 addition & 0 deletions lib/data/repositories/user_views_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class UserViewsRepository extends ChangeNotifier {
name: data['Name'] as String,
collectionType: data['CollectionType'] as String? ?? '',
serverId: data['ServerId'] as String? ?? '',
primaryImageAspectRatio: (data['PrimaryImageAspectRatio'] as num?)?.toDouble(),
imageTags: data['ImageTags'] != null ? Map<String, dynamic>.from(data['ImageTags'] as Map) : null,
backdropImageTags: (data['BackdropImageTags'] as List?)?.map((e) => e.toString()).toList(),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/screens/home/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3795,7 +3795,7 @@ class _ContentRowsState extends State<_ContentRows>
) {
if (imageType == ImageType.poster && isMyMediaRow) {
final primaryAr = item.rawData['PrimaryImageAspectRatio'] as num?;
if (primaryAr == null || primaryAr >= 1.0) {
if (primaryAr != null && primaryAr >= 1.0) {
return null;
}
}
Expand Down
Loading