Update format.js

Ignore protocol on duplicate search
pull/2205/head
freearhey 4 years ago
parent 33e80bb0c2
commit 0ca88e68f8

@ -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

Loading…
Cancel
Save