mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 10:00:27 +00:00
feat: add FFmpeg WASM runtime (#1512)
This commit is contained in:
31 files changed
+2305
-24
No files matched your search
@@ -299,8 +299,9 @@ TaskAssetType _assetType(String name, {required bool isFolder, required api_task
|
||||
}
|
||||
|
||||
String _fileExtension(String name) {
|
||||
final pathWithoutQuery = name.split(RegExp(r'[?#]')).first;
|
||||
final extension = path.extension(pathWithoutQuery).replaceFirst('.', '').toLowerCase();
|
||||
final uri = Uri.tryParse(name);
|
||||
final filePath = uri != null && uri.hasScheme && uri.hasAuthority ? uri.path : name;
|
||||
final extension = path.extension(filePath).replaceFirst('.', '').toLowerCase();
|
||||
return extension.length <= 10 ? extension : '';
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user