Add filtering to LiveTV Channel List & TV Shows
This commit is contained in:
parent
d65a57cbde
commit
451be6bdf2
|
@ -131,7 +131,10 @@ sub SetUpOptions()
|
|||
{ "Title": tr("OFFICIAL_RATING"), "Name": "OfficialRating" },
|
||||
{ "Title": tr("RELEASE_DATE"), "Name": "PremiereDate" },
|
||||
]
|
||||
options.filter = []
|
||||
options.filter = [
|
||||
{ "Title": tr("All"), "Name": "All" },
|
||||
{ "Title": tr("Favorites"), "Name": "Favorites" }
|
||||
]
|
||||
'Live TV
|
||||
else if m.top.parentItem.collectionType = "livetv"
|
||||
options.views = [
|
||||
|
@ -141,7 +144,10 @@ sub SetUpOptions()
|
|||
options.sort = [
|
||||
{ "Title": tr("TITLE"), "Name": "SortName" }
|
||||
]
|
||||
options.filter = []
|
||||
options.filter = [
|
||||
{ "Title": tr("All"), "Name": "All" },
|
||||
{ "Title": tr("Favorites"), "Name": "Favorites" }
|
||||
]
|
||||
else
|
||||
options.views = [
|
||||
{ "Title": tr("Default"), "Name": "default" }
|
||||
|
|
|
@ -30,6 +30,7 @@ sub loadItems()
|
|||
' do nothing
|
||||
else if filter = "Favorites"
|
||||
params.append({ Filters: "IsFavorite" })
|
||||
params.append({ isFavorite: true})
|
||||
end if
|
||||
|
||||
if m.top.ItemType <> ""
|
||||
|
@ -38,6 +39,7 @@ sub loadItems()
|
|||
|
||||
if m.top.ItemType = "LiveTV"
|
||||
url = "LiveTv/Channels"
|
||||
params.append({ userId: get_setting("active_user") })
|
||||
else
|
||||
url = Substitute("Users/{0}/Items/", get_setting("active_user"))
|
||||
end if
|
||||
|
|
Loading…
Reference in New Issue
Block a user