mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update create-queue.js
This commit is contained in:
parent
fd3d11e2a1
commit
6e135a16fc
1 changed files with 2 additions and 2 deletions
|
@ -63,7 +63,7 @@ async function createQueue() {
|
|||
|
||||
for (const d of dates) {
|
||||
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]) {
|
||||
queue[key] = {
|
||||
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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue