Skip to content

Add source hiding#2570

Open
CranberrySoup wants to merge 2 commits intorecloudstream:masterfrom
CranberrySoup:hide_sources
Open

Add source hiding#2570
CranberrySoup wants to merge 2 commits intorecloudstream:masterfrom
CranberrySoup:hide_sources

Conversation

@CranberrySoup
Copy link
Copy Markdown
Contributor

  • Adds a quality profile settings menu
  • Adds "Hide sources with a negative priority" option
  • Adds "Hide sources with errors" option

The code contains redundant sortLinks and toDisplayLink calls and it could be made more efficient, but that would increase code complexity. The caches in QualityDataHelper.kt reduces sortLinks runtime to 0-2ms even with 200 links.

Admittedly the code is quite messy but I could not make it better. Suggestions welcome.



// Map profile and name to priority
val sourcePriorityCache: HashMap<Int, HashMap<String, Int>> = hashMapOf()
Copy link
Copy Markdown
Collaborator

@fire-light42 fire-light42 Mar 30, 2026

Choose a reason for hiding this comment

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

This should be a ConcurrentHashMap for better thread safety.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants