How to split a page with 96 items into more pages
#1
Hi i write my own addon for stalker portals
If i select a genere it shows me all title/channels in one row.
How i can split them to only show me for example 10 items per page.

I read all channeldata what i need from an json file wich i grab first from the server maybe this is importand to know for any help.

Problem is that. if i select one genre it reads the json file and after it grabs for every single channel in this genre the epg.
Cuz it use the id to get the correct epg data for each channel.

Or ist there any why to get the "plot", run a function, when the item is focused.

Or is there any way i write something in the json like any queryurl as plot

Plugin://xyxyx. Xyxyx. Xyxyyx/mode....

Or any other stuff... Like it is with civers and logis...
There is only an url in the json and kodi grabs them also after loading the json and creats the list first... And after that kodi downloads the logis/covers....
Reply
#2
(2022-04-20, 21:13)Kangool Wrote: Hi i write my own addon for stalker portals
If i select a genere it shows me all title/channels in one row.
How i can split them to only show me for example 10 items per page.

I read all channeldata what i need from an json file wich i grab first from the server maybe this is importand to know for any help.

Problem is that. if i select one genre it reads the json file and after it grabs for every single channel in this genre the epg.
Cuz it use the id to get the correct epg data for each channel.

Or ist there any why to get the "plot", run a function, when the item is focused.

Or is there any way i write something in the json like any queryurl as plot

Plugin://xyxyx. Xyxyx. Xyxyyx/mode....

Or any other stuff... Like it is with civers and logis...
There is only an url in the json and kodi grabs them also after loading the json and creats the list first... And after that kodi downloads the logis/covers....

One way which comes to mind is to read all of the JSON into your addon, use a counter to display 10 items, insert listitem 11 for next page and when the user clicks on 11 it loads the next 10 listitems created from JSON (or 12 items on subsequent pages.  1 for previous page, 1 for next page and 10 items).  It feels a little clunky but could work.  I am sure there are likely other options.

You can have things run in the background when an item is in focus or you could add a context menu item for a listitem to add functionality.  It depends upon whether you want the user to acknowledge / trigger the background process or have it run when they focus on it.  The focus option might be slow, depending upon what it is doing.  If it is just sorting data then probably not a big deal.  if it is fetching data then that could cause a lot of unwanted overhead.

Seeing some of your code to go along with the asks may help.



Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#3
Need to download just view kb... About 3 to 5
And it should be automatic done in backround if item is focused... And then show as plot in the textbox
Reply

Logout Mark Read Team Forum Stats Members Help
How to split a page with 96 items into more pages0