Author Topic: Automatic importing of XBMC items  (Read 8649 times)

0 Members and 1 Guest are viewing this topic.

jtap

  • Jr. Member
  • **
  • Posts: 4
  • Karma: 0
    • View Profile
Automatic importing of XBMC items
« on: August 24, 2010, 04:38:31 PM »
Hello,

Just wanted to say thanks for making this great program and integrating it into everyone's favorite HT frontend!  I have been messing around with adding a few movies and some music to Vox Commando and it really works great.  My only caveat...I have over 2,000 movies and about 10 times that amount of songs.  Was just wondering if you have found a way yet to do sort of an "import" of the XBMC library? 

I know on the XBMC iPhone app it automatically pulls all of the movies, music, etc and even the covers - so there must be something in the api that would allow this?

As much as I have contemplated it...I just can't see myself doing my entire library by hand.  :)  Perhaps I can coerce you with a nice donation? :)  cheers

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Automatic importing of XBMC items
« Reply #1 on: August 24, 2010, 09:14:04 PM »
Yep, I am working on it.  I made some progress today.  I've actually got the code working, but have found it to be a bit slow to load so I have been trying to optimize it.  I'll try to get something out in the next day or two.  If I can't speed it up, I'll just post it as is.

A donation would be welcome of course, but I am working on this anyway.

you really have 1000s of movies?  Wow.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Automatic importing of XBMC items
« Reply #2 on: August 24, 2010, 10:19:17 PM »
give this a whirl.  it's still very basic but it should work.  there is a GenXML button on the main interface.  Open that and then click Movies and it will generate an xml file in your application folder called xbmcMovies.xml.

Create a command using that file as the payloadXML.  That file will have the names of the movies as the phrases and the path to the file as their corresponding values.  It currently uses partial phrases by default so you can say only part of the movie name to trigger it.

To just play that movie you can create an action of type XBMC and enter this command string:

PlayFile({1})

where {1} will be replaced by the path to the movie.

I would actually prefer to use just the name of the movie and have it find the path of the file only when you ask for it because this would be much faster and save memory, but I'm not there yet.  Same will go for artists etc.

edit:  look a few posts down for the file...
« Last Edit: August 25, 2010, 12:02:20 PM by jitterjames »

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: Automatic importing of XBMC items
« Reply #3 on: August 25, 2010, 09:39:28 AM »
James,

Ok in this 3 generation of XML files, it worked correctly, however when building the command
reading of files is okay, but try to make a save or a save as, appears a series of
dialog box TRUE and hangs after restart only the movie file was loaded, the other
XML payloads are empty, no data, very likely because they are not saved, because the error
appointed.
In the 0795 version save this ok, I tried ... I returned to the previous version and everything was fine ...

Grateful,
Wanilton
« Last Edit: August 25, 2010, 10:49:49 AM by Wanilton »
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Automatic importing of XBMC items
« Reply #4 on: August 25, 2010, 10:10:42 AM »
do you mean this:

when you edit a payload file and then click save, you get a dialog box that says "true" over and over? ???

I will fix it today, that was a side effect of some debugging I was doing.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Automatic importing of XBMC items
« Reply #5 on: August 25, 2010, 12:00:53 PM »
ok, this should fix that minor bug when saving payloadXML files

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: Automatic importing of XBMC items
« Reply #6 on: August 25, 2010, 02:56:45 PM »
Now it's perfect, I suggest that the button generating the file by going to Options tab XBMC, seems more appropriate.
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

jtap

  • Jr. Member
  • **
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Automatic importing of XBMC items
« Reply #7 on: August 26, 2010, 08:43:05 PM »
Sorry, but where is the download link?

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: Automatic importing of XBMC items
« Reply #8 on: August 26, 2010, 08:49:51 PM »
Jtap, two post up...LOOK...
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

jtap

  • Jr. Member
  • **
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Automatic importing of XBMC items
« Reply #9 on: August 26, 2010, 08:55:01 PM »
Oh my bad.  It's small and im viewing on a TV :)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Automatic importing of XBMC items
« Reply #10 on: August 26, 2010, 09:21:16 PM »
Now it's perfect, I suggest that the button generating the file by going to Options tab XBMC, seems more appropriate.

Thanks for the suggestion.  I was originally going to put it there.  But then I had both a technical reason (the way my classes are organized in my code) and also a logical reason that will make more sense once I develop the idea further.

I think I may actually want to make it a completely different program to do this, so that you could call it periodically to update Vox's xml files.  Also, I will probably not just use it for XBMC but will have  a number of different xml files that can be updated for data from different programs, such as WMC, mediamonkey, itunes and XMBC (and maybe others one day).

Anyway, for now it is easier to leave it where it is, but we will decide later on, when the idea is better developed. :)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Automatic importing of XBMC items
« Reply #11 on: August 27, 2010, 09:05:18 AM »
Oh my bad.  It's small and im viewing on a TV :)
I don't much like the way this forum handles attachments, but what can you do?  I guess the answer is go and change the forum code, but that doesn't sound like much fun...

