#3 Impossible to plan video sooner than 4 hours before publication

Closed
opened 6 years ago by LecygneNoir · 3 comments
Owner

At the moment, the Peertube token expires after 4 hours.

As we use the same token for upload and for publish the video, it the user choose to publish video in more than 4 hours in the future, it doesn't work.

We need to work on a solution to use prismedia credential to get a new token and use it for publication.

Main problem here is we do not know if prismedia is launched with local python, virtualenv, ... so it's hard to guess what is needed in cron to launch prisemdia correctly.

Either way we need to :

  • detect how prismedia is launched and use it inside the cron ie: "prismedia_upload --peertube-token"
  • OR store somewhere peertube credentials and use them to generate a new token in place (could be difficult with only the help a curl?)
At the moment, the Peertube token expires after 4 hours. As we use the same token for upload and for publish the video, it the user choose to publish video in more than 4 hours in the future, it doesn't work. We need to work on a solution to use prismedia credential to get a new token and use it for publication. Main problem here is we do not know if prismedia is launched with local python, virtualenv, ... so it's hard to guess what is needed in cron to launch prisemdia correctly. Either way we need to : - detect how prismedia is launched and use it inside the cron ie: "prismedia_upload --peertube-token" - OR store somewhere peertube credentials and use them to generate a new token in place (could be difficult with only the help a curl?)
LecygneNoir added the
bug
label 6 years ago
LecygneNoir added the
enhancement
label 6 years ago
Poster
Owner

A pretty good option to solve this problem with curl is the use of refresh_token that is provided by Peertube when uploading the video!

A pretty good option to solve this problem with curl is the use of [refresh_token](https://www.oauth.com/oauth2-servers/access-tokens/refreshing-access-tokens/) that is provided by Peertube when uploading the video!
LecygneNoir closed this issue 6 years ago
LecygneNoir reopened this issue 6 years ago
Poster
Owner

Should be fixed by 4ec8960451 , currently in testing

Should be fixed by https://git.lecygnenoir.info/LecygneNoir/prismedia/commit/4ec8960451ed2088a19e6c611cf9767ae7892186 , currently in testing
Poster
Owner

Tests successful, released in v0.5 ;-)

Tests successful, released in v0.5 ;-)
LecygneNoir closed this issue 6 years ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.