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?)
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!
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 :
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!
Should be fixed by
4ec8960451
, currently in testingTests successful, released in v0.5 ;-)