* tweak

* opt: image quality

* opt: VideoPlayerServiceHandler

* fixes

* update

Signed-off-by: dom <githubaccount56556@proton.me>

* fix get file name

Signed-off-by: dom <githubaccount56556@proton.me>

---------

Co-authored-by: dom <githubaccount56556@proton.me>
This commit is contained in:
My-Responsitories
2026-01-25 15:21:33 +08:00
committed by GitHub
parent 219228f8b5
commit 038f03a4e7
10 changed files with 64 additions and 49 deletions

View File

@@ -162,9 +162,14 @@ abstract final class Utils {
return randomBase64.substring(0, randomBase64.length - 2);
}
static int _getExt(String uri) {
final i = uri.indexOf('?');
return i == -1 ? uri.length : i;
}
static String getFileName(String uri, {bool fileExt = true}) {
final i0 = uri.lastIndexOf('/') + 1;
final i1 = fileExt ? uri.length : uri.lastIndexOf('.');
final i1 = fileExt ? _getExt(uri) : uri.lastIndexOf('.');
return uri.substring(i0, i1);
}