• 1
  • 116
  • 117
  • 118(current)
  • 119
  • 120
  • 226
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
For currently playing, you can ask for totaltime and time to get those informations.
Reply
I have a large video library and when I trigger an update on it, XBMC usually takes 3-5 minutes to finish scanning everything.
I am seeing a problem when I call Videolibrary.Scan when XBMC is already scanning. In fact, calling it seems to stop the current scan, which is counter-intuitive.

See debug log below. I first call it at 11:00:02. XBMC starts its scanning routine. Then I call it agan a second later at 11:00:03 and XBMC immediately stops its scanning and ends the update.

I'd recommend either a query method like VideoLibrary.IsCurrentlyUpdating so we can query the status.
Or at least the JSON-RPC interface should prevent Videolibrary.Scan when XBMC is already scanning, and not return "result":"OK" (like it currently does).

Code:
[b]11:00:02 T:8908   DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.Scan", "params": {}, "id": "1"}[/b]
11:00:02 T:8908   DEBUG: JSONRPC: Calling videolibrary.scan
11:00:03 T:5012   DEBUG: ------ Window Init (DialogVideoScan.xml) ------
11:00:03 T:5012    INFO: Loading skin file: DialogVideoScan.xml
11:00:03 T:12232   DEBUG: Thread VIDEO::CVideoInfoScanner start, auto delete: 0
11:00:03 T:12232  NOTICE: VideoInfoScanner: Starting scan ..
11:00:03 T:12232   DEBUG: VideoInfoScanner: Skipping dir 'smb://ONYX/Data-2tb/Videos/BluRays/' due to no change (fasthash)
11:00:03 T:12232   DEBUG: VideoInfoScanner: Skipping dir 'smb://ONYX/Data-2tb/Videos/DVDs/' due to no change (fasthash)
11:00:03 T:12232   DEBUG: VideoInfoScanner: Skipping dir 'smb://ONYX/Data-2tb/Videos/Movies/' due to no change
11:00:03 T:12232   DEBUG: VideoInfoScanner: Skipping dir 'smb://ONYX/Data-2tb/Videos/Movies/Knight and Day/' due to no change (fasthash)
11:00:03 T:12232   DEBUG: VideoInfoScanner: Skipping dir 'smb://ONYX/Data-2tb/Videos/Movies/The Other Guys/' due to no change (fasthash)
11:00:03 T:12232   DEBUG: VideoInfoScanner: Skipping dir 'smb://ONYX/Data/compressed/Movies/' due to no change (fasthash)
11:00:03 T:12232   DEBUG: VideoInfoScanner: Skipping dir 'smb://ONYX/Data/compressed/StreamingVideos/Movies/' due to no change (fasthash)
11:00:03 T:12232   DEBUG: VideoInfoScanner: No (new) information was found in dir smb://ONYX/Data/compressed/StreamingVideos/TV Shows/24/
11:00:03 T:12232   DEBUG: VideoInfoScanner: No (new) information was found in dir smb://ONYX/Data/compressed/StreamingVideos/TV Shows/30.Days/
11:00:03 T:12232   DEBUG: VideoInfoScanner: No (new) information was found in dir smb://ONYX/Data/compressed/StreamingVideos/TV Shows/30.Rock/
11:00:03 T:12232   DEBUG: VideoInfoScanner: No (new) information was found in dir smb://ONYX/Data/compressed/StreamingVideos/TV Shows/Alcatraz/
11:00:03 T:12232   DEBUG: VideoInfoScanner: No (new) information was found in dir smb://ONYX/Data/compressed/StreamingVideos/TV Shows/America/
11:00:03 T:12232   DEBUG: VideoInfoScanner: No (new) information was found in dir smb://ONYX/Data/compressed/StreamingVideos/TV Shows/Arrested.Development/
11:00:03 T:12232   DEBUG: VideoInfoScanner: No (new) information was found in dir smb://ONYX/Data/compressed/StreamingVideos/TV Shows/Battle.360/
11:00:03 T:12232   DEBUG: VideoInfoScanner: No (new) information was found in dir smb://ONYX/Data/compressed/StreamingVideos/TV Shows/Blue's.Clues/
[b]11:00:03 T:8908   DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.Scan", "params": {}, "id": "1"}
[/b]11:00:03 T:8908   DEBUG: JSONRPC: Calling videolibrary.scan
11:00:03 T:12232   DEBUG: VideoInfoScanner: No (new) information was found in dir smb://ONYX/Data/compressed/StreamingVideos/TV Shows/Bones/
11:00:03 T:12232  NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:00
11:00:03 T:12232    INFO: Video scan was stopped or finished ... restoring FindRemoteThumbs