jtap

  • Jr. Member
  • **
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Automatic importing of XBMC items
« Reply #12 on: August 27, 2010, 12:12:28 PM »
Any plans on including songs in the exporting of XML files?  I am having some trouble playing music by artist only - but I will tinker some more with it over the weekend.  It doesn't look like they are being added to the playlist...

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: Automatic importing of XBMC items
« Reply #13 on: August 27, 2010, 12:40:50 PM »
Friend, xml files already includes albums and artists, plus films, it remains only for series of tvs and songs, which is more complicated I guess..
« Last Edit: August 27, 2010, 12:42:35 PM by Wanilton »
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Automatic importing of XBMC items
« Reply #14 on: August 27, 2010, 01:39:11 PM »
I am having some trouble playing music by artist only - but I will tinker some more with it over the weekend.  It doesn't look like they are being added to the playlist...
are you using the artist option from the options/xbmc tab, or are you using GENxml and then creating a command that uses the payloadXML and the exported file?

try using the options/xbmc tab with the version 0.795 (and a half) found here:

http://voxcommando.com/forum/index.php?topic=55.msg279#msg279

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: Automatic importing of XBMC items
« Reply #15 on: September 04, 2010, 10:22:17 PM »
James, tem como conseguir automatizar a  geração de arquivos XML para os seriados, ou pelo menos para os episódios de um determinado seriado (TV SHOW)?
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Automatic importing of XBMC items
« Reply #16 on: September 04, 2010, 11:05:21 PM »
I looked at this, but I am not sure how to do it.  It is a bit confusing.  How would you imagine it working?  Just from a user point of view.

The problem is that XBMC is actually not very well set up for this kind of thing.  Even with the movies, it does not really work the way I would like.  It will play the move, but I would prefer if it took me to the details page of the moviie and then I could choose to play it.

With the TV shows, I would like it to take me to the view of all seasons of the show (NAME) when I say (NAME).  Even better would be if it took me to the current season and the next show that I have not seen yet.  But I don't know how to do that exactly.  Have you looked at the xbmc http command website at all?  There are two references that are helpful.

http://wiki.xbmc.org/index.php?title=Web_Server_HTTP_API

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

I can get a list of the TVShow's name, or even a list of all Episode names into an xml file for you in GENxml, but the problem is creating a command that uses the payloadXML to do something useful in XBMC.

Any ideas?

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: Automatic importing of XBMC items
« Reply #17 on: September 05, 2010, 09:19:08 AM »
I believe that having a way to run a particular episode would already be ok, we hardly distinct episodes of TV series of the same name .. think like a song until we have another one then use the menu option to choose the right option .. there is a feature of listing all episodes of a tv show, using visualization model called the Short List, ordered by season S01E01, S01E02, S02E01, s02e02, s03e01, and so on in a single list, I believe that this may assist you in any way.
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Automatic importing of XBMC items
« Reply #18 on: September 05, 2010, 09:39:59 AM »
but assuming that I know the name of the show.  How do I get to the short list for that show using the xbmc  http api?  that is the challenge.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Automatic importing of XBMC items
« Reply #19 on: September 05, 2010, 11:25:16 AM »
part of the problem is that xbmc just doesn't work the way it is supposed to and I don't seem to be able to get any support form the xbmc community.

these two commands:

- addtoplaylistfromdb(episodes; idEpisode=3)
- addtoplaylistfromdb(movies; idMovie=3)

should allow me to add tvshows and movies to the playlist the same way that I do it with music.  When I issue these commands, they do get added to the playlist, but then they won't play.  Try it.  I have posted to the xbmc forums, but either no one is reading them or no one knows the answer.

I updated to the latest release of xbmc to see if this was fixed.  It isn't and now my jumpsms and filtersms keys don't work anymore.  This was my other idea, to jump to the TVShow window and then use SMSFillter to get the show you want... 

In addition, in the last version of xbmc that I tried the command

execbuiltin(ActivateWindow(videolibrary,tvshowtitles))

didn't work either!  But the latest build it seems to be fixed (for now)

I think that XBMC is going downhill.  There are too many people involved and trying to make something that works on so many different platforms is adding to the confusion.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Automatic importing of XBMC items
« Reply #20 on: September 05, 2010, 01:38:12 PM »
AHA!  I think I've got it. ;D

I'll include support for this with my next release.  For now, you'll have to enter the names of your TVShows.  That should not be too hard.  The method I am using seems to work with the standard windows install of xbmc 9.11 found here:
http://sourceforge.net/projects/xbmc/files/XBMC%20for%20Windows/Camelot%20-%209.11/xbmc-9.11.exe/download

It may not work with other builds...

This should also work with Movies, Actors, Genre etc.  I am very excited!  It's always fun when you figure out how to make something work.  Thanks for pushing me to look at this again Wanilton.  :D

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: Automatic importing of XBMC items
« Reply #21 on: September 05, 2010, 02:09:26 PM »
In this release  http://mirrors.xbmc.org/nightlies/win32/xbmc-r33324-Dharma_beta1.exe
Eu consigo usar o execbuiltin(ActivateWindow(VideoLibrary,TVShowTitles) e fuciona normalmente
« Last Edit: September 05, 2010, 02:13:51 PM by Wanilton »
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me