• Save an ignored duplicate entry to storage

    Parameters

    • anilistId: number

      The AniList ID to ignore

    • anilistTitle: string

      The AniList title

    Returns void

    export function addIgnoredDuplicate(
    anilistId: number,
    anilistTitle: string,
    ): void {
    try {
    const ignored = getIgnoredDuplicates();

    // Check if already ignored
    if (ignored.some((item) => item.anilistId === anilistId)) {
    return;
    }

    // Add new ignored entry
    ignored.push({
    anilistId,
    anilistTitle,
    ignoredAt: Date.now(),
    });

    storage.setItem(STORAGE_KEYS.IGNORED_DUPLICATES, JSON.stringify(ignored));
    } catch (error) {
    console.error("Error saving ignored duplicate to storage", error);
    }
    }