fixed #15;added support for downloading via bittorrent files;added new class for getting download statistics

This commit is contained in:
huangjx
2021-10-21 18:18:41 +08:00
parent c2ce945aad
commit 5037180a40
12 changed files with 190 additions and 36 deletions

View File

@@ -124,7 +124,7 @@ class Helper
'/[]/u' => '', // Literally a single quote
'/[“”«»„]/u' => '', // Double quote
'/ /' => '_', // nonbreaking space(equiv. to 0x160)
'/[^a-z0-9_\s.-]/i' => '_',
// '/[^a-z0-9_\s.-]/i' => '_',
);
return preg_replace(array_keys($replace), array_values($replace), $string);
}
@@ -286,5 +286,9 @@ class Helper
{
return (bool) self::findBinaryPath('ffmpeg');
}
// filename without extension
public static function getBasicFilename($path){
return pathinfo($path, PATHINFO_FILENAME);
}
}