diff --git a/cli/pipeline.ts b/cli/pipeline.ts index 600504a..a46c5f5 100644 --- a/cli/pipeline.ts +++ b/cli/pipeline.ts @@ -7,7 +7,7 @@ import { symbols } from "~/cli/formatter.ts"; import { dim, italic, yellow } from "@std/fmt/colors"; export const DAILY_SCROBBLE_LIMIT: number = 2880; -export const TIMESTAMP_LIMIT = 10209600; // 14 days +export const TIMESTAMP_LIMIT = 1209600; // 14 days export type PipelineTrackMeta = ScrobblePayload; diff --git a/commands/tidy.ts b/commands/tidy.ts index 85dbe45..6983379 100644 --- a/commands/tidy.ts +++ b/commands/tidy.ts @@ -12,8 +12,6 @@ import { sleep, withRetry } from "~/utils/retry.ts"; import { cyan, green, italic, red } from "@std/fmt/colors"; import { TIMESTAMP_LIMIT } from "~/cli/pipeline.ts"; -const CORRECTION_CUTOFF = Math.floor(Date.now() / 1000) - TIMESTAMP_LIMIT; - export async function executeTidyCommand(args: string[]): Promise> { const flags = parseArgs(args, { boolean: ["dry-run"], @@ -33,24 +31,30 @@ export async function executeTidyCommand(args: string[]): Promise MAX_SHOWN_SKIPS) { - log.info(` ${dim("...")} ${dim(`skipped ${skipCount - MAX_SHOWN_SKIPS} more tracks`)}`); + if (skipCount > maxShownSkips) { + log.info(` ${dim("...")} ${dim(`skipped ${skipCount - maxShownSkips} more tracks`)}`); } skipCount = 0;