feat: video download

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-11-06 12:12:32 +08:00
parent 976622df89
commit ffd4f9ee73
92 changed files with 4853 additions and 946 deletions

29
lib/utils/path_utils.dart Normal file
View File

@@ -0,0 +1,29 @@
import 'dart:io' show Platform;
import 'package:path/path.dart' as path;
late final String tmpDirPath;
late final String appSupportDirPath;
late String downloadPath;
String get defDownloadPath =>
path.join(appSupportDirPath, PathUtils.downloadDir);
abstract final class PathUtils {
static const videoNameType1 = '0.mp4';
static const _fileExt = '.m4s';
static const audioNameType2 = 'audio$_fileExt';
static const videoNameType2 = 'video$_fileExt';
static const downloadDir = 'download';
static String buildShadersAbsolutePath(
String baseDirectory,
List<String> shaders,
) {
return shaders
.map((shader) => path.join(baseDirectory, shader))
.join(Platform.isWindows ? ';' : ':');
}
}