mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-08-05 10:10:14 +08:00
@@ -14,8 +14,8 @@ import 'package:PiliPlus/models_new/download/bili_download_entry_info.dart';
|
||||
import 'package:PiliPlus/pages/common/multi_select/base.dart';
|
||||
import 'package:PiliPlus/pages/download/downloading/view.dart';
|
||||
import 'package:PiliPlus/services/download/download_service.dart';
|
||||
import 'package:PiliPlus/utils/cache_manager.dart';
|
||||
import 'package:PiliPlus/utils/duration_utils.dart';
|
||||
import 'package:PiliPlus/utils/extension/num_ext.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
import 'package:PiliPlus/utils/path_utils.dart';
|
||||
import 'package:PiliPlus/utils/platform_utils.dart';
|
||||
@@ -328,7 +328,7 @@ class DetailItem extends StatelessWidget {
|
||||
left: 0,
|
||||
bottom: 0,
|
||||
child: Text(
|
||||
'${CacheManager.formatSize(entry.totalBytes)}${entry.ownerName != null ? ' ${entry.ownerName}' : ''}',
|
||||
'${entry.totalBytes.formatSize}${entry.ownerName != null ? ' ${entry.ownerName}' : ''}',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
height: 1.6,
|
||||
@@ -365,7 +365,7 @@ class DetailItem extends StatelessWidget {
|
||||
DownloadStatus
|
||||
.downloading ||
|
||||
status == DownloadStatus.pause
|
||||
? '${CacheManager.formatSize(curDownload.downloadedBytes)}/${CacheManager.formatSize(curDownload.totalBytes)}'
|
||||
? '${curDownload.downloadedBytes.formatSize}/${curDownload.totalBytes.formatSize}'
|
||||
: '',
|
||||
progress: curDownload.totalBytes == 0
|
||||
? 0
|
||||
@@ -395,7 +395,7 @@ class DetailItem extends StatelessWidget {
|
||||
statusMsg: entry.status.message,
|
||||
progressStr: entry.totalBytes == 0
|
||||
? ''
|
||||
: '${CacheManager.formatSize(entry.downloadedBytes)}/${CacheManager.formatSize(entry.totalBytes)}',
|
||||
: '${entry.downloadedBytes.formatSize}/${entry.totalBytes.formatSize}',
|
||||
progress: entry.totalBytes == 0
|
||||
? 0
|
||||
: entry.downloadedBytes / entry.totalBytes,
|
||||
|
||||
@@ -17,7 +17,7 @@ import 'package:PiliPlus/pages/download/detail/view.dart';
|
||||
import 'package:PiliPlus/pages/download/detail/widgets/item.dart';
|
||||
import 'package:PiliPlus/pages/download/search/view.dart';
|
||||
import 'package:PiliPlus/services/download/download_service.dart';
|
||||
import 'package:PiliPlus/utils/cache_manager.dart';
|
||||
import 'package:PiliPlus/utils/extension/num_ext.dart';
|
||||
import 'package:PiliPlus/utils/grid.dart';
|
||||
import 'package:PiliPlus/utils/platform_utils.dart';
|
||||
import 'package:PiliPlus/utils/storage.dart';
|
||||
@@ -373,7 +373,7 @@ class _DownloadPageState extends State<DownloadPage> with GridMixin {
|
||||
mainAxisAlignment: .spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'${CacheManager.formatSize(pageInfo.entries.fold(0, (p, n) => p + n.totalBytes))} ${first.ownerName ?? ""}',
|
||||
'${pageInfo.entries.fold(0, (p, n) => p + n.totalBytes).formatSize} ${first.ownerName ?? ""}',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
height: 1.6,
|
||||
|
||||
Reference in New Issue
Block a user