Fetch subtitles files from github

For en, sv, and ja.
This commit is contained in:
hunicus 2023-03-15 04:49:06 -04:00
parent cdfde05452
commit 12b605e5cc
No known key found for this signature in database
GPG key ID: 24837C51B6D81FD9
2 changed files with 9 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

View file

@ -81,8 +81,10 @@ if (configContent.BASE_MODULE && configContent.BASE_MODULE === 'liquid') {
const testnetAssetsJsonUrl = 'https://raw.githubusercontent.com/Blockstream/asset_registry_testnet_db/master/index.json';
const testnetAssetsMinimalJsonUrl = 'https://raw.githubusercontent.com/Blockstream/asset_registry_testnet_db/master/index.minimal.json';
const promoVideo = PATH + 'promo-video/mempool-promo.mp4';
const promoPrefix = PATH + 'promo-video/';
const promoVideoFile = promoPrefix + 'mempool-promo.mp4';
const promoVideoUrl = 'https://raw.githubusercontent.com/mempool/mempool-promo/master/promo.mp4';
const promoVideoLanguages = ['en','sv','ja'];
console.log('Downloading assets');
download(PATH + 'assets.json', assetsJsonUrl);
@ -92,9 +94,13 @@ console.log('Downloading testnet assets');
download(PATH + 'assets-testnet.json', testnetAssetsJsonUrl);
console.log('Downloading testnet assets minimal');
download(PATH + 'assets-testnet.minimal.json', testnetAssetsMinimalJsonUrl);
if (!fs.existsSync(promoVideo)) {
if (!fs.existsSync(promoVideoFile)) {
console.log('Downloading promo video');
download(promoVideo, promoVideoUrl);
download(promoVideoFile, promoVideoUrl);
}
console.log('Downloading promo video subtitles');
for( const l of promoVideoLanguages ) {
download(promoPrefix + l + ".vtt", "https://raw.githubusercontent.com/mempool/mempool-promo/master/subtitles/" + l + ".vtt");
}
console.log('Downloading mining pool logos');
downloadMiningPoolLogos();