Rename to format.js
This commit is contained in:
parent
f3cb80bc04
commit
06b6279574
|
@ -27,12 +27,14 @@ function init() {
|
||||||
|
|
||||||
channels = util.sortByTitle(channels)
|
channels = util.sortByTitle(channels)
|
||||||
|
|
||||||
util.createFile(country.file)
|
util.createFile(country.file, '#EXTM3U\n')
|
||||||
|
|
||||||
channels.forEach(channel => {
|
channels.forEach(channel => {
|
||||||
const info = `-1 tvg-id="${channel.id}" tvg-name="${channel.name}" tvg-logo="${channel.logo}" group-title="${channel.group}",${channel.title}`
|
const info = `-1 tvg-id="${channel.id}" tvg-name="${channel.name}" tvg-logo="${channel.logo}" group-title="${channel.group}",${channel.title}`
|
||||||
|
|
||||||
util.writeToFile(country.file, info, channel.file)
|
const data = '#EXTINF:' + info + '\n' + channel.file + '\n'
|
||||||
|
|
||||||
|
util.writeToFile(country.file, data)
|
||||||
})
|
})
|
||||||
|
|
||||||
total += channels.length
|
total += channels.length
|
|
@ -10,7 +10,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "node test/index.js",
|
"test": "node test/index.js",
|
||||||
"generate": "node helpers/generate.js",
|
"generate": "node helpers/generate.js",
|
||||||
"format": "node helpers/formatter.js"
|
"format": "node helpers/format.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
Loading…
Reference in New Issue