• 1
  • 215
  • 216
  • 217(current)
  • 218
  • 219
  • 226
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
Thank you both SO much!

It's good to know its a known issue regarding the thumbnail...
I'll double check/post my code in a couple of hours when the kids are asleep... Smile
Reply
Hi guys,

Here's my sample of my code which doesn't seem to respect the time for the notification.


Code:
#!/bin/sh

syslog_file="/share/Recordings/syslog.log"

##########
### Get caller ID and store in variable
my_curl_result=$(/bin/grep -i 'CID to deliver' "$syslog_file" | /usr/bin/tail -1 "$syslog_file" | /bin/sed -n -e 's/^.*deliver: //p' | /bin/sed -e "s/'//g")

##########
### Show ID on XBMC via CURL
/sbin/curl --data-binary '{"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"Phone Call","message":"'"$my_curl_result"'"},"displaytime":50000,"id":1}' -H 'content-type:application/json;' 'http://192.168.1.5:8080/jsonrpc'


The notification does not stay on the screen for 50 seconds... (I've set it this high for testing)...

I've got a separate Python call for a different Kodi automation, and that also doesn't follow the timing... So I'm sure its my error:

Code:
showAddedRequest='{"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"Just Added","message":"'+episodeMsg+'"},"displaytime":30000,"id":1}'
Reply
Yes, it seems to be ignoring the displaytime over HTTP (the notification is displayed for about 5 seconds, not 50 seconds), but the displaytime is being respected over RPC (my test last night was over RPC).
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
I was testing over HTTP and WebSockets and it worked fine with both. @Milhouse: RPC is not a transport so I guess you meant TCP Wink
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
Hmmm... Weird.
So I'm reading that Milhouse you were able to reproduce, but Montellese you weren't?
Well, at least reading between the lines I guess my call is correct. But for sure Kodi isn't keeping the notification that long... Smile
Reply
Yes, tcp Smile
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
Well this is strange, the following curl request (based on what my script would use) over HTTP is working as expected:

Code:
curl --data-binary '{"jsonrpc": "2.0", "params": {"message": "message", "displaytime": 50000, "title": "title"}, "method": "GUI.ShowNotification", "id": "libNotification"}' -H 'content-type:application/json;' 'http://192.168.0.8:8080/jsonrpc'

but the following (based on @edrikk's command) is not:
Code:
curl --data-binary '{"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"Phone Call","message":"xxx"},"displaytime":50000,"id":1}' -H 'content-type:application/json;' 'http://192.168.0.8:8080/jsonrpc'

Edit: Aha, looks like @edrikk hasn't included "displaytime" in params{}
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
Yup just saw it as well. The "displaytime" property needs to be inside the "params" object and not outside of it. That explains it.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#%|t!!!

Banging head against a hard object...
As usual problem is between monitor and keyboard. ;(

Thank you guys so much!
Reply
@Montellese : In Kodi beta 1 (Don't know since when since I did not really check this) Input.SendText does not seems to work on text input in global dialogs.

For example in movie list view, go to filter, in the dialog position cursor to title: the send text does not fill the edit. Press enter to open the title dialog, now the send text does work.
Reply
(2014-11-05, 15:53)Tolriq Wrote: @Montellese : In Kodi beta 1 (Don't know since when since I did not really check this) Input.SendText does not seems to work on text input in global dialogs.

For example in movie list view, go to filter, in the dialog position cursor to title: the send text does not fill the edit. Press enter to open the title dialog, now the send text does work.

Thanks for the report. It's very odd as it works perfectly fine in the settings window for me.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
Code:
$ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "Player.GetItem", "params": { "properties": ["title", "album", "artist", "duration", "thuils"], "playerid": 0 }, "id": "AudioGetItem"}' http://192.168.1.16/jsonrpc

{"id":"AudioGetItem","jsonrpc":"2.0","result":{"item":{"album":"","artist":[],"duration":0,"fanart":"","file":"http://192.168.1.4:51613/GstLaunch/i/c3RyZWFtaW5n","label":"c3RyZWFtaW5n","thumbnail":"","title":"","type":"song"}}}

This command make Kodi play the UPNP stream sent from my PC.

However the title displayed is "c3RyZWFtaW5n", and there is no thumbnail. Is it possible to change the "label" and "thumbnail" displayed?

Thanks!
Reply
I'm using Kodi beta 5 to test the json against a command fusion control that I'm creating and I'm having problems returning info from player.Getitem.

In Gotham i was able to return informations for the pvr like plot, label, genre and others. Now at leat in this latest beta this information is not returning. All that is returning is channel number, id and channel.

Maybe something broke for the pvr in the getitem part because this same information still returns correctly if the pvr.getboradcastdetails is called.

This is also only happening with pvr everything else is working fine.

Also is there a way to set timers for recordings from the json? If not that will be really good if implemented in the future.

Thanks,

Marcelo.
Reply
::EDIT::
Nevermind Smile
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
(2014-11-26, 12:10)ASH_Macedo Wrote: I'm using Kodi beta 5 to test the json against a command fusion control that I'm creating and I'm having problems returning info from player.Getitem.

In Gotham i was able to return informations for the pvr like plot, label, genre and others. Now at leat in this latest beta this information is not returning. All that is returning is channel number, id and channel.

Maybe something broke for the pvr in the getitem part because this same information still returns correctly if the pvr.getboradcastdetails is called.

This is also only happening with pvr everything else is working fine.

Also is there a way to set timers for recordings from the json? If not that will be really good if implemented in the future.

Thanks,

Marcelo.

See https://github.com/xbmc/xbmc/pull/5843 for a fix. Thanks for the report.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
  • 1
  • 215
  • 216
  • 217(current)
  • 218
  • 219
  • 226

Logout Mark Read Team Forum Stats Members Help
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC8