Kodi Plugin (GridView)

Just curious why you decided to use both a websocket and an HTTP client in the plugin? Why not use a POST method with the HTTP client for sending commands?

The only reason was I found a working example of websocket which I adapted, I never saw a post example I could adapt,I have considered updating it to be honest.

Maybe Bill can give his thoughts about this matter: only use the HTTP client or itā€™s fine to use both.

Kodi GridViewę’ä»¶ē‰ˆęœ¬2.hrp. äæ®ę”¹äŗ†IP name passwd 但ę˜Æę— ę³•čæžęŽ„äø»ęœŗļ¼Ÿčƒ½ē»™äøŖčƦē»†ēš„č®¾ē½®å—ļ¼Ÿč°¢č°¢ļ¼

I downloaded KodiV2, set the IP address but when I press ok or try to sync tyhe plusip I get an error message:

Unable to connect to the remote server

I can control KODI via its web interface in chrome.

What could be wrong?

Depending on your settings of Kodi it could be that you have to provide a username and password too.

Thanks,

Besides the username and password I also had to enable the option: Control by appā€™s on other systems. (a lose translation from Dutch)

After enableing this option it worked.

Glad you got it working :slight_smile:

Hello, sorry I am new, I got the Plugin DL and updated for my player. I am using the latest Matrix vs for Dolby Vision. I am having some issues. One, is its only pulling in a small fraction of my movie library. Its not displaying any cover art at all. Seems like some of the buttons do not work. The main ones are the player ā€œI amusingā€ are player jump forward and back buttons. Also when sliding the progress slider, it does not effect the player. Any thoughts.
Thanks
Mike

So been playing around a bit. Solved the big jump, the latest version of KODI changed the formats for jumps,
Forward = {ā€œjsonrpcā€:ā€œ2.0ā€, ā€œmethodā€:ā€œPlayer.Seekā€, ā€œparamsā€: { ā€œplayeridā€:1, ā€œvalueā€:{ ā€œsecondsā€: 600 } }, ā€œidā€:1}
Backwards = {ā€œjsonrpcā€:ā€œ2.0ā€, ā€œmethodā€:ā€œPlayer.Seekā€, ā€œparamsā€: { ā€œplayeridā€:1, ā€œvalueā€:{ ā€œsecondsā€: -600 } }, ā€œidā€:1}

Cover art is not working. Does it matter what meda data scrubber you use in KODI?

No idea yet on how to assign commands to a slider, I see you can do this with volume sliders so in theory you should be able to do with progress, here is a command I use in DemoPad.

{ā€œjsonrpcā€:ā€œ2.0ā€, ā€œmethodā€:ā€œPlayer.Seekā€, ā€œparamsā€: { ā€œplayeridā€:1, ā€œvalueā€:{ ā€œpercentageā€: [seek bar]} }, ā€œidā€:1}
[seek bar] is the percentage into a video. So I have the range of the seek bar set 0-100, so %50 would be 50 and that will jump to the middle of the movie if I slide the slider to the half way mark.

Hi Mike,

Welcome to The home remote, I recognise your user tagā€¦ probably from irule?

Iā€™ll take a look at the plug-in using the new version on kodi maybe they changed stuff that affected my code. In terms of the scraper I used TMDB for movies, it can be adapted for any tho. For the seeker it should already work unless it was also changed. Iā€™ll take a look later this week.

John

Well sort of, came from irule. I left way back when, right after the sale. Went over to DemoPad and to be honest I like it. I looked at Home Remote early on and did not like what I saw and havenā€™t given it much thought till recently. I do like that you can write scripts for plugins with Home Remote. So willing to take a look. KODI is my main concern. Getting an interface I can work is key.

Also I am thinking they cover art is not working for if I renumber correctly they changed that too with the latest update. I believe you know want parse out uā€™posterā€™: uā€™image:// now instead of thumbnail. You get it by requesting ā€œartā€ instead of ā€œThumbnailā€ . For Thumbnail now now directs you to a local file.

