-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 支持拉取群相册详情内容,初步解决上传视频后无法取得URL的问题
- Loading branch information
Showing
5 changed files
with
394 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package album | ||
|
||
import ( | ||
"errors" | ||
"strconv" | ||
|
||
"github.com/LagrangeDev/LagrangeGo/client/packets/pb/service/album" | ||
"github.com/LagrangeDev/LagrangeGo/internal/proto" | ||
"github.com/LagrangeDev/LagrangeGo/utils" | ||
) | ||
|
||
func BuildGetMediaListReq(selfUin uint32, groupUin uint32, albumId string, pageInfo string) ([]byte, error) { | ||
return proto.Marshal(&album.QzoneGetMediaList{ | ||
Field1: 0, | ||
Field2: "h5_test", | ||
Field3: "h5_test", | ||
Field4: &album.QzoneGetMediaList_F4{ | ||
GroupID: strconv.Itoa(int(groupUin)), | ||
AlbumID: albumId, | ||
Field3: 0, | ||
Field4: "", | ||
PageInfo: pageInfo, | ||
}, | ||
UinTimeStamp: utils.GenerateUinTimestamp(selfUin), | ||
Field10: &album.QzoneGetMediaList_F10{ | ||
AppIdFlag: "fc-appid", | ||
AppIdValue: "100", | ||
}, | ||
}) | ||
} | ||
|
||
func ParseGetMediaListResp(data []byte) (resp *album.QzoneGetMediaList_Response, err error) { | ||
resp = &album.QzoneGetMediaList_Response{} | ||
if err = proto.Unmarshal(data, resp); err != nil { | ||
return nil, err | ||
} | ||
if resp.ErrorCode.IsSome() && resp.ErrorMsg.IsSome() { | ||
return nil, errors.New(resp.ErrorMsg.Unwrap()) | ||
} | ||
return resp, nil | ||
} |
131 changes: 131 additions & 0 deletions
131
client/packets/pb/service/album/QunMedia_GetMediaList.pb.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.