From 3c5ea29926a559fde17cf1f0d62b2973f2ad3fe0 Mon Sep 17 00:00:00 2001 From: freearhey Date: Wed, 23 Oct 2019 13:44:16 +0300 Subject: [PATCH] wip --- helpers/format.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helpers/format.js b/helpers/format.js index 850bb7c878..ecdb54e9cc 100644 --- a/helpers/format.js +++ b/helpers/format.js @@ -83,8 +83,9 @@ async function main() { for(let channelId in buffer[epgUrl].channels) { let c = buffer[epgUrl].channels[channelId] for(let epgName of c.names) { + channelTitle = channel.title.replace(/(fhd|hd|sd|高清)$/i, '').trim() let regexp = new RegExp(`^${epgName}$`, 'i') - if(regexp.test(channel.title)) { + if(regexp.test(channelTitle)) { if(!channel.id) { channel.id = c.id continue