Author Topic: New Category  (Read 4098 times)

0 Members and 1 Guest are viewing this topic.

Hiryu

  • Contributor
  • ***
  • Posts: 53
  • Karma: 2
    • View Profile
New Category
« on: August 07, 2014, 12:59:18 PM »
Hi -- was wondering how if there is a tutorial for adding a new category in XBMC to VC.  For example, a Video category that is neither Movie or TV Show (I was thinking about adding some large video screen savers that I don't want to lump in to Movie or TV Show).  How would I go about generating XMLs and building commands so that Vox Commando can do the same search and play commands for this new group?

Also, conceptually, if it's a completely new group -- say adding Hyperspin/PC Games category -- would it be the same process? 

Thanks.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: New Category
« Reply #1 on: August 08, 2014, 06:00:42 PM »
Hi,

There's no such tutorial that I can think of. It's not quite clear what you mean by "adding a new category in XBMC to VC". Do you mean that you want to create a new command group in VC? (http://voxcommando.com/mediawiki/index.php?title=Groups)

Is the video screen saver some kind of add-on in XBMC? We're not familiar with either the video screensaver thing nor do we use Hyperspin.

With regard to generating payload xml files and building commands, all of this is based on how the "other end" functions. If you can explain a bit more about how these two things work, we can probably be more helpful.

The other payload XML files for XBMC are generated via sql queries of the XBMC databases that are stored in your XBMC userdata directory (e.g. MyVideos75db). But this is not the only way to grab data for payload xml files. You can scrape a website and use regular expressions to grab the necessary data and then pass this data into a payload xml file, just as an example. How you generate your payload xml files, again, depends on how the other end serves up its data.


 
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Hiryu

  • Contributor
  • ***
  • Posts: 53
  • Karma: 2
    • View Profile
Re: New Category
« Reply #2 on: August 08, 2014, 06:18:02 PM »
Sorry for being unclear.  I meant in XBMC, you can create more categories of media.  The default categories in XBMC usually has movies, tv shows, and music.  I added another category in XBMC -- just called Videos (and this will contain miscellaneous videos that are neither movie nor TV shows).  I am able to wrap my head around the basic commands in VC for movies and tvshow because jitterjames has so helpfully built them in and they are labelled very clearly, but I am at a loss as to generating a whole new xml/payload/and set of commands to use VC and interact with this new category of files that are listed in XBMC.

For example, let's say it's just a really high resolution Ocean video in the new category Videos.  I wouldn't be able to use "Play movie Ocean" because it is not part of the xbmcMovies.xml or in xbmcMovieIDs.  The Play Movie command in VC is XJson,Raw Player,open "item":{"movieid":{1}}.  Since the Ocean video is not in the category Movies, I assume the sql queries won't pick up the video as a movie.  I also don't understand the code behind it enough to reverse engineer a solution.

Sorry if I'm still being unclear, but hopefully that explains it a bit better.  I think if I can figure this out, my understanding of VC will reach another level, and hopefully won't have to keep asking these basic questions!

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: New Category
« Reply #3 on: August 08, 2014, 06:53:45 PM »
Nime5ter, maybe the smart playlist thing can solve the problem. I'm not able to explain how to create a smart playlist in VC for XBMC.
It is only a idea, maybe I am complete wrong - than sorry  :-X

http://voxcommando.com/forum/index.php?topic=1511.0
« Last Edit: August 08, 2014, 06:56:14 PM by Kalle »
***********  get excited and make things  **********

Hiryu

  • Contributor
  • ***
  • Posts: 53
  • Karma: 2
    • View Profile
Re: New Category
« Reply #4 on: August 08, 2014, 07:26:57 PM »
Kalle,

Thanks for jumping in too.  I'll take a look at the link, but I'm not sure that's what it is.  In any case, I just saw your iRule VC video on youtube the other day -- so cool!

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: New Category
« Reply #5 on: August 08, 2014, 10:34:13 PM »
This can perhaps get you started:

I think (but don't know for sure -- I'm not the XBMC expert around here) that even if you create a new 'videos' category within XBMC ("Kodi"!  :-\), the media data will still be stored in a table in your myVideos db.

http://wiki.xbmc.org/?title=Userdata

So, coming up with the payload xml for your Ocean-style videos is probably just a question of querying the right table in that db. I usually just poke around in the relevant db file to find the table(s) I need and take it from there. SQLite Spy works fine for this kind of thing.

If you haven't noticed it yet, take a look in the xSql plugin in VC. There you can see the types of queries that are being used to generate payload xml for XBMC. The settings also show you the filepath to follow if you don't know of it already.

If you are comfortable with this kind of thing, you can probably come up with the query pretty quickly. It's mostly a question of identifying the table in which this data is stored.

So, let's start with this aspect, and then we can move on to the next step. If you're playing these videos in the normal "theatrical" way in XBMC, then yeah, you may simply need to clone the "play movie {1}" command, change the payload file it's pointing to, and probably you will have to change the json syntax from "open "item":{"movieid":{1}"} to the proper id label for your special videos.

This thread, and the other thread it links to, might be useful for you: http://voxcommando.com/forum/index.php?topic=1603.0
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: New Category
« Reply #6 on: August 09, 2014, 03:57:43 AM »
Kalle,

Thanks for jumping in too.  I'll take a look at the link, but I'm not sure that's what it is.  In any case, I just saw your iRule VC video on youtube the other day -- so cool!
If you want to do the same in iRule, here is the way  ;)

http://voxcommando.com/forum/index.php?topic=1158.msg9816#msg9816
***********  get excited and make things  **********