•   
  • 1
  • 20
  • 21
  • 22(current)
  • 23
  • 24
  • 226
  •   
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
The idea is that you should be able to use sort and such aswell on add but looking at the code that test case have been overlooked and I guess it will need to wait until eden. But still, the add of an albumid should make it track wise afaik.

But otherwise your on your own for that and need to do get items and manually add each songid. A sturdier way is to add it to a virtual playlist and then start or add that virtual playlist to the currently playing one.

I'll see if I can cook up a patch for it unless someone beats me to it.

Something that should work is AudioPlaylist.Add", { "artistid": x, "sort": "track", "start": 3, "end": 15 }
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: badge.gif]

"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
Thanks for taking a look at it. Is this the kind of thing that should be put on Trac?

I'm pretty sure no sorting is applied so that the order that the tracks are seen is solely determined by the order the results are returned from the sql dB.
Reply
I reckon all that is required is something like:

Code:
Index: FileItemHandler.cpp
===================================================================
--- FileItemHandler.cpp    (revision 33661)
+++ FileItemHandler.cpp    (working copy)
@@ -225,6 +225,8 @@
   CVideoLibrary::FillFileItemList(param, list);
   CFileOperations::FillFileItemList(param, list);

+  Sort(list, param);
+
   return true;
}
Reply
hey, i've followed this thread a while, but i've not come across a solution to the navigation problem. is it possible in the final dharma that you can send keyboard keys or like "up" "back" or "menu" with the json rpc?

oh and i think i found a bug:
when you try to play a file which has moved the whole system stops until you've clicked the "missing file" dialog on the server
Reply
You can always use the eventserver api for these kind of commands. It's UDP based so minimal overhead, very fast.

There are example clients here: http://xbmc.svn.sourceforge.net/viewvc/x...ntClients/
Reply
ncarthy Wrote:I reckon all that is required is something like:

Code:
Index: FileItemHandler.cpp
===================================================================
--- FileItemHandler.cpp    (revision 33661)
+++ FileItemHandler.cpp    (working copy)
@@ -225,6 +225,8 @@
   CVideoLibrary::FillFileItemList(param, list);
   CFileOperations::FillFileItemList(param, list);

+  Sort(list, param);
+
   return true;
}

Definatly put it on trac but I think the best way is to make it go through the entire HandleFilelist method which would allow sort, start and end.
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: badge.gif]

"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
Hi,

i like the new api, but i have some annotations:

1. Playlist.Remove does not work (The other people already mentioned that. Rolleyes ). It would be nice if this would be implemented.

2. GetShares / GetRootDirectory does not work.

3. It's possible to add a folder to the playlist:
Code:
'{"method": "AudioPlaylist.Add", "params": { "file": "/media/usb/mp3" }}'
But the API will not add the files (inside the folder) itself to the playlist.

4. I use the following code to add a file to the playlist:
Code:
'{"method": "AudioPlaylist.Add", "params": { "file": "/media/usb/mp3/track.mp3" }, "id": 1}'
This works fine, but then AudioPlaylist.GetItems returns no song-information like artist, label etc. with this command:
Code:
'{"method": "AudioPlaylist.GetItems", "params": { "fields": ["title", "album", "artist", "duration"] }}'
The response is:
Code:
id: 1
jsonrpc: 2.0
result:
     current: 0
     end: 1
     items:
          0:
               fanart: special://masterprofile/Thumbnails/Video/Fanart/f58940e3.tbn
               file: /media/usb/mp3/Track.mp3
               label:
     paused: false
     playing: true
     start: 0
     total: 1
It would be nice, if this can be fixed. Laugh

5. A method to toggle shuffle-mode would be nice Big Grin

6. The GetXYZInfo-methods are not implemented yet.

Greets,
MKay
Reply
Hi,

I can't answer for items 1-3 on your list but with item 4 I know you won't see any information unless that file is in the music or video database. So just add it and re-run your query.
Reply
Yes that's right, but i want to play for example music from an usb-stick without adding the files to the database ;-)
The old HTTP API had a method for this: AddToPlayList(...).
Reply
hmm, I see now.:o I've looked at the http api method but it doesn't seem to do any extra processing of metadata.

Have you tried using Playlist.Add instead of AudioPlaylist.Add?
Reply
Playlist.Add returns an error :-)
AudioPlaylist.Add works, but with the problem that no information (Artist, Title etc.) about the files is returned when using AudioPlaylist.GetItems.
Reply
Hi i recently updated to dharma. On camelot i was running an python script from my nas when an movie was finished to issue an update library.

Update.py
Code:
#!/usr/bin/python
import urllib
urllib.urlopen("http://user:[email protected]:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.updatelibrary(video)").close()

This updated my library. I wonder if i would be able to achive the same thing with the new json?

Best regards
---------------------------------------------------
Intel NUC Haswell D34010WYK | ATV2 | Logitech Harmony One | Onkyo TX-NR808 Receiver | QNAP 809 | APC Back-UPS RS 550
Reply
Hi, I'm very new to XBMC, and i really need some help. I am trying to use XBMC to play videos on a PC, but I want to control the playlist from another PC. i assume i need to use JSON-RPC to initiate the playlist and play/pause/stop etc.

I am completely clueless how to get started. can some one help me get started? i am proficient w/ .NET and plan to use it. but have no idea where to start. Please help...
Reply
you can use xbmc-send or the webinterface if you don't want to program 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: badge.gif]

"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
Feature request.

I'm not sure if this is even possible, but I'd be in heaven if I could add and remove single tv shows and movies from the library via JSON-RPC instead of doing a blanket VideoLibrary.ScanForContent
Reply
  •   
  • 1
  • 20
  • 21
  • 22(current)
  • 23
  • 24
  • 226
  •   
 
Thread Rating:
  • 8 Vote(s) - 5 Average



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