mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
fix: filter video definitions 2
This commit is contained in:
1 parent
ed9b61c97d
commit
32dbd866d4
2 files changed
+3
-2
No files matched your search
@@ -128,7 +128,6 @@ export async function videos(production: boolean) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const content = Object.entries(videos)
|
const content = Object.entries(videos)
|
||||||
.filter(([_, { videos }]) => videos.length > 0)
|
|
||||||
.map(
|
.map(
|
||||||
([id, { videos, lastUpdated }]) =>
|
([id, { videos, lastUpdated }]) =>
|
||||||
`${id},${lastUpdated},${videos.join(',')}`,
|
`${id},${lastUpdated},${videos.join(',')}`,
|
||||||
|
|||||||
@@ -13,7 +13,9 @@ export const videoDefinitions = fetch(asset('definitions/videos.csv'))
|
|||||||
text
|
text
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.map((line) => {
|
.map((line) => {
|
||||||
const [idString, lastUpdatedString, ...videos] = line.split(',');
|
const [idString, lastUpdatedString, ...videos] = line
|
||||||
|
.split(',')
|
||||||
|
.filter(Boolean);
|
||||||
const id = Number(idString);
|
const id = Number(idString);
|
||||||
const lastUpdated = Number(lastUpdatedString);
|
const lastUpdated = Number(lastUpdatedString);
|
||||||
return { id, videos, lastUpdated };
|
return { id, videos, lastUpdated };
|
||||||
|
|||||||
Reference in new issue
Block a user