English > Scripts and Templates
Export to XBMC
CAD:
Here is mkii.
You can export multiple .nfo files (way cool)
NB: Mappings are not complete.
There are a couple of issues.
"nearfiles" parameter needs a path hard coded in or it fails to export images.
Without hardcoding "nearfiles" path, it saves either to where pvd is installed or if you saved a file
without nearfiles, it remembers the location.
Preferences/Folders --> Specify a path.
does not seem to have an effect on where files are saved with nearfiles.
(Perhaps Nostra can add a nearfiles path option) ;)
I can't get credits to work - no matter how hard i try :(
pls pls some request for Nostra ;)
Can we add file path option:
so if "file path" is populated, the exported .nfo/xml can be named the file name.
eg. if you have a movie in c:\movies\moviename\movie_5.1_en.iso
nearfiles=%filename%.nfo will create a file called "movie_5.1_en.nfo"
If you wanted to be super clever it could save the files to the path :) :)
[attachment deleted by admin]
deazo:
I'm really not sure I'm doing things the right way, so see for yourself and please no bashing...
I have unzipped your file and copied the content into the plugins templates directory.
For testing purpose I am using a test database made of 2 movies. They are both in a folder of the exact same name than the movie file.
I first tried to export and generate .nfo files and nothing was happening. All that I was getting was a new explorer window opening on PVD's directory. No file was being created.
I then played around with the file in notepad, not knowing at all what I was doing.
I changed the "nearfile" part to this: nearfiles="%t%.nfo"
and it actually worked.
I mean that I got an image file and an nfo file generated for both movies in the right directory with the exact filenames.
The first nfo file (movie A) did not contain the imdb URL of the movie, while the second one, for movie B contained only the Allmovie URL.
Movie A in pvd only had an imdb URL while movie B in pvd had two URL's, imdb and allmovie.
I then opened XBMC and tried to see if that nfo file was used by it.
The info it took from Movie A was only the poster, plot and runtime. The nfo file for Movie A contained more info, like director, actors, etc.
The info it took for Movie B is roughly as limited, with tagline and outline (this info was not present in movies A's nfo file).
I must then have done something wrong when modifying the script.
What should "nearfiles" be set as?
Also what is the use in pvd preferences/folders/specify a path. Specify for what?
nostra:
--- Quote ---I can't get credits to work - no matter how hard i try Sad
--- End quote ---
Could you remind me what the problem was?
--- Quote ---Can we add file path option:
so if "file path" is populated, the exported .nfo/xml can be named the file name.
eg. if you have a movie in c:\movies\moviename\movie_5.1_en.iso
nearfiles=%filename%.nfo will create a file called "movie_5.1_en.nfo"
--- End quote ---
It already does this without any changes, so in your example c:\movies\moviename\movie_5.1_en.nfo would be created. You can lso specify smth like nearfiles="..\foldername\%t%-%o(%y%)%.nfo" in the latest version of the plugin.
CAD:
Hi Deazo.
I'll try to explain how it works and then you can modify to suit.
Also - it will only extract info that exists in PVD so make sure fields are populated.
Also download notepad++ - It makes working with text files much much easier.
Anything that does NOT have something that looks like {%value=something} will not be populated
eg
<trailer></trailer> will not have data entered into it.
Main template file is XBMC2.ptm
--- Code: ---%OPTIONS%
replace="http://www.imdb.com/title/<->" <=== Leaves only imdb No (as per xbmc format)
filter="XML Files|*.nfo" <==== Did this to force recognition of .nfo
imagenameformat="%t%%ext%" <==== Exports posters as titlename.jpg
nearfiles="d:_test%t%.nfo" <==== Exports individual .nfo files. I found I needed to have a file pathe here: eg c:xbmc
--- End code ---
NB: You Need to change this path to suit where you want to save your files to.
--- Code: ---%OPTIONS%
--- End code ---
In the main body, i tried to match best I could, but couldn't find all the fields. eg both plot (detailed and plot summary don't seem to exist in PVD. So I reused some fields.
--- Code: ---%HEAD%
<movie>
<title>{%value=title}</title> <==== Imports title
<rating>{%value=rating}</rating> <==== Imports IMDB rating
...
...
<outline>{%value=tagline}</outline> <==== Outline uses PVD tagline
<plot>{%value=description}</plot> <==== Plot uses PVD description
{%value=tags template="tags.tpl" maxvalues="3"} <==== This calls the file tags.tpl and limits the No of tags to 3
...
<thumb>{%value=poster}</thumb> <==== Path to poster. Found poster image had to be in same directory for xbmc to find it.
...
<id>{%value=url}</id> <==== This is the url in PVD. Needs some work to limit it to only imdb No.
<genre>{%value=genre}</genre>
<director>{%value=directors}</director>
...
{%value=actors template="actors.tpl" maxvalues="3" params="full"} <==== calls file actors.tpl and limits the No presented to 3
{%value=Credits template="credits.tpl"} <==== This doesn't work.
</movie>
--- End code ---
I tried best as I could to match what is exported from xbmc.
If you have other fields that need to be populated or what I am populating could be changed, let me know and I'll try to fix it up. :)
CAD:
--- Quote ---Could you remind me what the problem was?
--- End quote ---
Hi nostra,
I'm not getting data returned with credits tag.
In main.ptm file I have
--- Code: ---{%value=credits template="credits.tpl"}
--- End code ---
Also tried
--- Code: ---{%value=credits}
--- End code ---
In credits.tpl i have;
--- Code: ---%HEAD%<credits>%HEAD%
<name>{%param=writers}</name>
<role>{%param=composers}</role>
<role>{%param=producers}</role>
%FOOT%</credits>%FOOT%
--- End code ---
It seems %value=credits is being recognised but not processed. ie. nothing gets returned.
I checked the log file. Nothing there to indicate problems.
I am using pvd version 0.9.9.14 and export plugin version 0.6.1.0
Edit removed - text - i think install corrupt - more testing needed. :)
pls pls help :)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version