mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: copy/move toview
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -127,6 +127,10 @@ class Api {
|
||||
|
||||
static const String moveFav = '/x/v3/fav/resource/move';
|
||||
|
||||
static const String copyToview = '/x/v2/history/toview/copy';
|
||||
|
||||
static const String moveToview = '/x/v2/history/toview/move';
|
||||
|
||||
// 视频详情页 相关视频
|
||||
static const String relatedList = '/x/web-interface/archive/related';
|
||||
|
||||
|
||||
@@ -678,13 +678,20 @@ class VideoHttp {
|
||||
|
||||
static Future copyOrMoveFav({
|
||||
required bool isCopy,
|
||||
required bool isFav,
|
||||
required dynamic srcMediaId,
|
||||
required dynamic tarMediaId,
|
||||
dynamic mid,
|
||||
required List resources,
|
||||
}) async {
|
||||
var res = await Request().post(
|
||||
isCopy ? Api.copyFav : Api.moveFav,
|
||||
isFav
|
||||
? isCopy
|
||||
? Api.copyFav
|
||||
: Api.moveFav
|
||||
: isCopy
|
||||
? Api.copyToview
|
||||
: Api.moveToview,
|
||||
data: {
|
||||
if (srcMediaId != null) 'src_media_id': srcMediaId,
|
||||
'tar_media_id': tarMediaId,
|
||||
|
||||
Reference in New Issue
Block a user