Fix batch add delegated sources

This commit is contained in:
Jobobby04
2020-06-21 00:44:04 -04:00
parent 0ce63d0adc
commit 70c98e9c2b
2 changed files with 13 additions and 0 deletions
@@ -78,6 +78,10 @@ open class SourceManager(private val context: Context) {
fun getVisibleCatalogueSources() = sourcesMap.values.filterIsInstance<CatalogueSource>().filter {
it.id !in BlacklistedSources.HIDDEN_SOURCES
}
fun getDelegatedCatalogueSources() = sourcesMap.values.filterIsInstance<EnhancedHttpSource>().mapNotNull { enhancedHttpSource ->
enhancedHttpSource.enchancedSource as? DelegatedHttpSource
}
// SY <--
internal fun registerSource(source: Source, overwrite: Boolean = false) {