mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-13 10:30:03 -04:00
Update format.js
Ignore protocol on duplicate search
This commit is contained in:
parent
33e80bb0c2
commit
0ca88e68f8
1 changed files with 3 additions and 2 deletions
|
@ -87,9 +87,10 @@ async function removeDuplicates(playlist) {
|
||||||
console.info(` Looking for duplicates...`)
|
console.info(` Looking for duplicates...`)
|
||||||
let buffer = {}
|
let buffer = {}
|
||||||
const channels = playlist.channels.filter(i => {
|
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) {
|
if (result) {
|
||||||
buffer[i.url] = true
|
buffer[url] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue