Video file information speed
#1
Background: PseudoTV requires some basic information before it begins in order to run properly. Primarily, this is the duration, TV show name, episode name, and plot of any video file that's being used. In order to do this, I use the JSON command GetDirectory in order to determine the files selected by a smart playlist. I then do individual SQL commands in order to gather the rest of the information. The JSON command (in one case) takes about 10 seconds to return the file names. The SQL queries take much longer (not to mention the whole being deprecated issue).

When a skin opens the video playlist window (MyVideoPlaylist.xml) the list is populated with all of the files and all of the information about those files in a matter of seconds.

My question: how can a script get the same information that is populated in the skin's list control? To put it another way, I want to get all of the information about a list of files in only a few seconds.

I found a crappy workaround involving opening the MyVideoPlaylist file from the script, scrolling through it, and grabbing the info labels. Needless to say, this isn't a great solution. Are there any better ways to do this?
Reply
#2
Hmm, there shouldn't be any difference (other than transfer overhead, which I would think would be minimal) of the speed of smartplaylists via the UI and via JSON-RPC.

If you're fetching a smartplaylist as a directory, it should already have all the info available to it (i.e. no need to hit the db directly for extra info) - perhaps JSON-RPC doesn't pass this on directly and needs some enhancement specific to smartplaylists?

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
#3
It appears that I just didn't understand JSON. Looking at the code a bit more I realized that any of the commands can use the "field" attribute even if the description of the command doesn't mention it. That solves my problem.
Reply

Logout Mark Read Team Forum Stats Members Help
Video file information speed0