mirror of
https://github.com/iptv-org/database.git
synced 2025-05-09 19:20:01 -04:00
Fix linter issues
This commit is contained in:
parent
a28122809a
commit
dac7d19f40
13 changed files with 15 additions and 16 deletions
|
@ -1,4 +1,4 @@
|
|||
import { CSV, IssueLoader, CSVParser, Issue, IssueData } from '../../core'
|
||||
import { CSV, IssueLoader, Issue, IssueData } from '../../core'
|
||||
import { createChannelId, createFeedId } from '../../utils'
|
||||
import { Channel, Feed, BlocklistRecord } from '../../models'
|
||||
import { Storage, Collection, Logger } from '@freearhey/core'
|
||||
|
@ -11,7 +11,6 @@ const dataStorage = new Storage(DATA_DIR)
|
|||
const logger = new Logger({ level: -999 })
|
||||
|
||||
async function main() {
|
||||
const parser = new CSVParser()
|
||||
const issueLoader = new IssueLoader()
|
||||
const dataLoader = new DataLoader({ storage: dataStorage })
|
||||
|
||||
|
@ -101,7 +100,7 @@ async function editFeeds(issues: Collection, data: DataLoaderData) {
|
|||
)
|
||||
if (!found) return
|
||||
|
||||
let channelId: string | undefined = found.channelId
|
||||
const channelId: string | undefined = found.channelId
|
||||
let feedId: string | undefined = found.id
|
||||
if (issueData.has('feed_name')) {
|
||||
const name = issueData.getString('feed_name') || found.name
|
||||
|
|
|
@ -238,7 +238,7 @@ function findDuplicatesBy(items: Collection, keys: string[]) {
|
|||
const duplicates = new Collection()
|
||||
const buffer = new Dictionary()
|
||||
|
||||
items.forEach((item, i = 0) => {
|
||||
items.forEach((item: { [key: string]: string | number }) => {
|
||||
const normId = keys.map(key => item[key].toString().toLowerCase()).join()
|
||||
if (buffer.has(normId)) {
|
||||
duplicates.add(item)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue