• 1
  • 79
  • 80
  • 81(current)
  • 82
  • 83
  • 226
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
Very nice work
Thanks
Reply
Hi Guys,

Before I submit a Bug Ticket I thought I would run this by you first.

When accessing my Music Videos through "Music/Library/Music Videos" and I use "Player.GetActivePlayers" it returns " "video":true " which is correct but then if I use "VideoPlaylist.GetItems" I don't get any info returned or it returns the last played video from Video Player. I have to use "AudioPlaylist.GetItems" to get any info. This not such a big deal but there is no way to tell that I'm aware of, which Playlist Player is active. Is there a way?

Also if the "fields" from "List.Fields.Video" & "Audio.Fields.Song" do not match (e.g. "runtime" does not exist in "Audio.Fields.Song") I can not retrieve it.

I've found some other bugs in regards to how "runtime" is displayed/stored (only shows minutes i.e. "3") in "Music Video Information" on screen and when returned through "VideoPlaylist.GetItems". Also not being able to access "Music Video Information" from the "Context Menu" from "Music/Library/Music Videos". I know this is the wrong Thread for this but I've been looking through the Forums for a Thread for Nightly Build Bugs but could not find one. Is there such a Thread or do I just post in the XBMC General Help and Support?


Cheers
Jason
Reply
jasonvp Wrote:When accessing my Music Videos through "Music/Library/Music Videos" and I use "Player.GetActivePlayers" it returns " "video":true " which is correct but then if I use "VideoPlaylist.GetItems" I don't get any info returned or it returns the last played video from Video Player. I have to use "AudioPlaylist.GetItems" to get any info. This not such a big deal but there is no way to tell that I'm aware of, which Playlist Player is active. Is there a way?

Also if the "fields" from "List.Fields.Video" & "Audio.Fields.Song" do not match (e.g. "runtime" does not exist in "Audio.Fields.Song") I can not retrieve it.

I am currently working on completely restructuring the Player and Playlist namespaces. That means that there won't be a VideoPlaylist and a AudioPlaylist namespace anymore but only a Playlist namespace. But please create a bug report nonetheless so I don't forget about it. I'll see if it works with the refactored Playlist but it probably has the same bug.

jasonvp Wrote:I've found some other bugs in regards to how "runtime" is displayed/stored (only shows minutes i.e. "3") in "Music Video Information" on screen and when returned through "VideoPlaylist.GetItems". Also not being able to access "Music Video Information" from the "Context Menu" from "Music/Library/Music Videos". I know this is the wrong Thread for this but I've been looking through the Forums for a Thread for Nightly Build Bugs but could not find one. Is there such a Thread or do I just post in the XBMC General Help and Support?

Just create bug tickets for every bug you encounter and provide as much information as possible so that any developer looking into it will be able to reproduce 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
Thursday, September 15th 2011:
Commits: 44b94fac978ef101d442
  • Renamed "shares" to "sources" in the return value of Files.GetSources
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:I am currently working on completely restructuring the Player and Playlist namespaces. That means that there won't be a VideoPlaylist and a AudioPlaylist namespace anymore but only a Playlist namespace.

That sounds like a great idea. I was actually thinking about that the other day.

Thanks again for your help.


Cheers
Jason
Reply
Hi,

I just tried the nightly build from today 16.09.

Does the AudioPlayList.Add functions have changed?

Adding a album or artist doesnt work anymore.
Adding a song works as before.

Doesnt work:
Code:
{"jsonrpc": "2.0", "method": "AudioPlaylist.Add","id" :1, "params":{"item": { "albumid":1 }}}

Code:
{"jsonrpc": "2.0", "method": "AudioPlaylist.Add","id" :1, "params":{"item": { "artistid":1 }}}

Works:
Code:
{"jsonrpc": "2.0", "method": "AudioPlaylist.Add","id" :1, "params":{"item": { "songid":1}}}

Regards
Klaus
Reply
sunny-hd Wrote:Hi,

I just tried the nightly build from today 16.09.

Does the AudioPlayList.Add functions have changed?

Adding a album or artist doesnt work anymore.
Adding a song works as before.

