New .nfo creator for Windows - Need a bit of help

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
billyad2000 Offline
Media Companion Founder
Posts: 727
Joined: Oct 2007
Reputation: 17
Post: #1
As you may know there has been a thread open for some time now asking for a method via XBMC to save all scraped movies as seperate nfo's to be stored along side the movie.
[HTML]http://forum.xbmc.org/showthread.php?tid=29299&highlight=nfo[/HTML]

The biggest reason for this is that it would remove the need to re-scrape movies ever - even if you only have to do it occasionally when you have 1000+ movies it can take days.

I have created a windows based program that will create all of the seperate .nfo's files from the exported video database videodb.xml. for more information about this then see below.
First however I was wondering about a few of the tags,
I have read that the <filenameandpath> and <path></path> files are unneccesary for .nfo files stored with the movie. as my program stands they are saved over with all the over tags including any the content. I was wondering if this would cause a problem if the file and .nfo were moved to a different location, do they need to be removed, or if left in then empty, please let me know


Program Details
It works by reading through the exported videodb.xml file, Splitting at the <movie></movie> tags and getting the correct filename from the <filenameandpath> tags

The main problem i encountered was how to save the newly created .nfo files since many of the files are likely to be remote shares, yet to save 1000s of nfo files into a single directory would take many hours to go through and move to the correct folder.
My answer to the above problem was to set a top save directory, then save the nfo files according to the location, i.e
d:movies/ would be all stored in a subfolder called movies/
all share names are suffixed by a $ i.e movies$/, just in case folder names on the XBox HD are the same as share names.

The only problem I can see would be if there was more than one remote server with the same sharename - all nfos in these shares would all be saved into the main folder. the same would apply on XBox partitions i.e d:\movies e:\movies. these files would have to be sorted manually.

Anyway once the files have all been created then all the nfo's for example in the movies2$/ folder can be copied in one go to the movies2 shared folder.

