Fixing Source List Displaying Empty Items (#810)
* Fixing source list displaying empty items
This commit is contained in:
parent
410cedc128
commit
6e5a52e440
|
@ -112,7 +112,7 @@ class RepoLinkGenerator(
|
||||||
isCasting = LoadType.Chromecast == type,
|
isCasting = LoadType.Chromecast == type,
|
||||||
subtitleCallback = { file ->
|
subtitleCallback = { file ->
|
||||||
val correctFile = PlayerSubtitleHelper.getSubtitleData(file)
|
val correctFile = PlayerSubtitleHelper.getSubtitleData(file)
|
||||||
if (!currentSubsUrls.contains(correctFile.url)) {
|
if (correctFile.url.isNotEmpty() && !currentSubsUrls.contains(correctFile.url)) {
|
||||||
currentSubsUrls.add(correctFile.url)
|
currentSubsUrls.add(correctFile.url)
|
||||||
|
|
||||||
// this part makes sure that all names are unique for UX
|
// this part makes sure that all names are unique for UX
|
||||||
|
@ -135,15 +135,15 @@ class RepoLinkGenerator(
|
||||||
},
|
},
|
||||||
callback = { link ->
|
callback = { link ->
|
||||||
Log.d(TAG, "Loaded ExtractorLink: $link")
|
Log.d(TAG, "Loaded ExtractorLink: $link")
|
||||||
if (!currentLinks.contains(link.url)) {
|
if (link.url.isNotEmpty() && !currentLinks.contains(link.url) && !currentLinkCache.contains(link)) {
|
||||||
if (!currentLinkCache.contains(link)) {
|
currentLinks.add(link.url)
|
||||||
currentLinks.add(link.url)
|
|
||||||
if (allowedTypes.contains(link.type)) {
|
if (allowedTypes.contains(link.type)) {
|
||||||
callback(Pair(link, null))
|
callback(Pair(link, null))
|
||||||
}
|
|
||||||
currentLinkCache.add(link)
|
|
||||||
//linkCache[index] = currentLinkCache
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
currentLinkCache.add(link)
|
||||||
|
// linkCache[index] = currentLinkCache
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue