mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
Merge pull request #116 from tresabhi/main
This commit is contained in:
7 files changed
+34
-26
No files matched your search
@@ -4,7 +4,7 @@ import { parse as parseYaml } from 'yaml';
|
||||
import { readStringDVPL } from '../src/core/blitz/readStringDVPL';
|
||||
import { writeDVPL } from '../src/core/blitz/writeDVPL';
|
||||
import { secrets } from '../src/core/blitzkit/secrets';
|
||||
import { dvp } from '../submodules/closedkrieg/src/dvp';
|
||||
import { dvp } from '../submodules/blitzkit-closed/src/dvp';
|
||||
import { DATA } from './buildAssets/constants';
|
||||
|
||||
const versionTextFile = await readStringDVPL(`${DATA}/version.txt.dvpl`);
|
||||
|
||||
@@ -6,22 +6,40 @@ import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
|
||||
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
|
||||
import { toUniqueId } from '../../src/core/blitz/toUniqueId';
|
||||
import { commitAssets } from '../../src/core/blitzkit/commitAssets';
|
||||
import {
|
||||
VideoDefinitions,
|
||||
videoDefinitions,
|
||||
} from '../../src/core/blitzkit/videos';
|
||||
import { VideoDefinitions } from '../../src/core/blitzkit/videos';
|
||||
import { DATA, POI } from './constants';
|
||||
import { BlitzStrings, botPattern, VehicleDefinitionList } from './definitions';
|
||||
|
||||
const youtubers = [
|
||||
'UCKBYXp4Xn2I2tL1UL4fpbhw', // droodles
|
||||
'UCrQ-Dy8lVsm11u8pCJ8W7Tw', // fatness
|
||||
'UCxRpZqMElssTdPYDK3x7wyg', // n90
|
||||
];
|
||||
|
||||
export async function videos(production: boolean) {
|
||||
console.log('Building videos...');
|
||||
|
||||
const currentVideos = await videoDefinitions;
|
||||
const currentVideos = await fetch(
|
||||
'https://raw.githubusercontent.com/tresabhi/blitzkit-assets/main/definitions/videos.csv',
|
||||
)
|
||||
.then((response) => response.text())
|
||||
.then((lines) => {
|
||||
return lines
|
||||
.split('\n')
|
||||
.map((line) => {
|
||||
const [idString, lastUpdatedString, ...videos] = line.split(',');
|
||||
const id = Number(idString);
|
||||
const lastUpdated = Number(lastUpdatedString);
|
||||
return { id, lastUpdated, videos };
|
||||
})
|
||||
.reduce<VideoDefinitions>(
|
||||
(accumulator, { id, lastUpdated, videos }) => {
|
||||
accumulator[id] = { lastUpdated, videos };
|
||||
return accumulator;
|
||||
},
|
||||
{},
|
||||
);
|
||||
});
|
||||
const auth = await google.auth.getClient({
|
||||
scopes: ['https://www.googleapis.com/auth/youtube.readonly'],
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user