iptv icon indicating copy to clipboard operation
iptv copied to clipboard

Developer's JSON is missing the Adult channels

Open paul-h opened this issue 4 years ago • 1 comments

Describe your issue

Before the scripts rewrite the channel.json file contained all the channels including the adult channels but they are now missing.

I think this line in generate-playlists.js https://github.com/iptv-org/iptv/blob/master/scripts/commands/generate-playlists.js#L293 needs to be changed to await generator.generate(${PUBLIC_PATH}/channels.json, {}, { format: 'json', includeNSFW: true }) to restore the previous behavior.

A better option may be to have two channels.json files with and without the adult channels so developers can choose which one they want to use?

paul-h avatar Dec 29 '21 11:12 paul-h

async function generateChannelsJson() {
  logger.info('Generating channels.json...')

  await generator.generate(`${PUBLIC_PATH}/channels.json`, {}, { format: 'json' })
}

async function generateChannelsADInclJson() {
  logger.info('Generating channels_adult_included.json...')

  await generator.generate(`${PUBLIC_PATH}/channels.json`, {}, { format: 'json',  includeNSFW: true  })
}

indeed works. I'll let Arhey make his final choice about it, maybe there's a reason behind it.

BellezaEmporium avatar Dec 29 '21 17:12 BellezaEmporium