The program is all but finished, just working on a bit of cosmetic stuff - it saves all the .nfo files, correctly named with the following content (filled in obviously :rolleyesSmile:
<movie>
<title></title>
<rating></rating>
<year></year>
<top250></top250>
<season></season>
<episode></episode>
<displayseason></displayseason>
<displayepisode></displayepisode>
<votes></votes>
<outline></outline>
<plot></plot>
<tagline></tagline>
<runtime></runtime>
<thumb></thumb>
<mpaa></mpaa>
<watched></watched>
<file></file>
<path></path>
<id></id>
<filenameandpath></filenameandpath>
<genre></genre>
<credits></credits>
<director></director>
<premiered></premiered>
<status></status>
<code></code>
<aired></aired>
<studio></studio>
<album></album>
<actor>
<name></name>
<role></role>
</actor>
</movie>

If their are any other tags that need to be removed then please let me know.
(This post was last modified: 2011-02-25 13:02 by billyad2000.)
find quote
billyad2000 Offline
Media Companion Founder
Posts: 727
Joined: Oct 2007
Reputation: 17
Post: #2
The program is available at the following link for testing

http://www.mediafire.com/?nmmyjlxh2ax


If you have problems running it please make sure you have the Latest .NET framework installed (version 3.5)
http://msdn2.microsoft.com/en-gb/netfram...69263.aspx
(This post was last modified: 2011-02-25 13:02 by billyad2000.)
find quote
SleepyP Offline
Posting Freak
Posts: 2,274
Joined: Nov 2005
Reputation: 4
Location: Portland, Oregon
Post: #3
awesome man. I will try this out when I get home, I have a large collection (530+ movies, 140+ TV series) and thus probably a good test set to work with. Will post feedback ASAP

Catchy Signature Here
find quote
wumagic Offline
Junior Member
Posts: 7
Joined: Feb 2008
Reputation: 0
Post: #4
I will try this out tonight as well and post feedback.

Thanks for sharing!

-Wu
find quote
billyad2000 Offline
Media Companion Founder
Posts: 727
Joined: Oct 2007
Reputation: 17
Post: #5
Slightly updated version

A couple of bugs removed and a checkbox added which allows you to save all nfo files to the root directory.


http://www.mediafire.com/?txazebbbz9m

Please note that this will not work with TV shows.
TV show nfo files are AFAIK not supported by XBMC
(This post was last modified: 2011-02-25 13:02 by billyad2000.)
find quote
sickboy719 Offline
Senior Member
Posts: 113
Joined: May 2007
Reputation: 0
Post: #6
billyad2000 Wrote:Slightly updated version

A couple of bugs removed and a checkbox added which allows you to save all nfo files to the root directory.


http://www.mediafire.com/?txazebbbz9m

Please note that this will not work with TV shows.
TV show nfo files are AFAIK not supported by XBMC
This is a great little app.
I noticed that it has a hard time with quotes, apostrophes and ampersands, however.
I've got lots of files with "&amp" in the filename, but a quick pass with Better File Rename will fix it right up.

Thanks for the great work, I see myself using this a lot.
find quote
SleepyP Offline
Posting Freak
Posts: 2,274
Joined: Nov 2005
Reputation: 4
Location: Portland, Oregon
Post: #7
Well you gotta remember that inside of XML, a lot of "special" characters are required to be encoded like that. Billy, when you generate the output filenames are decoding from "XML" style back to "regular"?
Here's the list I found with a quick Google
& - &amp;
< - &lt;
> - &gt;
" - &quot;
' - '
I believe the semi-colons are included in these chars...

Catchy Signature Here
find quote
R111 Offline
Member
Posts: 99
Joined: Oct 2007
Reputation: 0
Location: Brunei
Post: #8
SleepyP Wrote:' - '

' - &apos;

will XMBC pickup the nfo? or we have to have a NFO scraper for movies just like for Music Vids.
find quote
SleepyP Offline
Posting Freak
Posts: 2,274
Joined: Nov 2005
Reputation: 4
Location: Portland, Oregon
Post: #9
yes, XBMC will use local NFO files before it will go to the scraper.

Catchy Signature Here
find quote
R111 Offline
Member
Posts: 99
Joined: Oct 2007
Reputation: 0
Location: Brunei
Post: #10
Thanks for the info SleeyP. gonna download and start scraper this way.

billyad2000 great work. Thanks..
find quote
billyad2000 Offline
Media Companion Founder
Posts: 727
Joined: Oct 2007
Reputation: 17
Post: #11
Thanx for the feedback folks

As things stand the content body is been copied as is to the nfo file

I'll make it my first task over the next few days to look into identifying these special characters and find a way to output only that character.

Just noticed, the thumbnail entry looks like:

<thumb>&lt;thumb&gt;http://ia.media-imdb.com/media/imdb/01/I/57/25/28f.jpg&lt;/thumb&gt;</thumb>

That looks like its repeating the tags, can those tags be removed or is there some reason for then doubling up.
(This post was last modified: 2011-02-25 13:02 by billyad2000.)
find quote
R111 Offline
Member
Posts: 99
Joined: Oct 2007
Reputation: 0
Location: Brunei
Post: #12
possible for a checkbox to remove <thumb> tags?
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #13
tags are supposed to be there. we store the xml in order to allow multiple thumbs
find quote
SleepyP Offline
Posting Freak
Posts: 2,274
Joined: Nov 2005
Reputation: 4
Location: Portland, Oregon
Post: #14
Well yeah but the idea here is we're creating NFO files for storage alongside the movie files in our collections. Most of the userbase almost certainly already has TBN files stored locally. I know I do, and would prefer to not have extra stuff in the NFOs pertaining to thumbnails out on the web cuz I don't need that stuff. I think that yes, it should be optional.

*other feedback*
-Glad to see the <trailer> tag is there, that rocks Smile Now if only I had some good way of finding trailers that aren't linked via IMDB...
-It seems like a few tags could be removed or made optional given the intended use of the output files:
--<file>
--<path>
--<filenameandpath>
--<episodeguide>
-Any possiblity of processing the space-based padding into tab-based padding? Thats just a personal XML formatting preference. I figure why have like 6 space characters when 2 or 3 tab characters are appropriate? Also on that note, it looks like you could trim the leading 4 spaces from each line and not change anything, just make the files a tiny bit smaller Wink

I am happy to finally begin having proper NFO files to play around with in my collection.
Any chance of making this open source?

Catchy Signature Here
find quote
SleepyP Offline
Posting Freak
Posts: 2,274
Joined: Nov 2005
Reputation: 4
Location: Portland, Oregon
Post: #15
one more potentially optional removable tag:
<watched>
Probably would wanna remove it in multi-user environments like mine Wink

Catchy Signature Here
find quote
Post Reply