Import more fields from XBMC

Talk to other Pedia users about the programs, share tricks and tips or ask questions about existing features.

Import more fields from XBMC

Postby Durkslag » Sat May 29, 2010 9:46 pm

First I want to say thank you for this great app, loving it! :D

I wonder if it's possible to add more fields when importing from XBMC (.nfo)?
When I import a movie from XBMC today I get duration, title, genre, etc. But is it possible to get more fields like audio, codec, subtitle and aspect ratio for example?

It's probably very easy and maybe I can edit it myself but haven't found which file.

Code: Select all
Now it imports
<title>3:10 to Yuma</title>
<year>2007</year>
...

Maybe it will work just adding the fields like this:

<fileinfo>
   <subtitle>
        <longlanguage>Swedish</longlanguage>
   <video>
        <aspect>2.400</aspect>
        <codec>h264</codec>
        <longlanguage>English</longlanguage>
Durkslag
Junior Member
Junior Member
 
Posts: 3
Joined: Wed Mar 10, 2010 8:04 am

Re: Import more fields from XBMC

Postby Conor » Sun May 30, 2010 3:51 am

Thank you for the feedback. Glad you are enjoying the program. Could you please send me a sample .nfo file so that I can add the additional fields that are missing and test the import.
User avatar
Conor
Top Dog
 
Posts: 3769
Joined: Sat Jul 03, 2004 12:58 pm

Re: Import more fields from XBMC

Postby Durkslag » Sun May 30, 2010 12:11 pm

Here's a zip file containing 6 nfo's with different details:
http://www.mediafire.com/?tt2rnqgkgyy

And one nfo of the Movie "UP" for online viewing:
http://pastebin.com/QQ9Hp7Uk

I think most of the new fields are at the bottom where is says <fileinfo> -> <streaminfo>
For example, audio, language, aspect ratio, subtitles etc

If it's possible, the audio names are named different in the nfo's
dca 6 channels = DTS 5.1
dca 2 channels = DTS 2.0
dca 7 channels = DTS-ES 6.1
ac3 2 channels = Dolby Digital 2.0
ac3 6 channels = Dolby Digital 5.1

Thanks again :)
/ Erik
Durkslag
Junior Member
Junior Member
 
Posts: 3
Joined: Wed Mar 10, 2010 8:04 am

Re: Import more fields from XBMC

Postby Conor » Mon May 31, 2010 4:10 am

Thank you for the different files with the different formats. I was not importing the file info part of the .nfo file. I have now updated the importer and it will include languages, subtitles, audio (translated as you pointed out), aspect ratio and codec. For the codec, since it does not map to one of the DVDpedia fields, it's only imported if you name a custom fields "Codec".

I also added some minor fixes, such as picking up the duration from the file info part if not already present in the regular information. Not adding the "original title" if the same as the title and picking up the rated information from certification if no MPAA field is available.

You can get all these change on DVDpedia beta 31.
User avatar
Conor
Top Dog
 
Posts: 3769
Joined: Sat Jul 03, 2004 12:58 pm

Re: Import more fields from XBMC

Postby Durkslag » Mon May 31, 2010 8:50 pm

This is great, it works flawlessly! :D

Thank you so much, great support and quick updates/fixes from you guys!
Durkslag
Junior Member
Junior Member
 
Posts: 3
Joined: Wed Mar 10, 2010 8:04 am

Re: Import more fields from XBMC

Postby mklose.mobile » Thu Sep 23, 2010 9:35 am

Hi@all

is it possible to import the width from xbmc nfo too?

Code: Select all
    <fileinfo>
        <streamdetails>
            <video>
                <width>1280</width>


I would like to convert the width into names.
1280 = 720p
1920 = 1080p
Everything smaller to "SD"

thanks
mklose.mobile
Junior Member
Junior Member
 
Posts: 3
Joined: Thu Sep 23, 2010 9:17 am

Re: Import more fields from XBMC

Postby Conor » Fri Sep 24, 2010 9:59 am

Hi,

Thank you for the details. Since this is such a specific change you might want to consider looking into the NFO/XBMC plug-in and modifying it to import this data.

The needed code would be:
Code: Select all
   NSString *fileInfo = [xmlString stringBetween:@"<fileinfo>" and:@"</fileinfo>"];
   NSString *streamdetails = [fileInfo stringBetween:@"<fileinfo>" and:@"</fileinfo>"];
   NSString *video = [streamdetails stringBetween:@"<fileinfo>" and:@"</fileinfo>"];
   NSString *width = [video stringBetween:@"<fileinfo>" and:@"</fileinfo>"];

        int widthInt = [width intValue];
        if (widthInt == 1280)
         [newEntry setValue:@"720p" forKey:@"custom1"];
        else if (widthInt == 1920)
         [newEntry setValue:@"1080p" forKey:@"custom1"];
        else
         [newEntry setValue:@"SD" forKey:@"custom1"];


After installing this plug-in you would use it directly from under the plug-in menu, as it would not replace the shipping XBMC import. It's also a plug-in that was designed to look through folders and import missing movies not yet in DVDpedia.
User avatar
Conor
Top Dog
 
Posts: 3769
Joined: Sat Jul 03, 2004 12:58 pm

Re: Import more fields from XBMC

Postby mklose.mobile » Sat Sep 25, 2010 10:47 am

Hello Conor,

thanks for your reply.
I downloaded the file but i have no idea, how to install it?!?
Which file do i have to change?

The file looks like some kind of xcode project, but i have no xcode installed.
Could you please upload an edited version for me?

thx
mklose.mobile
Junior Member
Junior Member
 
Posts: 3
Joined: Thu Sep 23, 2010 9:17 am

Re: Import more fields from XBMC

Postby Conor » Sat Sep 25, 2010 4:47 pm

Unfortunately that won't work. This is a plug-in that was created by a user for personal use and it has a lot of hard coded options (including the movie path that is searched for NFO files), so it requires a lot of customization at the coding level, past the addition of the code above. It would require a programmer and Xcode installed to use.
User avatar
Conor
Top Dog
 
Posts: 3769
Joined: Sat Jul 03, 2004 12:58 pm

Re: Import more fields from XBMC

Postby mklose.mobile » Sun Sep 26, 2010 5:36 am

Thanks again.
I'll try edit it otherwise I have to add these information manualy.
mklose.mobile
Junior Member
Junior Member
 
Posts: 3
Joined: Thu Sep 23, 2010 9:17 am


Return to PediaTalk

cron