.nfo export for XBMC cataloging

Tell us about your wildest feature dreams. Or just harmless suggestions for improvement.
corrigann
Junior Member
Junior Member
Posts: 2
Joined: Wed Apr 01, 2009 10:23 am

.nfo export for XBMC cataloging

Post by corrigann »

I think that if there was a way to export your database into separate .nfo files for cataloging on software like XBMC (XBOX Media Center), which gives gives rich metadata to your files. There are other programs out there for Windows that will scrape info off of imdb and create .nfo's for you, but for those of us who want to have that functionality on OS X we're out of luck. DVDPedia already does the info gathering for you, and for people like me who have huge libraries of DVD's backed up to 1TB hard drives it would a great companion to the functionality that we already have with DVDpedia. I can't imagine it would be really difficult for even an amateur programmer to do, if there's someone out there with the skills to even build a plugin that would be awesome. I know there's got to be XBMC users out there who would appreciate it.
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: .nfo export for XBMC cataloging

Post by Conor »

The files can be created with the current flexible text export. Create a new text file in your home folder at ~/Library/Application Support/DVDpedia/Templates/XBMC.nfo and inside copy the following text:

Code: Select all

<!-- <meta name="PageSplit" content="1">
<meta name="uidNaming" content="title"> -->
<!--BeginRepeat-->
<movie>
        <title>[key:title]</title>
        <originaltitle>[key:originalTitle]</originaltitle>
        <rating>[key:rating]</rating>
        <year>[key:theatrical]</year>
        <outline></outline>
        <plot>[key:summary]</plot>
        <tagline>[key:comments]</tagline>
        <runtime>[key:duration]</runtime>
        <thumb>[key:localCoverImageURL]</thumb>
        <mpaa>[key:rated]</mpaa>
        <id>tt[key:imdb]</id>
        <genre>[key:genre]</genre>
		<premiered>[key:releaseDate]</premiered>
        <studio>[key:studio]</studio>
        <credits>[key:starring]</credits>
        <director>[key:director]</director>
        <!--IFcredits[creditsBegin]
        <actor>
            <name>[credit:name]</name>
            <role>[credit:role]</role>
        </actor>[creditsEnd]ENDcredits-->
    </movie>
<!--EndRepeat-->
You will now have an XBMC export option under the text export tab. This will create a file for each movie in the collection. The file is not named after the movie so QuickLook needs to be used to identify the title and move it to the correct folder containing the movie file. I do agree that a plug-in that would do this last step automatically would be very useful and have added it to the possible features for DVDpedia.
corrigann
Junior Member
Junior Member
Posts: 2
Joined: Wed Apr 01, 2009 10:23 am

Re: .nfo export for XBMC cataloging

Post by corrigann »

wow, that solution is nearly 9/10's of the way there! All that's really missing is the automation of exporting the files with their proper filenames and to include the poster thumbs as well in the export process, but for the most part that's a great solution. Hopefully the feature makes it into DVDPedia at some point, but for now thanks for this method.
marco
Junior Member
Junior Member
Posts: 4
Joined: Thu Nov 19, 2009 5:26 pm

Re: .nfo export for XBMC cataloging

Post by marco »

Thanx for this add-on, it's really useful.
Apart the issue of the name, there is also another small bug here:
<thumb>[key:localCoverImageURL]</thumb>

In this case it is generated a key like:
file:\\\hd\cover\cover.jpg
which is not supported by XBMC, which requires instead just \hd\cover\cover.jpg

I don't know if there is a way to force dvdpedia to avoid the file:\\ text, but anyway if someone needs those .nfo file has to remove the text in this way
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: .nfo export for XBMC cataloging

Post by Conor »

With the latest beta version the export files can be named after the movie title, by including the following command in the template file:

Code: Select all

<meta name="uidNaming" content="title">
@Marco

There is no command without the "file://" prefix in the URL for the cover image. But each user knowing the path to the covers folder on their machine could change the path key to use the local path and the internal UID of the movie that will also be the cover's file name:

Code: Select all

<thumb>\hd\cover\[key:uid].jpg</thumb>
DrPaul
Bruji Friend
Bruji Friend
Posts: 14
Joined: Wed May 03, 2006 4:17 am
Location: Point Point, Melbourne, Australia

Re: .nfo export for XBMC cataloging

Post by DrPaul »

I've been trying this to get data to my Popcorn Hours and came across issues with [key:aspectRatio]...this attribute appears if you do an HTML export but not a text export.

Code: Select all

