mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
* opt: save pb danmaku * refa: download video * opt: replaceAll * fix: wait delete * opt: remove completer * fix: index.json * tweaks Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> --------- Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
32 lines
823 B
Dart
32 lines
823 B
Dart
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 coverName = 'cover.jpg';
|
|
static const danmakuName = 'danmaku.pb';
|
|
static const downloadDir = 'download';
|
|
|
|
static String buildShadersAbsolutePath(
|
|
String baseDirectory,
|
|
List<String> shaders,
|
|
) {
|
|
return shaders
|
|
.map((shader) => path.join(baseDirectory, shader))
|
|
.join(Platform.isWindows ? ';' : ':');
|
|
}
|
|
}
|