Skip to content

Commit

Permalink
skip duplicate channel numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Oct 21, 2021
1 parent 7f8ace2 commit 25538ff
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion PlutoIPTV/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,17 @@ const plutoIPTV = {

module.exports = plutoIPTV;

function processChannels(version, channels) {
function processChannels(version, list) {
let seenChannels = {};
let channels = [];
list.forEach(channel => {
if (seenChannels[channel.number]) {
return
}
seenChannels[channel.number] = true
channels.push(channel)
})

///////////////////
// M3U8 Playlist //
///////////////////
Expand Down

0 comments on commit 25538ff

Please sign in to comment.