Chocobozzz / PeerTube

ActivityPub-federated video streaming platform using P2P directly in your web browser
https://joinpeertube.org/
GNU Affero General Public License v3.0
13.05k stars 1.5k forks source link

API import video tags not showing #2445

Closed Nojus741 closed 4 years ago

Nojus741 commented 4 years ago

Hello, I have made a php script to interact with the peertube api, but I am not able to set tags of the video (I'm using this api url to import: /api/v1/videos/imports).

Sending POST content:

Array
--
  | (
  | [http] => Array
  | (
  | [method] => POST
  | [header] => Authorization: Bearer (token remove due to privacy)
  | [content] => channelId=(removed due to privacy)&category=2&name=Tu+S01E04&targetUrl=https%3A%2F%2Fvxx1.filmai.in%2Fplay%2FwNT4nH8GMbZCaSZPfb-b8g%2F1580691523%2F1%2Fyou%2Fs01%2FE04_ltmeg.mp4&language=lt&privacy=3&tags%5B0%5D=tt7335184&tags%5B1%5D=WEB-DL
  | )
  |  
  | )

Return of the api, without tags as you can see:

stdClass Object
--
  | (
  | [id] => 8303
  | [targetUrl] => https://vxx1.filmai.in/play/wNT4nH8GMbZCaSZPfb-b8g/1580691523/1/you/s01/E04_ltmeg.mp4
  | [magnetUri] =>
  | [torrentName] =>
  | [state] => stdClass Object
  | (
  | [id] => 1
  | [label] => Pending
  | )
  |  
  | [error] =>
  | [updatedAt] => (removed due to privacy)
  | [createdAt] => (removed due to privacy)
  | [video] => stdClass Object
  | (
  | [id] => (removed due to privacy)
  | [uuid] => (removed due to privacy)
  | [name] => Tu S01E04
  | [category] => stdClass Object
  | (
  | [id] => 2
  | [label] => Films
  | )
  |  
  | [licence] => stdClass Object
  | (
  | [id] =>
  | [label] => Unknown
  | )
  |  
  | [language] => stdClass Object
  | (
  | [id] => lt
  | [label] => Lithuanian
  | )
  |  
  | [privacy] => stdClass Object
  | (
  | [id] => 3
  | [label] => Private
  | )
  |  
  | [nsfw] =>
  | [description] =>
  | [isLocal] => 1
  | [duration] => 0
  | [views] => 0
  | [likes] => 0
  | [dislikes] => 0
  | [thumbnailPath] =>
  | [previewPath] =>
  | [embedPath] => /videos/embed/(removed due to privacy)
  | [createdAt] => (removed due to privacy)
  | [updatedAt] => (removed due to privacy)
  | [publishedAt] => (removed due to privacy)
  | [originallyPublishedAt] => (removed due to privacy)
  | [account] => stdClass Object
  | (
  | [id] => (removed due to privacy)
  | [name] => (removed due to privacy)
  | [displayName] => (removed due to privacy)
  | [url] => (removed due to privacy)
  | [host] => (removed due to privacy)
  | [avatar] =>
  | )
  |  
  | [channel] => stdClass Object
  | (
  | [id] => (removed due to privacy)
  | [name] => (removed due to privacy)
  | [displayName] => (removed due to privacy)
  | [url] => (removed due to privacy)
  | [host] => (removed due to privacy)
  | [avatar] =>
  | )
  |  
  | [state] => stdClass Object
  | (
  | [id] => 3
  | [label] => To import
  | )
  |  
  | [waitTranscoding] =>
  | [tags] => Array
  | (
  | )
  |  
  | )
  |  
  | )
Chocobozzz commented 4 years ago

I'm sorry I don't understand your issue and I don't know PHP. Please try the forum instead (and paste the content of your script).