Author Topic: Another that exports xbmc  (Read 6659 times)

0 Members and 1 Guest are viewing this topic.

Offline Zacca

  • User
  • ***
  • Posts: 117
    • View Profile
Another that exports xbmc
« on: October 01, 2009, 12:55:43 pm »
First of all excuse my English but I'm Italian. I speak e little bit of english but i hope google translator do the miracle  :D
Very very very thanks to those who wrote PVD. You are my hero  ;D

This is my script for all those interested:

XBMC
Code: [Select]
%OPTIONS%
replace="&<->&amp;"
replace="<<->&lt;"
replace="><->&gt;"
filter="XML Files|*.nfo"
encoding="UTF8"
imagenameformat="%t%.tbn"
imagepath="\"%OPTIONS%
%HEAD%<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>%HEAD%
<movie>
<title>{%value=title}</title>
<originaltitle>{%value=origtitle}</originaltitle>
<rating>{%value=imdbrating}</rating>
<year>{%value=year}</year>
<plot>{%value=description}</plot>
<tagline>{%value=tagline}</tagline>
<runtime>{%value=length} minuti</runtime>
<mpaa>{%value=mpaa}</mpaa>
<playcount>{%value=count}</playcount>
<genre>{%value=genre}</genre>
<director>{%value=directors}</director>
<studio>{%value=studio}</studio>
<votes>{%value=Voti IMDB custom="true"}</votes>
<top250>{%value=Top 250 IMDB custom="true"}</top250>
<id>{%value=IMDB ID custom="true"}</id>
<poster>{%value=poster}</poster>
{%value=actors template="actors.tpl" maxvalues="10" params="full"}
</movie>

actors.tpl
Code: [Select]
%HEAD%%HEAD% <actor>
<name>{%param=name}</name>
<role>{%param=role}</role>
</actor>%FOOT%%FOOT%

My questions are:
Is there any way to export the ID of IMDB and the link of photo of the actors ???

Thanks again for everything  ;D
« Last Edit: October 01, 2009, 12:59:25 pm by Zacca »

Offline CAD

  • Power User
  • ****
  • Posts: 168
  • I've got my eye on you!
    • View Profile
Re: Another that exports xbmc
« Reply #1 on: October 02, 2009, 07:31:56 am »
Hi Zacca,

Code: [Select]
<id>{%value=url}</id> <==== This is the url in PVD. Needs some work to limit it to only imdb No.

This will insert all URL's (including IMDB) that are in PVD.

i used
Code: [Select]
%OPTIONS%
replace="http://www.imdb.com/title/<->"
%OPTIONS%
to limit it to just the IMDB No - strips out url part.

These might help too
http://www.videodb.info/forum_en/index.php?topic=1496.0
http://www.videodb.info/forum_en/index.php?topic=1461.msg6329#msg6329
three fingered salutation

Offline deazo

  • Older Power User
  • *****
  • Posts: 283
    • View Profile
Re: Another that exports xbmc
« Reply #2 on: October 02, 2009, 08:48:01 am »

 Thanks a lot to you Zacca for posting this!

 However could you help me understand what to do with the "actors.tpl" part of your script please? Do I need to add it to the previous script or are these two separate scripts that need to be run one after the other?

 Thx again.
 

Offline CAD

  • Power User
  • ****
  • Posts: 168
  • I've got my eye on you!
    • View Profile
Re: Another that exports xbmc
« Reply #3 on: October 02, 2009, 09:43:55 am »
hi deazo,

in main body of export script have:
Code: [Select]
{%value=actors template="actors.tpl" maxvalues="3" params="full"}
this calls the file "actors.tpl" - maxvalues limits the no of returns. in this case the first 3 actors details. params="full". passes all information about actors (i think)

in actors.tpl file i have
Code: [Select]
%HEAD%<actor>%HEAD%
<name>{%param=name}</name>
<role>{%param=role}</role>
%FOOT%</actor>%FOOT%

this returns the actor name and the role they played in the film.
« Last Edit: October 02, 2009, 09:46:03 am by CAD »
three fingered salutation

Offline deazo

  • Older Power User
  • *****
  • Posts: 283
    • View Profile
