opt: buvid3

This commit is contained in:
My-Responsitories
2025-05-11 00:29:03 +08:00
parent ab57aee8c1
commit 17ea416c98

View File

@@ -76,10 +76,12 @@ class LoginAccount implements Account {
this.accessKey, this.accessKey,
this.refresh, [ this.refresh, [
Set<AccountType>? type, Set<AccountType>? type,
]) : type = type ?? {}; ]) : type = type ?? {} {
cookieJar.setBuvid3();
}
factory LoginAccount.fromJson(Map<String, dynamic> json) => LoginAccount( factory LoginAccount.fromJson(Map<String, dynamic> json) => LoginAccount(
BiliCookieJar.fromJson(json['cookies'])..setBuvid3(), BiliCookieJar.fromJson(json['cookies']),
json['accessKey'], json['accessKey'],
json['refresh'], json['refresh'],
(json['type'] as Iterable?)?.map((i) => AccountType.values[i]).toSet(), (json['type'] as Iterable?)?.map((i) => AccountType.values[i]).toSet(),