Rename to id.js

This commit is contained in:
Aleksandr Statciuk 2022-02-11 10:52:38 +03:00
parent 09c4947ac6
commit 442916d130
3 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
const { db, file, parser, store, logger, cid } = require('../core')
const { db, file, parser, store, logger, id } = require('../core')
const { program } = require('commander')
const _ = require('lodash')
@ -62,7 +62,7 @@ async function saveToDatabase(streams = []) {
stream.set('cluster_id', { cluster_id: i + 1 })
if (!stream.get('channel_id')) {
const channel_id = cid.generate(item.name, item.filepath)
const channel_id = id.generate(item.name, item.filepath)
stream.set('channel_id', { channel_id })
stream.set('updated', { updated: true })

View File

@ -2,9 +2,9 @@ const file = require('./file')
const parser = require('./parser')
const transliteration = require('transliteration')
const cid = {}
const id = {}
cid.generate = function (title, filepath) {
id.generate = function (title, filepath) {
const name = parser.parseChannelName(title)
const code = parser.parseCountryCode(filepath)
@ -20,4 +20,4 @@ cid.generate = function (title, filepath) {
return null
}
module.exports = cid
module.exports = id

View File

@ -9,5 +9,5 @@ exports.playlist = require('./playlist')
exports.store = require('./store')
exports.markdown = require('./markdown')
exports.api = require('./api')
exports.cid = require('./cid')
exports.id = require('./id')
exports.blocklist = require('./blocklist')