Skip to content

Conversation

@InterN0te
Copy link
Contributor

Description

Prevents duplicate download items from being displayed by filtering based on title uniqueness. This improves UI clarity when the same content appears multiple times in the download status.

Summary

  • Adds getUniqueByTitle function to filter duplicate download items based on title
  • Applies filtering to both regular and 4K download status lists
  • Improves UI clarity by preventing duplicate entries in the manage slide over

Screenshot

Before

image

After

image

Test plan

  • Verify that duplicate download items no longer appear in the manage slide over
  • Check that both regular and 4K download lists are properly deduplicated
  • Ensure filtering doesn't affect other functionality in the component

@InterN0te InterN0te marked this pull request as draft September 22, 2025 13:37
@InterN0te InterN0te force-pushed the fix-duplicate-download-items branch from a0e341c to 15196c4 Compare September 22, 2025 14:19
@InterN0te InterN0te marked this pull request as ready for review September 22, 2025 14:22
@InterN0te InterN0te force-pushed the fix-duplicate-download-items branch from 15196c4 to 16aaf5d Compare September 22, 2025 15:15
Copy link
Member

@gauthier-th gauthier-th left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't reproduce your issue in the first place.
This is something #927 should already have fixed. How are you items downloaded?

@InterN0te
Copy link
Contributor Author

InterN0te commented Sep 22, 2025

It's almost like #927, but not in the same location: my PR is for the "Manage series", not the "Status Badge"

To reproduce, simply download a torrent for an entire season and go to "Manage Series".

This is a test a just did on develop branch, without my PR :

The status badge only shows one download:
image

But in "Manage Series," I have the same download ten times (I also tried with a season of 8 episodes and it only shows 8 times the download so I think it take only the 10 firsts downloads of a TV show) :
image

@gauthier-th
Copy link
Member

Ah, I didn't see I forgot to implement it there too.
I'm likely biased, but I find my previous implementation way more clean and less hacky.

Could you please implement the same logic as I did on the #927 PR?

@github-actions
Copy link

This PR is stale because it has been open 30 days with no activity. Please address the feedback or provide an update to keep it open.

@github-actions github-actions bot added the stale label Nov 28, 2025
@github-actions
Copy link

This PR was closed because it has been stalled for 30 days with no activity. You can reopen it once you address the feedback or provide the requested changes.

@github-actions github-actions bot closed this Dec 28, 2025
@gauthier-th gauthier-th reopened this Dec 28, 2025
@gauthier-th gauthier-th requested a review from a team as a code owner December 28, 2025 22:56
@gauthier-th
Copy link
Member

Re-opening this since it's an interesting QOL feature.

@fallenbagel
Copy link
Collaborator

Ah, I didn't see I forgot to implement it there too.
I'm likely biased, but I find my previous implementation way more clean and less hacky.

Could you please implement the same logic as I did on the #927 PR?

@InterN0te any update?

@github-actions github-actions bot removed the stale label Dec 29, 2025
Apply the same logic as PR #927 to deduplicate season pack downloads
in the "Manage Series" slide-over panel.
@InterN0te InterN0te force-pushed the fix-duplicate-download-items branch from e014c4b to 99ea525 Compare December 31, 2025 16:09
@InterN0te
Copy link
Contributor Author

Hi @gauthier-th @fallenbagel ! Sorry for the delay. I've updated the PR to use the same logic as #927 - filtering by downloadId instead of title. The implementation now uses a filterDuplicateDownloads function that keeps only one entry per downloadId, which properly handles season packs where multiple episodes share the same download.

const filterDuplicateDownloads = (
  items: DownloadingItem[] | undefined
): DownloadingItem[] => {
  if (!items || items.length === 0) return [];

  const seen = new Set<string>();
  return items.filter((item) => {
    if (!item.downloadId) return true;
    if (seen.has(item.downloadId)) return false;
    seen.add(item.downloadId);
    return true;
  });
};

This is consistent with your approach in #927 and should be cleaner than the previous title-based filtering. Let me know if you'd like any changes!

@InterN0te
Copy link
Contributor Author

The result is the same as before, but with (significantly) fewer lines of code.

Screenshot

With deduplication:
image

Without deduplication:
image

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes duplicate download items appearing in the manage slide over UI by filtering based on unique downloadId values. The implementation prevents the same download from being displayed multiple times, improving UI clarity.

Key Changes:

  • Added filterDuplicateDownloads helper function that deduplicates download items by downloadId
  • Applied filtering to both regular and 4K download status lists
  • Enhanced key prop differentiation for 4K items by adding -4k- prefix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fallenbagel fallenbagel enabled auto-merge (squash) January 7, 2026 16:03
@fallenbagel fallenbagel merged commit adbcf80 into seerr-team:develop Jan 7, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants