Kodi Plugin (GridView)

Kodi GridView Plugin (3).hrp (67.5 KB)

Attached a custom Kodi project, includes a plugin that can be used either with the project or as a strandalone for commands and nowplaying etc.

Requires 3 settings - ip address, jsonserver (normally 9090) and webserver (normally 8080). Currently set for no user or password although this can be added if needed.

John

2 Likes

Very nice! Great job! I was wondering when we were going to get the chance to see this:)

Thanks Bill. I was not able to fix the selected issue I asked about, maybe someone else will be able to fix it. It didnt matter where I set the Selection attritbute to -1 or null or “” the selected gridview item remained selected - is it because im updating the same gridview and repopulating? I plan to update it a little, Kodi is entirely JSON controlled so there are lots of options for it.

Im not sure who uses Kodi these days though :slight_smile:

This is really cool! I may have to get a kodi box setup again… its been a while.

What device do you use to run kodi? I used to use a (cheap china made) Android set-top-box which randomly stopped working (stuck at the boot screen). Any recommendations?

I would most likely setup IR control from a GC-IP2IR for things like navigation and JSON for everything else. I have thousands of movies on my storage server I’d love to resurrect. :grinning:

Hi Jeff,

Ive used lots of boxes over the years, the rpi works really nicely using libreelec but ive also used cheap android boxes. I have it now on a firestick plus the rpi. I dont use Kodi much these days, so if you get chance to play with the plugin and somethings missing let me know.

John

I use a Vero 4K. It’s custom made by the developer of OSMC. It’s the only Kodi box I’ve had that has never had any issues. It will play anything I can throw at it with ease. They’re pricey but you will never want for a different box.

Thanks for the hard work John! I’m about to integrate and test drive. If I have more than one Kodi box, how do I handle this? Do I copy and paste the kodi plugin and script multiple times and give them different IP addresses? Or different names?

I got a message when importing the plugin “commands not defined”.

Kodi GridView Plugin1.hrp (65.3 KB)

Hi,

I can re create the issue. It seems that on first syncronise the onConnect code stops the devices being added. Strangly if you temporarily remove this code and syncronise first time then re-add it, it works each “new” syncronsie. Im not sure why. See the attached code example. - (note the /* and */ in the code which removes it as active code)

Note Ive changed the ids to be generated as K1,K2,K3 rather than 1,2,3 to avoid conflicting with existing plugin ids.

John

Yes, this one works great. Thanks!

Great stuff. DId you have to remove the onConnect code on your initial syncornise? Let me know how it works, what is missing etc and I will update it. I havent done a great amount of testing with it.

John

No I didn’t, it worked right out of the box! Thanks, I’m testing now. There are a few fields that I use that are not on here like resolution, audio channels, etc but I’m trying to learn so I’m going to attempt to have a go at it myself first. I’ll ask for help when I need it though.

Sure no problem - adding commands to the script is really easy - just add it to the list in the same format:

“Context”:’{“jsonrpc”:“2.0”,“method”:“Input.ContextMenu”,“id”:1}’,

I added shutdown and info to a later version but its not included in the one I posted earlier, mustve copied the wrong one. I also havent included Audio Library but this could be added at some point.

To help with the JSON commands try the JSON rpc browser addon.

change to previous audio stream is:

{“jsonrpc”:“2.0”,“method”:“Player.SetAudioStream”,“params”:{“playerid”:1,“stream”:“previous”},“id”:5}

Hi Bill,

Is there a pending update to the IOS app that will enable web thumbnails in gridview you mentioned, it works for me in the designer but not on my ipad?

Kodi GridView Plugin (3).hrp (67.4 KB)

Updates:

Added Music Library
Updated with Play Full album and also explore album and select songs.
Added Music Playlist (edit 17/06)

Planned
TV and Music Search
TV and Music Genre Options

The code is quite complex now so there WILL be some bugs. Enjoy :slight_smile:
I will need to refine the thumbnails for audio library as mine are all local files - AudioDB files function will need added.

John

Support for image URLS was added in 3.1.0. You’ll need that version or later.

I had to tweak the project to fit on my Amazon Fire 7 Android tablet.

Looks great! Now just click that banner at the bottom and help support this! :laughing:

2 Likes

Yes I haven’t purchased it yet. I am still learning HR and setting up my remote app but I will make a purchase soon for sure.

How do you add multiple instances of the Kodi remote control page ?

I have 3x Kodi HTPCs in the house.

I created another device by copying the first one and changing its IP to that of the second HTPC, but I don’t know how to switch between the two media center PCs ?

image

Thanks.

EDIT: Also with the unmodified Kodi GridView Plugin (3).hrp file I am seeing this error when I first go in to the Kodi remote control page:

Response status code does not indicate success: 404 (Not Found).

Subsequently I am also seeing that error in my own modified project as well but it doesn’t appear to stop the Kodi remote control page from functioning.

EDIT2:

So each Kodi device instance in Home Remote, has the correct LAN IP for each HTPC etc.

But it only seems to connect to the Kod01 PC, I don’t know how to switch the Kodi remote control page to the other Kodi02 PC etc.

EDIT3:

Have it working now I have three Kodi remote control pages working independently of each other.

I had to make copies of the KodiDetails.xaml template file for each HTPC. I then had to manually edit all elements within the template files and change their bindings to point to the correct Kodi device in HR. Took some time but it seems to be working.

How to change the “Romance” genre button to be “Science Fiction” instead ?

image

I have changed the button label text to “Sci-Fi” and in the EventTrigger - Actions - Value field I have changed Romance to Science Fiction.

However when I now press this “Sci-Fi” button it does not load up the Science Fiction movies or Romance for that matter.

Looking in my genres in Kodi on the TV its definitely called Science Fiction.

I also tried “Science Fiction” with quotes in the EventTrigger - Actions - Value field, neither seems to work, what am I missing? Seems to be because there is a space in this genre name.

image

Thanks

I don’t have my language set to English, but I have a genre with a space in the name and that one is working without problems. For my language it’s written “Sciencefiction”. At least worth a try.

Otherwise, you’ll be needing something like Postman to send a “GetGenres” request to get the exact names of the available genres. I can give you the request if needed.