diff --git a/scripts/commands/playlist/edit.ts b/scripts/commands/playlist/edit.ts index 10824df43b..c58be822a3 100644 --- a/scripts/commands/playlist/edit.ts +++ b/scripts/commands/playlist/edit.ts @@ -136,7 +136,7 @@ async function selectChannel( } async function selectFeed(channelId: string, feedsGroupedByChannelId: Dictionary): Promise { - const channelFeeds = new Collection(feedsGroupedByChannelId.get(channelId)) || new Collection() + const channelFeeds = new Collection(feedsGroupedByChannelId.get(channelId)) const choices = getFeedChoises(channelFeeds) const selected: ChoiceValue = await select({ diff --git a/scripts/commands/playlist/format.ts b/scripts/commands/playlist/format.ts index d861cb81ad..5f587403a0 100644 --- a/scripts/commands/playlist/format.ts +++ b/scripts/commands/playlist/format.ts @@ -63,7 +63,7 @@ async function main() { logger.info('saving...') const groupedStreams = streams.groupBy((stream: Stream) => stream.getFilepath()) - for (let filepath of groupedStreams.keys()) { + for (const filepath of groupedStreams.keys()) { const streams = groupedStreams.get(filepath) || [] if (!streams.length) return diff --git a/scripts/commands/playlist/test.ts b/scripts/commands/playlist/test.ts index 5c307fc45e..52c3d9cf1c 100644 --- a/scripts/commands/playlist/test.ts +++ b/scripts/commands/playlist/test.ts @@ -18,7 +18,7 @@ const LIVE_UPDATE_MAX_STREAMS = 100 let errors = 0 let warnings = 0 -let results = {} +const results = {} let interval let streams = new Collection() let isLiveUpdateEnabled = true diff --git a/scripts/commands/playlist/update.ts b/scripts/commands/playlist/update.ts index bdaa10241f..2ded669e75 100644 --- a/scripts/commands/playlist/update.ts +++ b/scripts/commands/playlist/update.ts @@ -6,7 +6,7 @@ import type { DataLoaderData } from '../../types/dataLoader' import { DATA_DIR, STREAMS_DIR } from '../../constants' import { isURI } from '../../utils' -let processedIssues = new Collection() +const processedIssues = new Collection() async function main() { const logger = new Logger({ level: -999 }) @@ -55,7 +55,7 @@ async function main() { logger.info('saving...') const groupedStreams = streams.groupBy((stream: Stream) => stream.getFilepath()) - for (let filepath of groupedStreams.keys()) { + for (const filepath of groupedStreams.keys()) { let streams = groupedStreams.get(filepath) || [] streams = streams.filter((stream: Stream) => stream.removed === false) @@ -114,7 +114,7 @@ async function editStreams({ if (data.missing('streamUrl')) return - let stream: Stream = streams.first( + const stream: Stream = streams.first( (_stream: Stream) => _stream.url === data.getString('streamUrl') ) if (!stream) return diff --git a/scripts/commands/playlist/validate.ts b/scripts/commands/playlist/validate.ts index bc5c3b435b..27f6be0c4e 100644 --- a/scripts/commands/playlist/validate.ts +++ b/scripts/commands/playlist/validate.ts @@ -44,7 +44,7 @@ async function main() { let errors = new Collection() let warnings = new Collection() - let streamsGroupedByFilepath = streams.groupBy((stream: Stream) => stream.getFilepath()) + const streamsGroupedByFilepath = streams.groupBy((stream: Stream) => stream.getFilepath()) for (const filepath of streamsGroupedByFilepath.keys()) { const streams = streamsGroupedByFilepath.get(filepath) if (!streams) continue