diff --git a/lib/components/album/album_card.dart b/lib/components/album/album_card.dart index c7ae2f9a0..4d2e12d65 100644 --- a/lib/components/album/album_card.dart +++ b/lib/components/album/album_card.dart @@ -21,8 +21,8 @@ class AlbumCard extends HookConsumerWidget { final AlbumSimple album; const AlbumCard( this.album, { - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context, ref) { diff --git a/lib/pages/album/album.dart b/lib/pages/album/album.dart index 6cba99f68..4578aea22 100644 --- a/lib/pages/album/album.dart +++ b/lib/pages/album/album.dart @@ -47,7 +47,6 @@ class AlbumPage extends HookConsumerWidget { image: TypeConversionUtils.image_X_UrlString( album.images, placeholder: ImagePlaceholder.albumArt, - index: 0, ), title: album.name!, description: diff --git a/lib/utils/type_conversion_utils.dart b/lib/utils/type_conversion_utils.dart index 662b611c1..cd594a2a3 100644 --- a/lib/utils/type_conversion_utils.dart +++ b/lib/utils/type_conversion_utils.dart @@ -2,6 +2,7 @@ import 'dart:io'; +import 'package:collection/collection.dart'; import 'package:flutter/widgets.dart' hide Image; import 'package:metadata_god/metadata_god.dart'; import 'package:path/path.dart'; @@ -32,8 +33,12 @@ abstract class TypeConversionUtils { "https://avatars.dicebear.com/api/bottts/${PrimitiveUtils.uuid.v4()}.png", }[placeholder]!; - return images != null && images.isNotEmpty - ? images[index > images.length - 1 ? images.length - 1 : index].url! + final sortedImage = images?.sorted((a, b) => a.width!.compareTo(b.width!)); + + return sortedImage != null && sortedImage.isNotEmpty + ? sortedImage[ + index > sortedImage.length - 1 ? sortedImage.length - 1 : index] + .url! : placeholderUrl; } diff --git a/untranslated_messages.json b/untranslated_messages.json index 14eead0f7..a6724f2bf 100644 --- a/untranslated_messages.json +++ b/untranslated_messages.json @@ -299,6 +299,36 @@ "browse_anonymously" ], + "ko": [ + "sort_duration", + "start_a_radio", + "how_to_start_radio", + "replace_queue_question", + "endless_playback", + "delete_playlist", + "delete_playlist_confirmation", + "local_tracks", + "song_link", + "skip_this_nonsense", + "freedom_of_music", + "freedom_of_music_palm", + "get_started", + "youtube_source_description", + "piped_source_description", + "jiosaavn_source_description", + "highest_quality", + "select_audio_source", + "endless_playback_description", + "choose_your_region", + "choose_your_region_description", + "choose_your_language", + "help_project_grow", + "help_project_grow_description", + "contribute_on_github", + "donate_on_open_collective", + "browse_anonymously" + ], + "ne": [ "sort_duration", "start_a_radio",