This commit is contained in:
cangui 2025-06-19 20:15:23 +02:00
parent f530d9da51
commit f123e928c2

View File

@ -535,9 +535,7 @@ func (c *Client) ListFiles(ctx context.Context, parentID string) ([]File, error)
// } // }
func (c *Client) CreateTranscode(ctx context.Context, fileID string) (*StreamInfo, error) { func (c *Client) CreateTranscode(ctx context.Context, fileID string) (*StreamInfo, error) {
requestBody := map[string]string{ body := map[string]string{"id": fileID}
"id": fileID,
}
var raw struct { var raw struct {
Success bool `json:"success"` Success bool `json:"success"`
@ -558,7 +556,7 @@ func (c *Client) CreateTranscode(ctx context.Context, fileID string) (*StreamInf
} }
path := "stream/transcode/add" path := "stream/transcode/add"
if err := c.doJSON(ctx, "POST", path, nil, requestBody, &raw); err != nil { if err := c.doJSON(ctx, "POST", path, nil, body, &raw); err != nil {
return nil, err return nil, err
} }
@ -578,3 +576,4 @@ func (c *Client) CreateTranscode(ctx context.Context, fileID string) (*StreamInf