Doesnt work:
Code:
{"jsonrpc": "2.0", "method": "AudioPlaylist.Add","id" :1, "params":{"item": { "albumid":1 }}}

Code:
{"jsonrpc": "2.0", "method": "AudioPlaylist.Add","id" :1, "params":{"item": { "artistid":1 }}}

Works:
Code:
{"jsonrpc": "2.0", "method": "AudioPlaylist.Add","id" :1, "params":{"item": { "songid":1}}}

Regards
Klaus

You are right, I must have messed that up with my commit a few days ago where I added new functionality to xbmc's JSON schema implementation. I just fixed it with this commit so it should work again in the next nightly build.

Thanks for reporting this.
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 known that commands like this return the full contents of the directory even if they are not included in any of the media sources?

{ "id" : 102, "jsonrpc" : "2.0", "method" : "Files.GetDirectory", "params" : { "directory" : "/etc" } }

Even worse: you can also download the contents of the file:
http://xbmcbox:8080/vfs/etc/passwd

This seems quite insecure to me. I know that there are security concepts planned, but even with a login I see now reason why the API should expose system config files.

Other than that, the API is turning out very well Smile
Reply
mzanetti Wrote:Hi! Is it known that commands like this return the full contents of the directory even if they are not included in any of the media sources?

{ "id" : 102, "jsonrpc" : "2.0", "method" : "Files.GetDirectory", "params" : { "directory" : "/etc" } }

Even worse: you can also download the contents of the file:
http://xbmcbox:8080/vfs/etc/passwd

This seems quite insecure to me. I know that there are security concepts planned, but even with a login I see now reason why the API should expose system config files.

Other than that, the API is turning out very well Smile

Its known, its very bad but its known Tongue

Your more than welcome to start a trac ticket about it so that we can discuss ways to remove this flaw.
If you have problems please read this before posting

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

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
Sunday, September 18th 2011:
Commits: c4f161e177f5e079f2ba and 525833acf0b7fa3a9404
OK these two commits (especially the first one) are a huge step in the current jsonrpc API because they completely refactor the handling of players and playlists. First of all there will be no seperate VideoPlayer, AudioPlayer and PicturePlayer anymore but only one Player namespace. The same goes for VideoPlaylist and AudioPlaylist which has been replaced by a refactored Playlist namespace which even offers limited support for picture playlists (aka slideshows). Furthermore a lot of methods have been merged/refactored/moved. From now on the Playlist namespace simply represents a playlist (i.e. a sorted list of playable items) and does not provide any playback controlling functionalities anymore. Those have all been moved into the Player namespace because the players are responsible for playing items and not the playlists. I'm sure there will be quite a few questions about these changes so don't hesitate to post them here or ask me on IRC. Here is a more or less complete list of all important changes:
  • Merged AudioPlayer, VideoPlayer and PicturePlayer into Player
  • Merged AudioPlaylist and VideoPlaylist to replace Playlist and provide initial support for picture playlists (aka slideshows)
  • Players/Playlists are no longer accessed by their media type (video, audio, picture) but by a unique ID. Active players/playlists (their ID and media type) can still be retrieved using Player.GetActivePlayers/Playlist.GetPlaylists
  • Replaced Playlist.State with Playlist.GetProperties
  • Replaced Player.State, Player.GetTime and Player.GetPercentage with Player.GetProperties
  • Removed Playlist.SkipPrevious and Playlist.SkipNext (use Player.GoPrevious and Player.GoNext instead)
  • The following methods have been moved from the Playlist to the Player namespace: Play (renamed to Open), Shuffle, UnShuffle, Repeat
  • Refactored notifications for the Player namespace
  • Unified naming of position/item/index parameters in Player and Playlist namespaces
  • Merged XBMC.Play and XBMC.StartSlideshow into Player.Open
  • Make Playlist.Add, Playlist.Clear and Player.Open work for picture playlists
  • Replace Rewind and Forward with SetSpeed in Player namespace
  • Replace "value" parameter in "Player.SeekTime" with time struct parameters
  • Merge SeekTime, SeekPercentage and (Small|Big)Skip(Forward|Backward) into Seek in Player namespace
  • Add Player.SetAudioStream, Player.SetSubtitle and the properties "currentaudiostream", "audiostreams", "subtitleenabled", "currentsubtitle" and "subtitles" to Player.GetProperties
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:GetInfoLabels and GetInfoBooleans have been moved from the System to the XBMC namespace and are considered deprecated. Please let us know which data you retrieve most using these methods so that we can provide better access to those values.
I'm using these to get
  • System.ProfileName to react to profile changes
  • Playlist.isRandom and MusicPartyMode.Enabled - will need to check wether these available through the new playlist namespace (edit: They are.)
  • Player.Time, Player.TimeRemaining, Player.Duration since these returned the data regardless of which player was actually playing. The new Player namespace is definitely a step forward here.
