mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-26 02:58:39 +00:00
@@ -332,9 +332,7 @@ class _DownloadPanelState extends State<DownloadPanel> {
|
||||
int? cid;
|
||||
|
||||
String? cover;
|
||||
int? width;
|
||||
int? height;
|
||||
bool cacheWidth = false;
|
||||
bool? cacheWidth;
|
||||
|
||||
switch (episode) {
|
||||
case Part part:
|
||||
@@ -343,10 +341,7 @@ class _DownloadPanelState extends State<DownloadPanel> {
|
||||
title = part.part ?? widget.videoDetail!.title!;
|
||||
duration = part.duration;
|
||||
pubdate = part.ctime;
|
||||
if (part.dimension case final dimension?) {
|
||||
width = dimension.width;
|
||||
height = dimension.height;
|
||||
}
|
||||
cacheWidth = part.dimension?.cacheWidth;
|
||||
break;
|
||||
case ugc.EpisodeItem item:
|
||||
cid = item.cid;
|
||||
@@ -359,10 +354,7 @@ class _DownloadPanelState extends State<DownloadPanel> {
|
||||
view = stat.view;
|
||||
danmaku = stat.danmaku;
|
||||
}
|
||||
if (arc.dimension case final dimension?) {
|
||||
width = dimension.width;
|
||||
height = dimension.height;
|
||||
}
|
||||
cacheWidth = arc.dimension?.cacheWidth;
|
||||
}
|
||||
if (item.attribute == 8) {
|
||||
isCharging = true;
|
||||
@@ -379,15 +371,9 @@ class _DownloadPanelState extends State<DownloadPanel> {
|
||||
duration = item.duration == null ? null : item.duration! ~/ 1000;
|
||||
}
|
||||
pubdate = item.pubTime;
|
||||
if (item.dimension case final dimension?) {
|
||||
width = dimension.width;
|
||||
height = dimension.height;
|
||||
}
|
||||
cacheWidth = item.dimension?.cacheWidth;
|
||||
break;
|
||||
}
|
||||
if (width != null && height != null) {
|
||||
cacheWidth = width <= height;
|
||||
}
|
||||
late final primary = theme.colorScheme.primary;
|
||||
|
||||
return Padding(
|
||||
|
||||
@@ -55,6 +55,7 @@ class _LocalIntroPanelState extends State<LocalIntroPanel>
|
||||
) {
|
||||
final outline = theme.colorScheme.outline;
|
||||
final cover = File(path.join(entry.entryDirPath, PathUtils.coverName));
|
||||
final cacheWidth = entry.pageData?.cacheWidth ?? false;
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(bottom: 2),
|
||||
child: SizedBox(
|
||||
@@ -87,7 +88,12 @@ class _LocalIntroPanelState extends State<LocalIntroPanel>
|
||||
width: 140.8,
|
||||
height: 88,
|
||||
fit: BoxFit.cover,
|
||||
cacheHeight: 140.8.cacheSize(context),
|
||||
cacheWidth: cacheWidth
|
||||
? 140.8.cacheSize(context)
|
||||
: null,
|
||||
cacheHeight: cacheWidth
|
||||
? null
|
||||
: 88.cacheSize(context),
|
||||
colorBlendMode: NetworkImgLayer.reduce
|
||||
? BlendMode.modulate
|
||||
: null,
|
||||
|
||||
Reference in New Issue
Block a user