From 3d761612d9b4f339bbf42426f31a79b305b84914 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 2 Aug 2021 21:48:04 +0300 Subject: [PATCH] Update format.js --- scripts/format.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/scripts/format.js b/scripts/format.js index 087d90bba..095f7346a 100644 --- a/scripts/format.js +++ b/scripts/format.js @@ -1,4 +1,3 @@ -const categories = require('./helpers/categories') const parser = require('./helpers/parser') const utils = require('./helpers/utils') const file = require('./helpers/file') @@ -13,7 +12,6 @@ async function main() { log.print(`\nProcessing '${playlist.url}'...`) await parser .parsePlaylist(playlist.url) - .then(removeWrongCategories) .then(addMissingData) .then(playlist => { if (file.read(playlist.url) !== playlist.toString()) { @@ -29,18 +27,6 @@ async function main() { log.finish() } -async function removeWrongCategories(playlist) { - for (const channel of playlist.channels) { - if (!channel.category) continue - const valid = categories.find(c => c.name === channel.category) - if (!valid) { - channel.category = '' - } - } - - return playlist -} - async function addMissingData(playlist) { for (const channel of playlist.channels) { const code = file.getBasename(playlist.url)