Re: Another that exports xbmc
« Reply #4 on: October 02, 2009, 09:54:22 am »

 Great that makes sense, thank you for the clarification!

Offline Zacca

  • User
  • ***
  • Posts: 117
    • View Profile
Re: Another that exports xbmc
« Reply #5 on: October 02, 2009, 07:27:13 pm »
Tnx CAD for the replay of deazo   :)
and tnx for my replay  ;)

My problem is that i have 3 url... FILMUP for the italian description + Allmovie for the rate and IMDB for the rest
What can i do to delete the first 2 ???

Have u find some solutions to add the thumb on the actors ?? without the name of the image I can't do anything  :(

Offline CAD

  • Power User
  • ****
  • Posts: 168
  • I've got my eye on you!
    • View Profile
Re: Another that exports xbmc
« Reply #6 on: October 05, 2009, 01:17:34 am »
hi zacca,

the only way i have found is to limit the output to 1.
imdb has to be first in the list - (you may be able to order this but i haven't tested)

create a file called urls.tpl and have this in it.
Code: [Select]
{%value}

in xbmc main.ptm file have:
Code: [Select]
<id>{%value=url template="urls.ptm"  maxvalues="1"}</id>

This will limit the no of urls returned to 1. hopefully imdb will be first and gets returned.
NB: replace="http://www.imdb.com/title/<->"  to strip leading info no longer works if you use this.
three fingered salutation

Offline CAD

  • Power User
  • ****
  • Posts: 168
  • I've got my eye on you!
    • View Profile
Re: Another that exports xbmc
« Reply #7 on: October 05, 2009, 06:27:35 am »
ive had a bit of a play and also remapped some fields to get them closer to what xbmc creates.

also limits urls returned to 1. -> the first one. if you want to change this remove/change max values.

nb. this version relies on path info existing (movies have been imported from HD)
if you want to export to a fixed position change nearfiles to nearfiles="c:/<somepath/%t%.nfo"

ill see if i can figure some way to strip leading part of url from imdb url leaving just the "ttxxxxx" No.

maybe recordtemplate= option will allow to be run from called templates. (seems like %option% will only work in main template)
Code: [Select]
%option%
replace="http://www.imdb.com/title/<->"
%option%



[attachment deleted by admin]
three fingered salutation

Offline Zacca

  • User
  • ***
  • Posts: 117
    • View Profile
Re: Another that exports xbmc
« Reply #8 on: October 05, 2009, 06:05:49 pm »
hi zacca,

the only way i have found is to limit the output to 1.
imdb has to be first in the list - (you may be able to order this but i haven't tested)

create a file called urls.tpl and have this in it.
Code: [Select]
{%value}

in xbmc main.ptm file have:
Code: [Select]
<id>{%value=url template="urls.ptm"  maxvalues="1"}</id>

This will limit the no of urls returned to 1. hopefully imdb will be first and gets returned.
NB: replace="http://www.imdb.com/title/<->"  to strip leading info no longer works if you use this.


{%value=url template="urls.ptm"  maxvalues="1"} don't work for me. The "URLS" don't have command "template".
anyway i have too many movie to reorder :(
I' ll wait for new version  ;D
meantime i work to export the movie flag...when i have time unfortunately  ;)

Offline CAD

  • Power User
  • ****
  • Posts: 168
  • I've got my eye on you!
    • View Profile
Re: Another that exports xbmc
« Reply #9 on: October 05, 2009, 11:24:34 pm »
my bad.

in main export program line should read:
<id>{%value=url template="urls.tpl" maxvalues="1"}</id>

to link to file urls.tpl which has {%value} in it
three fingered salutation

Offline Zacca

  • User
  • ***
  • Posts: 117
    • View Profile
Re: Another that exports xbmc
« Reply #10 on: October 06, 2009, 11:52:45 am »
my bad.

in main export program line should read:
<id>{%value=url template="urls.tpl" maxvalues="1"}</id>

to link to file urls.tpl which has {%value} in it
I saw the error and correct, but not work
I don't know why now it work :)

I v change the batch to scan first imdb and second the other.
I'll test it with some movie and i tell u the result

 

anything