Question:
When will GetInfoBooleans/Labels be removed?
Reply
grywnn Wrote:System.ProfileName to react to profile changes
Yes this is not available yet in any other way. We first wanted to provide a notification on Profile switching but the problem is that the TCP server is shutdown when logging out of a profile.

grywnn Wrote:Playlist.isRandom and MusicPartyMode.Enabled - will need to check wether these available through the new playlist namespace (edit: They are.)
Correct they are available through Player.GetProperties with the properties "shuffled" and "partymode".

grywnn Wrote:Player.Time, Player.TimeRemaining, Player.Duration since these returned the data regardless of which player was actually playing. The new Player namespace is definitely a step forward here.
Player.GetProperties exposes "time" and "totaltime". Using these you can also calculate the remaining time. But you still need to get those infos for a specific player. But you can use the same method call, just need to provide the correct playerid.

grywnn Wrote:Question:
When will GetInfoBooleans/Labels be removed?
No specific plans yet as we are still waiting for further feedback on which infolabels are required.
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:Yes this is not available yet in any other way. We first wanted to provide a notification on Profile switching but the problem is that the TCP server is shutdown when logging out of a profile.

I've always wondered a bit on that and really the json-rpc should be system wide in some sense. Would be awesome if you could via webinterface "login" to another profile. Having a way to do this all via a method like JSONRPC.Authenticate would be real cool. Not sure if its really valid to do this system wide type of interaction, something we need to discuss and decide possibilities regarding I guess. If we had that logic we could have a property in Application stating what profile or authentication it runs under then have the client authenticate for that or something else if it wish.

Regarding the System.ProfileName, I guess it could easily be added to something like XBMC.GetProperties until we have a better placement for it?
If you have problems please read this before posting

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

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
Long time since not posting in this thread Smile

For Yatse i use infolabels :

Quote: "MusicPlayer.Title",
"MusicPlayer.Album",
"MusicPlayer.Artist",
"MusicPlayer.Property(Artist_Description)",
"MusicPlayer.Genre",
"MusicPlayer.Year",
"MusicPlayer.TrackNumber",
"MusicPlayer.Codec",
"Player.Time",
"Player.Duration",
"Player.Volume",
"Player.Filenameandpath",
"VideoPlayer.Title",
"VideoPlayer.TVShowTitle",
"VideoPlayer.Genre",
"VideoPlayer.Director",
"VideoPlayer.Year",
"VideoPlayer.Rating",
"VideoPlayer.Tagline",
"VideoPlayer.Studio",
"VideoPlayer.Plot",
"VideoPlayer.Season",
"VideoPlayer.Episode",
"VideoPlayer.VideoCodec"

All in one request this permit to have all the needed information for remotes to display and react to changes without having to make 3 or 4 request every seconds.

I also use :
"System.BuildVersion" and "System.ProfileName" to detect changes in profile and Xbmc version and ask users or auto change database on client side to avoid errors.
Reply
hi all..
this is a really stupid and newb like question... (actually i am one..) but i was looking through the webAPI, which is now deprecated, it has support for changing guisettings.
I have not found this in jsonRPC. I even traced through the code, and i see that the only one actually accessing the gui functions is either through xbmcUtil or the webAPI.

am i missing something? are these in fact no longer supported? sorry for the stupid question, but i've searched for settings/guisettings/audiooutput (the one i'm interested in ) in json related wikis and posts for awhile, and i did not find anything specific.
Reply
  • 1
  • 79
  • 80
  • 81(current)
  • 82
  • 83
  • 226

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