mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-24 11:06:51 +08:00
refa fav video
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -102,11 +102,9 @@ class Api {
|
||||
// csrf str CSRF Token(位于cookie) Cookie方式必要
|
||||
// https://api.bilibili.com/medialist/gateway/coll/resource/deal
|
||||
// https://api.bilibili.com/x/v3/fav/resource/deal
|
||||
static const String favVideo = '/x/v3/fav/resource/deal';
|
||||
static const String favVideo = '/x/v3/fav/resource/batch-deal';
|
||||
|
||||
// static const String favBangumi = '/x/v3/fav/resource/batch-deal';
|
||||
|
||||
static const String delFav = '/x/v3/fav/resource/batch-del';
|
||||
static const String unfavAll = '/x/v3/fav/resource/unfav-all';
|
||||
|
||||
static const String copyFav = '/x/v3/fav/resource/copy';
|
||||
|
||||
|
||||
@@ -593,16 +593,17 @@ class FavHttp {
|
||||
}
|
||||
|
||||
// (取消)收藏
|
||||
static Future delFav({
|
||||
List? ids,
|
||||
static Future favVideo({
|
||||
required String resources,
|
||||
String? addIds,
|
||||
String? delIds,
|
||||
}) async {
|
||||
var res = await Request().post(
|
||||
Api.delFav,
|
||||
Api.favVideo,
|
||||
data: {
|
||||
'resources': ids?.join(','),
|
||||
'media_id': delIds,
|
||||
'platform': 'web',
|
||||
'resources': resources,
|
||||
'add_media_ids': addIds ?? '',
|
||||
'del_media_ids': delIds ?? '',
|
||||
'csrf': Accounts.main.csrf,
|
||||
},
|
||||
options: Options(contentType: Headers.formUrlEncodedContentType),
|
||||
@@ -615,19 +616,15 @@ class FavHttp {
|
||||
}
|
||||
|
||||
// (取消)收藏
|
||||
static Future favVideo({
|
||||
int? aid,
|
||||
String? addIds,
|
||||
String? delIds,
|
||||
int? type,
|
||||
static Future unfavAll({
|
||||
required rid,
|
||||
required type,
|
||||
}) async {
|
||||
var res = await Request().post(
|
||||
Api.favVideo,
|
||||
Api.unfavAll,
|
||||
data: {
|
||||
'rid': aid,
|
||||
'type': type ?? 2,
|
||||
'add_media_ids': addIds ?? '',
|
||||
'del_media_ids': delIds ?? '',
|
||||
'rid': rid,
|
||||
'type': type,
|
||||
'csrf': Accounts.main.csrf,
|
||||
},
|
||||
options: Options(contentType: Headers.formUrlEncodedContentType),
|
||||
|
||||
Reference in New Issue
Block a user