Merge branch 'master' into add-more-channels

This commit is contained in:
freearhey 2021-03-01 01:10:08 +03:00
commit 3503d0b839
1 changed files with 3 additions and 2 deletions

View File

@ -87,9 +87,10 @@ async function removeDuplicates(playlist) {
console.info(` Looking for duplicates...`)
let buffer = {}
const channels = playlist.channels.filter(i => {
const result = typeof buffer[i.url] === 'undefined'
const url = i.url.replace(/(^\w+:|^)\/\//, '')
const result = typeof buffer[url] === 'undefined'
if (result) {
buffer[i.url] = true
buffer[url] = true
}
return result