EDIT - It also would be nice to be able to trigger a "Scan for content" on a specific directory instead of having to update my entire library and scan thousands of folders when I just need one scanned.
Is there a trac ticket/feature request for this yet?
XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Reply
This has already been reported before. This is how the builtin command works that XBMC provides in all it's APIs like the skinning engine etc. A "isscanning" property might be considered though. Not sure if there already is a ticket for 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
Montellese Wrote:This has already been reported before. This is how the builtin command works that XBMC provides in all it's APIs like the skinning engine etc. A "isscanning" property might be considered though. Not sure if there already is a ticket for it.

OK, I understand this is a core XBMC issue instead of a JSON-RPC issue.

Maybe a smaller request would be to support specifying a specific directory to be scanned instead of the whole video library.

I know the XBMC built in command has the option to specify a directory
Code:
UpdateLibrary(database,[path])
It would sure be nice if the JSON-RPC VideoLibrary.Scan has an optional path parameter as well.

It would sure speed up scans for users with large libraries...
XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Reply
See https://github.com/Montellese/xbmc/commi...f42ce79141 i.e. I have already implemented this a few weeks ago and it's waiting for Eden to be released and then I'll merge it into master.
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
hi,

Is it possible via Json to put video in full screen or window inside template (like "tab" button)??
Reply
Currently not but I have already done the necessary coding for a GUI.SetFullscreen() method which will be available after Eden has been released.
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
Montellese Wrote:Currently not but I have already done the necessary coding for a GUI.SetFullscreen() method which will be available after Eden has been released.

thxfor quick reply Wink
Reply
In Dharma, I was able to detect if XBMC was scanning the library by using the System.GetInfoBooleans method with params ["library.isscanning"]. I see that in Eden the method is now XBMC.GetInfoBooleans, but it's not accepting library.isscanning. It comes back with an "invalid type string received" error:

Code:
{"params": ["library.isscanning"], "jsonrpc": "2.0", "method": "XBMC.GetInfoBooleans", "id": 1}
{"error":{"code":-32602,"data":{"method":"XBMC.GetInfoBooleans","stack":{"message":"Invalid type string received","name":"booleans","type":"array"}},"message":"Invalid params."},"id":1,"jsonrpc":"2.0"}

It's not clear to me what the proper parameters should be now. Can someone point me in the right direction? Or perhaps with Eden there is a better way to determine if it's currently scanning the library?

Thanks!
Reply
Please take a look at the documentation in the wiki or at the output of JSONRPC.Introspect. It's very clearly written that the "params" object/array needs to contain an array of strings (named "booleans" in case you use parameters-by-name): http://wiki.xbmc.org/index.php?title=JSO...foBooleans

So you're request needs to be
Code:
{"params": { "booleans": ["library.isscanning"] }, "jsonrpc": "2.0", "method": "XBMC.GetInfoBooleans", "id": 1}
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
Montellese Wrote:It's very clearly written that the "params" object/array needs to contain an array of strings (named "booleans" in case you use parameters-by-name):
Thanks Montellese. I should have expanded the JSON schema description where this is very clear. I didn't pay proper attention to the description of the interface changes.

In any case, the "JSON RPC: Important changes" thread says that XBMC.GetInfoBooleans is considered deprecated. Is there a non-deprecated way at this time to determine if the library is currently being scanned?

Thanks again.
Reply
No there isn't.
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
All right. While I have you, in case it's not already on your to-do list, I thought I'd mention that there are two things that keep me using the deprecated HTTP API which (from what I can tell) the JSON-RPC doesn't support yet:

1. XBMC.Notification via ExecBuiltIn
2. XBMC.updatelibrary via ExecBuiltIn -- I understand there is VideoLibrary.Scan, but I need the ability to specify a sub-path, whereas VideoLibrary.Scan does a full library scan.

Not urgent while the HTTP API exists, but I'd certainly not want the HTTP API to vanish before the JSON API exposes at least this functionality. Smile
Reply
I have already implemented both methods/changes, they are just waiting for Eden to get out of the door 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
Hi,

Little bug for Json PVR. Can't use it when some OSD is present. Working very well when i'm in full screen (not when i m in PVR screen ,EPG, or when tv video is in miniature when you are in home page...)

Thx
Reply
  • 1
  • 116
  • 117
  • 118(current)
  • 119
  • 120
  • 226

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