Merge pull request #826 from candry7731/Voice-Filter-on-Live-TV-Fix

Fix Filter reload Issues with Live TV
This commit is contained in:
1hitsong 2022-12-08 09:15:02 -05:00 committed by GitHub
commit 1989314363
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 5 deletions

View File

@ -62,14 +62,17 @@ sub loadItems()
end if end if
end if end if
if m.top.searchTerm <> "" 'reset data
if LCase(m.top.searchTerm) = LCase(tr("all"))
params.searchTerm = " "
else if m.top.searchTerm <> ""
params.searchTerm = m.top.searchTerm params.searchTerm = m.top.searchTerm
end if end if
filter = m.top.filter filter = LCase(m.top.filter)
if filter = "All" or filter = "all" if filter = "all"
' do nothing ' do nothing
else if filter = "Favorites" else if filter = "favorites"
params.append({ Filters: "IsFavorite" }) params.append({ Filters: "IsFavorite" })
params.append({ isFavorite: true }) params.append({ isFavorite: true })
end if end if

View File

@ -44,7 +44,14 @@ end sub
'Voice Search set 'Voice Search set
sub channelsearchTermSet() sub channelsearchTermSet()
m.scheduleGrid.jumpToChannel = 0 m.scheduleGrid.jumpToChannel = 0
if m.top.searchTerm <> invalid and m.LoadChannelsTask.searchTerm <> m.top.searchTerm 'Reset filter if user says all
if LCase(m.top.searchTerm) = LCase(tr("all")) or m.LoadChannelsTask.searchTerm = LCase(tr("all"))
m.top.searchTerm = " "
m.LoadChannelsTask.searchTerm = " "
m.spinner.visible = true
m.LoadChannelsTask.control = "RUN"
'filter if the searterm is not invalid
else if m.top.searchTerm <> invalid and LCase(m.LoadChannelsTask.searchTerm) <> LCase(m.top.searchTerm)
if m.LoadChannelsTask.state = "run" then m.LoadChannelsTask.control = "stop" if m.LoadChannelsTask.state = "run" then m.LoadChannelsTask.control = "stop"
m.LoadChannelsTask.searchTerm = m.top.searchTerm m.LoadChannelsTask.searchTerm = m.top.searchTerm
@ -279,6 +286,7 @@ end sub
function onKeyEvent(key as string, press as boolean) as boolean function onKeyEvent(key as string, press as boolean) as boolean
if not press then return false if not press then return false
detailsGrp = m.top.findNode("detailsPane") detailsGrp = m.top.findNode("detailsPane")
gridGrp = m.top.findNode("scheduleGrid") gridGrp = m.top.findNode("scheduleGrid")

View File

@ -855,6 +855,11 @@
<translation>Unable to find any albums or songs belonging to this artist</translation> <translation>Unable to find any albums or songs belonging to this artist</translation>
<extracomment>Popup message when we find no audio data for an artist</extracomment> <extracomment>Popup message when we find no audio data for an artist</extracomment>
</message> </message>
<message>
<source>all</source>
<translation>all</translation>
<extracomment>all will reset the searchTerm so all data will be availible</extracomment>
</message>
<message> <message>
<source>Aired</source> <source>Aired</source>
<translation>Aired</translation> <translation>Aired</translation>