From 8cd96cdba21b391860e1c66189126089436fb25b Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Wed, 16 Feb 2022 04:24:28 +0300 Subject: [PATCH] Update file.js --- scripts/core/file.js | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/scripts/core/file.js b/scripts/core/file.js index 3ec6a2041a..b36db5ee3e 100644 --- a/scripts/core/file.js +++ b/scripts/core/file.js @@ -67,45 +67,4 @@ file.basename = function (filepath) { return path.basename(filepath) } -// file.saveAsM3U = async function (filepath, items, options = {}) { -// const playlist = createPlaylist(filepath) - -// const header = {} -// if (options.public) { -// let guides = items.map(item => item.guides) -// guides = _.uniq(_.flatten(guides)).sort().join(',') - -// header['x-tvg-url'] = guides -// } -// playlist.setHeader(header) - -// for (const item of items) { -// const stream = store.create(item) - -// let attrs -// if (options.public) { -// attrs = { -// 'tvg-id': stream.get('tvg_id'), -// 'tvg-country': stream.get('tvg_country'), -// 'tvg-language': stream.get('tvg_language'), -// 'tvg-logo': stream.get('tvg_logo'), -// 'user-agent': stream.get('http.user-agent') || undefined, -// 'group-title': stream.get('group_title') -// } -// } else { -// attrs = { -// 'tvg-id': stream.get('tvg_id'), -// 'user-agent': stream.get('http.user-agent') || undefined -// } -// } - -// playlist.add(stream.get('url'), stream.get('display_name'), attrs, { -// 'http-referrer': stream.get('http.referrer') || undefined, -// 'http-user-agent': stream.get('http.user-agent') || undefined -// }) -// } - -// return file.write(filepath, playlist.toString()) -// } - module.exports = file