mirror of
https://github.com/iptv-org/epg
synced 2025-12-17 10:56:57 -05:00
Update create-queue.js
This commit is contained in:
@@ -63,7 +63,7 @@ async function createQueue() {
|
|||||||
|
|
||||||
for (const d of dates) {
|
for (const d of dates) {
|
||||||
const dString = d.toJSON()
|
const dString = d.toJSON()
|
||||||
const key = `${item.site}:${item.site_id}:${item.lang}:${dString}`
|
const key = `${item.site}:${item.lang}:${item.xmltv_id}:${dString}`
|
||||||
if (!queue[key]) {
|
if (!queue[key]) {
|
||||||
queue[key] = {
|
queue[key] = {
|
||||||
channel: {
|
channel: {
|
||||||
@@ -106,7 +106,7 @@ async function saveToDatabase(items = []) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
queue = _.sortBy(queue, ['channel.xmltv_id', 'date'])
|
queue = _.sortBy(queue, ['channel.lang', 'channel.xmltv_id', 'date'])
|
||||||
|
|
||||||
await db.queue.insert(queue)
|
await db.queue.insert(queue)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user