Change upload limit to a variable to better handle site differences.

`const TV_PUBLISH_SIZE_LIMIT_STR_GB = '2';`

The above needs to be changed when merging into Odysee.
This commit is contained in:
infiinte-persistence 2021-02-11 13:25:44 +08:00 committed by Sean Yesmunt
parent 4b8f2dfdd6
commit 642e872296
2 changed files with 7 additions and 6 deletions

View file

@ -974,7 +974,7 @@
"You will not see reposts by people you follow or receive email notifying about them.": "You will not see reposts by people you follow or receive email notifying about them.",
"Sorry, your request timed out. Modify your options or %again%": "Sorry, your request timed out. Modify your options or %again%",
"Pause at any time to select a thumbnail from your video": "Pause at any time to select a thumbnail from your video",
"For video content, use MP4s in H264/AAC format and a friendly bitrate (under 5 Mbps) and resolution (720p) for more reliable streaming. %SITE_NAME% uploads are restricted to 2 GB.": "For video content, use MP4s in H264/AAC format and a friendly bitrate (under 5 Mbps) and resolution (720p) for more reliable streaming. %SITE_NAME% uploads are restricted to 2 GB.",
"For video content, use MP4s in H264/AAC format and a friendly bitrate (under 5 Mbps) and resolution (720p) for more reliable streaming. %SITE_NAME% uploads are restricted to %limit% GB.": "For video content, use MP4s in H264/AAC format and a friendly bitrate (under 5 Mbps) and resolution (720p) for more reliable streaming. %SITE_NAME% uploads are restricted to %limit% GB.",
"Share this channel": "Share this channel",
"File preview": "File preview",
"Go Home": "Go Home",
@ -1064,7 +1064,7 @@
"minute": "minute",
"hours": "hours",
"hour": "hour",
"%SITE_NAME% uploads are limited to 2 GB. Download the app for unrestricted publishing.": "%SITE_NAME% uploads are limited to 2 GB. Download the app for unrestricted publishing.",
"%SITE_NAME% uploads are limited to %limit% GB. Download the app for unrestricted publishing.": "%SITE_NAME% uploads are limited to %limit% GB. Download the app for unrestricted publishing.",
"Connected": "Connected",
"Not connected": "Not connected",
"this link": "this link",

View file

@ -74,9 +74,10 @@ function PublishFile(props: Props) {
const RECOMMENDED_BITRATE = 6000000;
const TV_PUBLISH_SIZE_LIMIT: number = 2147483648;
const TV_PUBLISH_SIZE_LIMIT_STR_GB = '2';
const UPLOAD_SIZE_MESSAGE = __(
'%SITE_NAME% uploads are limited to 2 GB. Download the app for unrestricted publishing.',
{ SITE_NAME }
'%SITE_NAME% uploads are limited to %limit% GB. Download the app for unrestricted publishing.',
{ SITE_NAME, limit: TV_PUBLISH_SIZE_LIMIT_STR_GB }
);
const PROCESSING_MB_PER_SECOND = 0.5;
const MINUTES_THRESHOLD = 30;
@ -196,8 +197,8 @@ function PublishFile(props: Props) {
return (
<p className="help">
{__(
'For video content, use MP4s in H264/AAC format and a friendly bitrate (under 5 Mbps) and resolution (720p) for more reliable streaming. %SITE_NAME% uploads are restricted to 2 GB.',
{ SITE_NAME }
'For video content, use MP4s in H264/AAC format and a friendly bitrate (under 5 Mbps) and resolution (720p) for more reliable streaming. %SITE_NAME% uploads are restricted to %limit% GB.',
{ SITE_NAME, limit: TV_PUBLISH_SIZE_LIMIT_STR_GB }
)}{' '}
<Button button="link" label={__('Upload Guide')} href="https://lbry.com/faq/video-publishing-guide" />
</p>