so for the slider I was trying the following line but it did not work
percentagecommand = (ā€™{ā€œjsonrpcā€:ā€œ2.0ā€, ā€œmethodā€:ā€œPlayer.Seekā€, "params"1: { ā€œplayeridā€:ā€™ + ActivePlayer + ā€˜, ā€œvalueā€:{ ā€œpercentageā€:ā€™ + value + ā€˜} }, ā€œidā€:1}ā€™)

Hi - if the slider is not working it mustā€™ve changed I will need to redo it.

Yes I kinda left Irule at a similar time. I tried netio, briefly tested demo pad and another but found the home remote better for my needsā€¦ and it has moved on and improved massively since I started.

John

So I updated the slider and the Big Jump forward and backwards. I am not great at coding, so I am not sure how to upgrade the cover art issue. Just FYI, I am using the first link you posted. Not sure if you have multiple versions for you made a few posts with DL links.

Thanks
Mike

Hi Mike,

Im glad you got the slider working, I have checked on the latest libreelec distibution and the slider still works although you may be using V19 - Librelec remains at 18.9 (leia). The coverart can be easily updated, I use the scraper TMDB for mine and TVDB for TV. I would be wary of using local art as the files can be quite big and take an age to load. Can you send me your result from :

http://IPADDRESS/jsonrpc?request={"jsonrpc":%20"2.0",%20"method":%20"VideoLibrary.GetRecentlyAddedMovies",%20"params":%20{%20"properties":%20["title",%20"year",%20"rating",%20"thumbnail"]},"id":1}

Version 2 is the latest in the first post. Feel free to drop me a PM rather than reply in the thread as its quite long aready and I can help you get it up and running.

John

Hi @john_wallace with your permission i am using this design file.
itā€™s works well, thanks for the effortā€¦i have some doubts, hope you will help.
what should i do if i use more than one kodiPC( in this design)?
which kind of changes should i do when copy the plugin(numbers of kodi) in the same design (with no complex coding) with different pages, moreover i donā€™t have much knowledge in coding :grinning:
*plugin last code
the given code at last of plugin, what is the purpose of it, should i change anything this area when i copy the plugin for multiple kodi?
id's_LI
what is defined in ā€˜idā€™ , should i change anything this area when i copy the plugin for multiple kodi?image
i think the DEVICE_ID and DEVICE_ID2 must change when we copy them right?
what is the further changes should i do?

Hi,

Im glad you can use the plugin - it was my first attempt at learning code too so dont rule out learning yourself. I used freecodecamp JS for beginners on youtube its great for learning JS.

In terms of the id I dont think it matters so just leave them as they are. You could probably use a few ways to have multiple kodi instances, I would probably change the ip to a variable and change that with a button press, so rather than a setting in the plugin have it as a variable.

John

2 Likes

ID is for what media you are playing. I do not know why they did this but I believe 1 is for video and 0 is for music, not sure what 4 is. So play/pause commands with ID of 1 will only play/pause video, not music, and vise versa.

Ok Iā€™m trying to dip my toes into THR since Irule is coming to an end.

I downloaded the V2 hrp in this thread and then took the Kodi script in it, saved it to a new text file, and renamed it Kodi.plugin and tried to import it to a different project. This didnā€™t work; when I try to add the plugin I get an error popup about an invalid port. I donā€™t see anywhere to add the port in the file.

I assume Iā€™m overlooking something simple. How can I use this as a standalone plugin to import into my own projects? Iā€™m hoping I can find devices/plugins for all my stuff and just spend my time on my templates/layouts rather than programming, because god knows I am not going to learn javascript.

Wow I canā€™t believe people are still coming over from irule!

I wrote the plug-in probably a year or more ago, Iā€™m sure the api has changed since then. I would recommend taking a look around the forum and plug-ins as a first step.

The app is so much more than I/rule. Enjoy it.