refactor: share focus chrome and simplify the TV picker and browse paths
Focus chrome was implemented twice, once in the focusable wrapper and once in the focus builders; both now go through FocusChrome. TvColorPicker's channel row was a copy of TvNumberSpinner and is now that widget in compact density. Also trims unused helpers and fields and simplifies the Jellyfin browse paths.
This commit is contained in:
@@ -26,17 +26,6 @@ class ContentTypeHelper {
|
||||
|
||||
static bool isVideoContent(String type) => ContentTypes.videoTypes.contains(type.toLowerCase());
|
||||
|
||||
static bool isMusicLibrary(dynamic lib) {
|
||||
if (lib == null) return false;
|
||||
try {
|
||||
// ignore: avoid_dynamic_calls — duck-typed across library shapes
|
||||
final type = (lib as dynamic).kind?.id as String?;
|
||||
return type?.toLowerCase() == ContentTypes.artist;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static IconData getLibraryIcon(String type) {
|
||||
switch (type.toLowerCase()) {
|
||||
case ContentTypes.movie:
|
||||
|
||||
@@ -18,12 +18,8 @@ class ScreenBreakpoints {
|
||||
|
||||
static bool isTablet(double width) => width >= mobile && width < desktop;
|
||||
|
||||
static bool isWideTablet(double width) => width >= wideTablet && width < desktop;
|
||||
|
||||
static bool isDesktop(double width) => width >= desktop && width < largeDesktop;
|
||||
|
||||
static bool isLargeDesktop(double width) => width >= largeDesktop;
|
||||
|
||||
static bool isDesktopOrLarger(double width) => width >= desktop;
|
||||
|
||||
static bool isWideTabletOrLarger(double width) => width >= wideTablet;
|
||||
|
||||
@@ -18,10 +18,4 @@ class PlexCacheParser {
|
||||
if (list == null || list.isEmpty) return null;
|
||||
return list.first as Map<String, dynamic>;
|
||||
}
|
||||
|
||||
static List<dynamic>? extractChapters(Map<String, dynamic>? cached) {
|
||||
final metadata = extractFirstMetadata(cached);
|
||||
if (metadata == null) return null;
|
||||
return metadata['Chapter'] as List?;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user