iptv
iptv copied to clipboard
Developer's JSON is missing the Adult channels
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?
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.