mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: view pgc
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -39,6 +39,20 @@ class Utils {
|
||||
|
||||
static const channel = MethodChannel("PiliPlus");
|
||||
|
||||
static bool viewPgcFromUri(String uri) {
|
||||
String? id = RegExp(r'(ep|ss)\d+').firstMatch(uri)?.group(0);
|
||||
if (id != null) {
|
||||
bool isSeason = id.startsWith('ss');
|
||||
id = id.substring(2);
|
||||
Utils.viewBangumi(
|
||||
seasonId: isSeason ? id : null,
|
||||
epId: isSeason ? null : id,
|
||||
);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static void showCopyTextDialog(text) {
|
||||
Get.dialog(
|
||||
AlertDialog(
|
||||
|
||||
Reference in New Issue
Block a user