From 16b627bfcbd728f6bd9e03bae0a7df2ebc4143fe Mon Sep 17 00:00:00 2001 From: Micah Morrison Date: Mon, 2 Feb 2026 18:10:56 -0500 Subject: [PATCH] Show unwatched episode count on shows/seasons --- lib/widgets/media_card.dart | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/widgets/media_card.dart b/lib/widgets/media_card.dart index dd15230b..cb58698a 100644 --- a/lib/widgets/media_card.dart +++ b/lib/widgets/media_card.dart @@ -731,6 +731,27 @@ class _MediaCardHelpers { child: AppIcon(Symbols.check_rounded, fill: 1, color: tokens(context).bg, size: 16), ), ), + if (!metadata.isWatched && + (metadata.mediaType == PlexMediaType.show || metadata.mediaType == PlexMediaType.season) && + (metadata.leafCount != null && metadata.leafCount! > 0 && metadata.viewedLeafCount != null)) + Positioned( + top: 4, + right: 4, + child: Container( + width: 24, + height: 24, + decoration: BoxDecoration( + color: tokens(context).text, + shape: BoxShape.circle, + boxShadow: [BoxShadow(color: Colors.black.withValues(alpha: 0.3), blurRadius: 4)], + ), + alignment: Alignment.center, + child: Text( + '${metadata.leafCount! - metadata.viewedLeafCount!}', + style: TextStyle(color: tokens(context).bg, fontSize: 12, fontWeight: FontWeight.bold), + ), + ), + ), // Progress bar for partially watched content (episodes/movies) if (metadata.viewOffset != null && metadata.duration != null && metadata.viewOffset! > 0 && !metadata.isWatched) Positioned(