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
b151c7483a
commit
be8d565545
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)
|
||||
.filter(([_, { videos }]) => videos.length > 0)
|
||||
.map(
|
||||
([id, { videos, lastUpdated }]) =>
|
||||
`${id},${lastUpdated},${videos.join(',')}`,
|
||||
|
||||
@@ -13,7 +13,9 @@ export const videoDefinitions = fetch(asset('definitions/videos.csv'))
|
||||
text
|
||||
.split('\n')
|
||||
.map((line) => {
|
||||
const [idString, lastUpdatedString, ...videos] = line.split(',');
|
||||
const [idString, lastUpdatedString, ...videos] = line
|
||||
.split(',')
|
||||
.filter(Boolean);
|
||||
const id = Number(idString);
|
||||
const lastUpdated = Number(lastUpdatedString);
|
||||
return { id, videos, lastUpdated };
|
||||
|
||||
Reference in new issue
Block a user