• 1
  • 196
  • 197
  • 198(current)
  • 199
  • 200
  • 226
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
Something must have broken since then, as:

Code:
{
  "jsonrpc": "2.0",
  "params": {
    "art": {
      "clearart": "null",
      "clearlogo": "http://assets.fanart.tv/fanart/movies/19908/hdmovielogo/zombieland-5145e97ed73a4.png"
    },
    "movieid": 312
  },
  "method": "VideoLibrary.SetMovieDetails"
}

results in:
Code:
[
  {
    "movieid": 312,
    "title": "Zombieland",
    "art": {
      "fanart": "image://nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland (2009)[BDRip]-fanart.jpg/",
      "poster": "image://nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland (2009)[BDRip]-poster.jpg/",
      "clearart": "image://null/",
      "clearlogo": "image://http://assets.fanart.tv/fanart/movies/19908/hdmovielogo/zombieland-5145e97ed73a4.png/"
    },
    "file": "nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland (2009)[BDRip].mkv",
    "label": "Zombieland"
  }
]
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
if you use:
PHP Code:
"clearart""null" 
it will indeed think that's an actual image link Smile
my code is a bit missleading as i had to add the 'null' to be able to pass it to the other code
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
(2013-10-04, 11:20)Martijn Wrote: if you use:
PHP Code:
"clearart""null" 
it will indeed think that's an actual image link Smile
my code is a bit missleading as i had to add the 'null' to be able to pass it to the other code

I've tried just about every combination - with/without quotes! Didn't think your version would work (the result was entirely expected) but I gave it a shot anyway! Smile

It seems that any attempt to pass an empty string ("") or null/None will fail.
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
Note that I've confirmed the same behaviour in Frodo 12.2: "", None, null all return an error, and setting a single member of art[] does not remove the remaining members.
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
This is likely due to CVideoDatabase::SetArtForItem() basically just iterating through the art you pass in and adding each item. i.e. there's no removal (just replacement). Given the way that we might go and look for more art if it turns out to be not in the database at all (e.g. no fanart entry at all) it might be wise to define empty/None as being clear.

If so, all that needs doing is making sure JSON-RPC supports this. By the looks it's intentionally non-empty currently:

https://github.com/xbmc/xbmc/blob/master....json#L359

@Montellese I'm sure will let us know whether this can be changed to a string or not.

Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
(2013-10-05, 05:06)jmarshall Wrote: it might be wise to define empty/None as being clear.

Thanks Jonathan. Do you mean "clear" as in, "interpet this artwork item as not being set" (while still writing it to the database, albeit empty), or "clear" as in "remove the item when updating the database"?

Although the former would be fine (I think - it would depend on how other add-ons are testing if a value exists), it would be nice to have the option to be able to remove those items that you don't want/need in the database. Ideally it would be possible to give an item a value such as None (or null) meaning that the item won't then be written back to the database, effectively removing it.
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
Yes, I think we could remove them. I was initially hesitant about doing so, because if XBMC finds no art at all for an item then it will go and grab local art. As long as there's one, though, it should be OK.

So yeah, the ability to specify None or null rather than just the empty string (though we could just as well interpret the empty string as meaning remove).

Let's wait and see what Montellese thinks.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
IMHO empty string ("") should continue to be interpreted as just that, and the item left in the database - there's plenty of examples where fields exist today that are set to the empty string (eg. lastplayed, trailer etc.) which could cause problems if they suddenly started disappearing from the database.

null/None on the other hand is fairly unambiguous, and a suitable trigger for removal.
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 wasn't suggesting applying empty string -> remove for everything. Just for art. But agreed that None/null is less ambiguous.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
Supporting null (and empty strings) in the interface is certainly possible. The question is how to pass the null value on to CVideoDatabase since it expects a map<string,string>.
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
Either pass as empty string, or (better) add a ClearArtForItem()
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
So there would be logic in JSON-RPC code that would detected the null'ed artwork types and call ClearArtForItem for those artwork types?
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
There is a way to get the actual XBMC profile using JSON ? I need to identify what profile is running and then create some actions based on that, the user have two profiles, one for music and another for movie. I tried to found, but no luck until now.
Very thanks
Clayton
Reply
(2013-10-06, 00:56)claymic Wrote: Hi
There is a way to get the actual XBMC profile using JSON ? I need to identify what profile is running and then create some actions based on that, the user have two profiles, one for music and another for movie. I tried to found, but no luck until now.
Very thanks
Clayton

The "Profiles" namespace has been added very recently to the gotham nightly builds.
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: Yup, I reckon that's the best way to go.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
  • 1
  • 196
  • 197
  • 198(current)
  • 199
  • 200
  • 226

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