<!-- <meta name="PageSplit" content="1">
<meta name="uidNaming" content="title"> -->
<!--BeginRepeat-->
<movie>
    <title>[key:title]</title>
    <originaltitle>[key:originalTitle]</originaltitle>
    <rating>[key:rating]</rating>
    <year>[key:theatrical]</year>
    <top250></top250>
    <votes></votes>
    <outline></outline>
    <plot>[key:summary]</plot>
    <tagline>[key:comments]</tagline>
    <runtime>[key:duration]</runtime>
    <premiered>[key:releaseDate]</premiered>
    <thumb>file://[key:title]/[key:title].jpg</thumb>
    <fanart>file://[key:title]/[key:title].fanart.jpg</fanart>
    <mpaa>[key:rated]</mpaa>
    <playcount></playcount>
    <watched>[key:lastSeen]</watched>
    <id>tt[key:imdb]</id>
    <id moviedb="allocine"></id>
    <id moviedb="filmweb"></id>
    <filenameandpath></filenameandpath>
    <trailer></trailer>
    <genre>[key:genre]</genre>
    <credits>
        <writer>[key:writer]</writer>
    </credits>
    <director>[key:director]</director>
    <country>[key:country]</country>
    <studio>[key:studio]</studio>
<!--IFcredits[creditsBegin]    <actor>
        <name>[credit:name]</name>
        <role>[credit:role]</role>
    </actor>
[creditsEnd]ENDcredits-->
    <videosource>[key:media]</videosource>
    <videooutput></videooutput>
    <fileinfo>
        <streamdetails>
            <video>
                <codec></codec>
                <aspect>[key:aspectRatio]</aspect>
                <width></width>
                <height></height>
            </video>
            <audio>
                <codec></codec>
                <language></language>
                <channels></channels>
            </audio>
            <subtitle>
                <language></language>    
            </subtitle>
        </streamdetails>
    </fileinfo>
</movie>
<!--EndRepeat-->
produces say:

Code: Select all

<!-- <meta name="PageSplit" content="1">
<meta name="uidNaming" content="title"> -->

<movie>
    <title>3 10 To Yuma</title>
    <originaltitle></originaltitle>
    <rating>7.9 (94,137 votes)</rating>
    <year>2007</year>
    <top250></top250>
    <votes></votes>
    <outline></outline>
    <plot>Rancher Dan Evans heads into Bisbee to clear up issues concerning the sale of his land when he witnesses the closing events of a stagecoach robbery led by famed outlaw Ben Wade. Shortly thereafter, Wade is captured by the law in Bisbee and Evans finds himself one of the escorts who will take Wade to the 3:10 to Yuma train in Contention for the reward of $200. Evans's effort to take Wade to the station is in part an effort to save his land but also part of an inner battle to determine whether he can be more than just a naive rancher in the eyes of his impetuous and gunslinging son William Evans. The transport to Contention is hazardous and filled with ambushes by Indians, pursuits by Wade's vengeful gang and Wade's own conniving and surreptitious demeanor that makes the ride all the more intense.</plot>
    <tagline>Time waits for one man</tagline>
    <runtime>122</runtime>
    <premiered>Jan 2008</premiered>
    <thumb>file://3 10 To Yuma/3 10 To Yuma.jpg</thumb>
    <fanart>file://3 10 To Yuma/3 10 To Yuma.fanart.jpg</fanart>
    <mpaa>R</mpaa>
    <playcount></playcount>
    <watched>01 Jan 2010</watched>
    <id>tt0381849</id>
    <id moviedb="allocine"></id>
    <id moviedb="filmweb"></id>
    <filenameandpath></filenameandpath>
    <trailer></trailer>
    <genre>Action, Crime, Drama, Western</genre>
    <credits>
        <writer>Halsted Welles, Michael Brandt</writer>
    </credits>
    <director>James Mangold</director>
    <country>USA</country>
    <studio>Lions Gate</studio>
    <actor>
        <name>Christian Bale</name>
        <role>Dan Evans</role>
    </actor>
    <actor>
        <name>Russell Crowe</name>
        <role>Ben Wade</role>
    </actor>
    <actor>
        <name>Ben Foster</name>
        <role>Charlie Prince</role>
    </actor>
    <actor>
        <name>Peter Fonda</name>
        <role>Byron McElroy</role>
    </actor>
    <actor>
        <name>Logan Lerman</name>
        <role>William Evans</role>
    </actor>
    <actor>
        <name>Dallas Roberts</name>
        <role>Grayson Butterfield</role>
    </actor>
    <actor>
        <name>Vinessa Shaw</name>
        <role>Emma Nelson</role>
    </actor>
    <actor>
        <name>Alan Tudyk</name>
        <role>Doc Potter</role>
    </actor>
    <actor>
        <name>Luce Rains</name>
        <role>Marshal Weathers</role>
    </actor>
    <actor>
        <name>Gretchen Mol</name>
        <role>Alice Evans</role>
    </actor>
    <actor>
        <name>Lennie Loftin</name>
        <role>Glen Hollander</role>
    </actor>
    <actor>
        <name>Rio Alexander</name>
        <role>Campos</role>
    </actor>
    <actor>
        <name>Johnny Whitworth</name>
        <role>Darden</role>
    </actor>
    <actor>
        <name>Shawn Howell</name>
        <role>Jackson (as Shawn D. Howell)</role>
    </actor>
    <actor>
        <name>Pat Ricotti</name>
        <role>Jorgensen</role>
    </actor>

    <videosource>Blu-ray</videosource>
    <videooutput></videooutput>
    <fileinfo>
        <streamdetails>
            <video>
                <codec></codec>
                <aspect>[key:aspectRatio]</aspect>
                <width></width>
                <height></height>
            </video>
            <audio>
                <codec></codec>
                <language></language>
                <channels></channels>
            </audio>
            <subtitle>
                <language></language>    
            </subtitle>
        </streamdetails>
    </fileinfo>
