From 1ea04c53a9e81b1b74a67ed0d6af1b7385e0d3fd Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Fri, 30 Jun 2023 19:55:14 +0300 Subject: [PATCH 1/2] Update editor.js --- scripts/commands/channels/editor.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/commands/channels/editor.js b/scripts/commands/channels/editor.js index 33f46702..a3cda58e 100644 --- a/scripts/commands/channels/editor.js +++ b/scripts/commands/channels/editor.js @@ -118,6 +118,7 @@ async function getSimilar(list, channelId) { function generateCode(name, country) { const id = transliterate(name) .replace(/\+/gi, 'Plus') + .replace(/^\&/gi, 'And') .replace(/[^a-z\d]+/gi, '') return `${id}.${country}` From 38acb47921bc66f8e99d5be395ed998454b6ccba Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Fri, 30 Jun 2023 19:55:17 +0300 Subject: [PATCH 2/2] Update parse.js --- scripts/commands/channels/parse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/commands/channels/parse.js b/scripts/commands/channels/parse.js index 84e8f175..8d996436 100644 --- a/scripts/commands/channels/parse.js +++ b/scripts/commands/channels/parse.js @@ -45,7 +45,7 @@ async function main() { channels = _.uniqBy(channels, c => c.site_id + c.lang) - channels = _.sortBy(channels, ['lang', 'xmltv_id']) + channels = _.sortBy(channels, ['lang', c => c.xmltv_id || '_', 'site_id']) const output = xml.create(channels, config.site)