diff --git a/lib/screens/artist_screen.dart b/lib/screens/artist_screen.dart index a1c37333..8ad6bf03 100644 --- a/lib/screens/artist_screen.dart +++ b/lib/screens/artist_screen.dart @@ -343,7 +343,7 @@ class _ArtistScreenState extends ConsumerState { .where((a) => a.albumType == 'album') .toList(growable: false); _singlesBucket = albums - .where((a) => a.albumType == 'single') + .where((a) => a.albumType == 'single' || a.albumType == 'ep') .toList(growable: false); _compilationsBucket = albums .where((a) => a.albumType == 'compilation') @@ -414,6 +414,7 @@ class _ArtistScreenState extends ConsumerState { context.l10n.artistSingles, singles, colorScheme, + showTypeBadge: true, ), ), if (compilations.isNotEmpty) @@ -1523,8 +1524,9 @@ class _ArtistScreenState extends ConsumerState { Widget _buildAlbumSection( String title, List albums, - ColorScheme colorScheme, - ) { + ColorScheme colorScheme, { + bool showTypeBadge = false, + }) { final sectionHeight = _artistAlbumSectionHeight(); final tileSize = _artistAlbumTileSize(); @@ -1555,6 +1557,7 @@ class _ArtistScreenState extends ConsumerState { colorScheme, tileSize: tileSize, sectionHeight: sectionHeight, + showTypeBadge: showTypeBadge, ), ); }, @@ -1569,6 +1572,7 @@ class _ArtistScreenState extends ConsumerState { ColorScheme colorScheme, { required double tileSize, required double sectionHeight, + bool showTypeBadge = false, }) { final isSelected = _selectedAlbumIds.contains(album.id); @@ -1681,6 +1685,29 @@ class _ArtistScreenState extends ConsumerState { : null, ), ), + if (showTypeBadge) + Positioned( + left: 6, + bottom: 6, + child: Container( + padding: const EdgeInsets.symmetric( + horizontal: 6, + vertical: 2, + ), + decoration: BoxDecoration( + color: Colors.black.withValues(alpha: 0.7), + borderRadius: BorderRadius.circular(4), + ), + child: Text( + album.albumType == 'ep' ? 'EP' : 'Single', + style: const TextStyle( + color: Colors.white, + fontSize: 10, + fontWeight: FontWeight.w600, + ), + ), + ), + ), ], ), const SizedBox(height: 8),