mirror of
https://github.com/iptv-org/epg
synced 2025-12-17 10:56:57 -05:00
Update create-matrix.js
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
const { logger, db } = require('../core')
|
const { logger, db } = require('../core')
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
await db.channels.load()
|
||||||
const docs = await db.channels.find({}).sort({ cluster_id: 1 })
|
const docs = await db.channels.find({}).sort({ cluster_id: 1 })
|
||||||
const cluster_id = docs.reduce((acc, curr) => {
|
const cluster_id = docs.reduce((acc, curr) => {
|
||||||
if (!acc.includes(curr.cluster_id)) acc.push(curr.cluster_id)
|
if (!acc.includes(curr.cluster_id)) acc.push(curr.cluster_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user