Skip to content

Commit

Permalink
fix: channels in last group while import txt from browser
Browse files Browse the repository at this point in the history
issues: #99
  • Loading branch information
fluidcat authored and lizongying committed Sep 5, 2024
1 parent 9a6710e commit b3f3602
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/src/main/java/com/lizongying/mytv0/MainViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -311,22 +311,25 @@ class MainViewModel : ViewModel() {

if (!tvMap.containsKey(group + title)) {
tvMap[group + title] = listOf()
tvMap[group + title] = tvMap[group + title]!! + group
}
tvMap[group + title] = tvMap[group + title]!! + uris
}
}
}
for ((title, uris) in tvMap) {
val channel_group = uris.first();
uris.drop(1);
val tv = TV(
-1,
"",
title.removePrefix(group),
title.removePrefix(channel_group),
"",
"",
"",
uris,
mapOf(),
group,
channel_group,
SourceType.UNKNOWN,
listOf(),
)
Expand Down

0 comments on commit b3f3602

Please sign in to comment.