</movie>
Is there some way to activate this for a text export?

Thanks

Paul
DrPaul
Bruji Friend
Bruji Friend
Posts: 14
Joined: Wed May 03, 2006 4:17 am
Location: Point Point, Melbourne, Australia

Re: .nfo export for XBMC cataloging

Post by DrPaul »

Hmm.

After a lot more fiddling I have found that if the template you use is a text file then aspectRatio correctly appears.

With the default which is RTF then the aspectRatio does not get replaced with its value.

So, edit an existing template with TextEdit, make it a plain text file, save as a template into the Templates folder with the .txt extension. The run then creates lots of files with the filename the same as the title that all end with the .txt extension.

Rename to .nfo and you are good to go.
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: .nfo export for XBMC cataloging

Post by Conor »

Thank you for all the details. I'll look into it as the ending of the file should make no difference for the substitution.
User avatar
Zorglub
Bruji Friend
Bruji Friend
Posts: 13
Joined: Sun Jul 13, 2008 5:22 pm
Location: Paris, France

Re: .nfo export for XBMC cataloging

Post by Zorglub »

I'm reactivating this old post.
Even with latest release (5.1.3), the export template does not work with an .nfo file.
I have to change the template to a .txt file, and then rename every exported file.

Thanks for your help.
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: .nfo export for XBMC cataloging

Post by Conor »

I can't repeat the issue here. With the template file your provided installed and called "Test.nfo" it exports all the movies to a folder based on title with .nfo extension and includes the aspectRatio key; e.i. American Beauty.nfo:

Code: Select all

            <video>
                <codec></codec>
                <aspect>2.35 : 1</aspect>
                <width></width>
                <height></height>
            </video>
Not sure what could be going on on your system that it's not doing that. Do double check your preferences in DVDpedia under the fields tab and make sure that aspect ratio is checked and on for all three place it can appear in, add edit panel; details view and fullscreen details just a precaution.
judocama
Addicted to Bruji
Addicted to Bruji
Posts: 265
Joined: Sun May 24, 2009 6:16 am

Re: .nfo export for XBMC cataloging

Post by judocama »

I am interested too...

Is posiblle to make an export for xbmc users?

Thanks in advance
kevy

Re: .nfo export for XBMC cataloging

Post by kevy »

Conor wrote:With the latest beta version the export files can be named after the movie title, by including the following command in the template file:

Code: Select all

<meta name="uidNaming" content="title">
Una duda, a mi me hicieron ustedes una beta para solucionar el problema de los articulos en español, si ahora pongo esta beta pierdo eso que tenia la otra?

Salu2.
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: .nfo export for XBMC cataloging

Post by Conor »

Una duda, a mi me hicieron ustedes una beta para solucionar el problema de los articulos en español, si ahora pongo esta beta pierdo eso que tenia la otra?
Los betas son acumulativos, cada cambio que vamos arreglando esta incluido. Cuando pasemos a la próxima versión, en este caso 5.1.3+ ya todo lo que estaba en el beta esta en la versión oficial. En este caso el beta de los articulos en español ya tiene el arreglo del XBMC export.
kevy

Re: .nfo export for XBMC cataloging

Post by kevy »

Ok, Muchas gracias

Salu2.
judocama
Addicted to Bruji
Addicted to Bruji
Posts: 265
Joined: Sun May 24, 2009 6:16 am

Re: .nfo export for XBMC cataloging

Post by judocama »

Hola Conor,

Retomando este hilo me gustaría saber si es posible exportar el archivo nfo lo mas limpio posible.
Hasta el momento DVDpedia exporta el archivo así:

<!-- <meta name="PageSplit" content="1">
<meta name="uidNaming" content="title"> -->

<movie>
<id>tt0102926</id>
<title>Studio 54</title>
<url>http://www.imdb.com/title/tt0102926</url>
</movie>

Pero me han dicho que la manera mas correcta sería así:

<movie>
<title>tt0102926</title>
<title>Studio 54</title>
</movie>
http://www.imdb.com/title/tt0102926

Me puedes indicar si lo podemos dejar asi de limpito...

Otra cosa, me puedes indicar cual es el campo para exportar el "titulo de organización" ?

Gracias de nuevo.

Un saludo y gracias por todo.
Post Reply