Firmware: A-410 [01 Apr. 2014] | A-400 [12 Mar. 2014] | C-300 [13 Feb. 2014] | A-300 [24 Feb. 2014] | C-200 [11 July 2013] | A-200/A-210 [11 July 2013] | Popbox V8 [3 Dec 2013]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Post Reply 
[NMJ v1] ignoring .nfo files
06-23-2012, 05:59 PM
Post: #1
ignoring .nfo files
Hi,

I have a big folder with all my movies inside like that:
...
The\ Pursuit\ of\ Happyness\ (2006).mkv
The\ Pursuit\ of\ Happyness\ (2006).nfo
The\ Seven\ Year\ Itch\ (1955).avi
The\ Seven\ Year\ Itch\ (1955).nfo
The\ Simpsons\ Movie\ (2007).mkv
The\ Simpsons\ Movie\ (2007).nfo
...

For every video file there is a nfo file like that:
# cat The\ Pursuit\ of\ Happyness\ \(2006\).nfo
tt0454921

Why is NMJv1 on my c200 just ignoring .nfo files ?
Thank you.
Find all posts by this user
Add Thank You Quote this message in a reply
06-24-2012, 01:17 AM
Post: #2
RE: ignoring .nfo files
I seem to remember that v1 does not use nfo files.

PCH A-110
PCH A-210
PCH C-200
Find all posts by this user
Add Thank You Quote this message in a reply
06-24-2012, 01:23 AM (This post was last modified: 06-24-2012 01:25 AM by Pain.)
Post: #3
RE: ignoring .nfo files
Do you actually use the backslashes ("\") like that in your filenames? Why?

You say it ignores the .nfo, but exactly what do you expect it to do?
The only thing NMJv1 uses the .nfo file for is to connect the movie with the IMDB Id, to make it easier for the scanner to identify the movie. It doesn't use anything else from the .nfo file. That is how it's supposed to work, so its no bug.
Find all posts by this user
Add Thank You Quote this message in a reply
06-24-2012, 07:47 AM (This post was last modified: 06-24-2012 08:34 AM by celyr.)
Post: #4
RE: ignoring .nfo files
Actually that was an output of ls, there is no backslash in the filename.
Inside every nfo there is the ttid of the movie (as specified in the guide in this section) but NMJv1 is ignoring them eventually getting the wrong movie from imdb.
I don't get why he ignores them.
For example:
"Jeff Dunham- Arguing with myself (2006)" is identified as "2006 NFL Opening Kickoff" even if in the nfo file there is the right ttid and even if the name is pretty clear. I noticed by the way that most of times PCH uses the number in parentheses (the year) to make the guess..
I had to edit the media.db using proper tool to get a decent db, that's pretty unconfortable.
Find all posts by this user
Add Thank You Quote this message in a reply
06-24-2012, 08:40 AM
Post: #5
RE: ignoring .nfo files
maybe something with the file encoding or there are control characters in the file like ^M
try opening one in notepad++ and change the EOL encoding to unix and make sure the encoding is ansi

All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 1 user says Thank You to zombiehunter for this post
06-24-2012, 08:47 AM (This post was last modified: 06-24-2012 10:42 AM by celyr.)
Post: #6
RE: ignoring .nfo files
#cat -v Jeff\ Dunham-\ Arguing\ with\ Myself\ \(2006\).nfo
tt0806102^M

You got it. Thank you man.

This little C utility cleans everyting, even your roof
Code:
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>

#define SIZE 256

extern int errno;

int main(int argc, char *argv[])
{
FILE *nfo_file;
char buf[SIZE], buf2[SIZE+2],*c,*d;
int modified=0, runToTTID=0;

for (argc--; argc > 0; argc--)
{
  modified=0;
  runToTTID=0;
  nfo_file = fopen(argv[argc], "r");
  if (!nfo_file)
  {
   printf("Error: %d\n", errno);
   return 1;
  }

  printf("Opening file: %s\n", argv[argc]);

  fgets(buf, SIZE, nfo_file);
  fclose(nfo_file);

  for (c=buf, d=buf2; *c; c++)
  {
   if (runToTTID == 0)
     if (*c == 't' && *(c+1) == 't' && isdigit(*(c+2)))
      runToTTID=1;
     else {
      modified=1;
      continue;
     }

   if (*c == '\n')
     continue;

   if ((isdigit(*c) || isalpha(*c)) && isascii(*c))
   {
     *d=*c;
     d++;
   } else {
     modified=1;
   }
  }

  *d='\n';
  *(++d)='\0';

  if (modified)
  {
   nfo_file = fopen(argv[argc], "w");
   if (!nfo_file)
                       {
                               printf("Error %d\n", errno);
                               return 1;
   }

   printf("File modified, new content: %s old: %s", buf2, buf);

   fputs(buf2, nfo_file);
   fclose(nfo_file);
  }
}

return 0;
}

To compile:
gcc -o nfo-fix -include /path/to/errno.h
To execute:
./nfo-fix *.nfo

I don't take any responsability if it blows up everyting, use it if you can understand it.
Find all posts by this user
Add Thank You Quote this message in a reply
06-24-2012, 09:41 AM
Post: #7
RE: ignoring .nfo files
nice, you could also have used the dos2unix utility

from the top folder of your movies issue a

PHP Code:
find .  -type f -name "*.nfo" -exec dos2unix {} \; 

All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.
Find all posts by this user
Add Thank You Quote this message in a reply
06-24-2012, 11:34 AM (This post was last modified: 06-24-2012 11:35 AM by celyr.)
Post: #8
RE: ignoring .nfo files
Ahahahahahah, I wiped out my nmj_database directory after fixing every nfo file with my magic script, the result is that now it still ignores .nfo files.
Any other idea ?

Now they are clean
Files:

Jeff Dunham- Arguing with Myself (2006).iso
Jeff Dunham- Arguing with Myself (2006).nfo

Content:
# cat -v Jeff\ Dunham-\ Arguing\ with\ Myself\ \(2006\).nfo
tt0806102

wich is: "tt0806102\n"

Link is right:
ttp://www.imdb.com/title/tt0806102/

Popcorn hour recognized it as:
The 2006 St. Louis Cardinals Baseball Heaven: A World Championship Season
wich is tt0945514

Sad
Find all posts by this user
Add Thank You Quote this message in a reply
06-27-2012, 10:29 PM (This post was last modified: 06-27-2012 10:31 PM by janausch.)
Post: #9
RE: ignoring .nfo files
I vaguely remember having issues with just the IMDB ID in the .nfo files and generally use the full URL now. Never had an issue with NMJ ignoring it this way. Might be worth a quick try.
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 1 user says Thank You to janausch for this post
06-28-2012, 01:29 AM
Post: #10
RE: ignoring .nfo files
Yeah!

I can't say it's perfect because it's still scanning all the movies but at the moment it's getting all of them using full url in .nfo file. Thank you very much.
I'm still asking myself why syabas wrote a guide on nfo file and that guide is wrong, come on guys you wrote the scanner, if even you don't know how it works there must be something wrong.
Find all posts by this user
Add Thank You Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [NMJ v2] NMJ Newbie and YAMJ nfo files sprogger 5 339 04-04-2014 02:00 AM
Last Post: chris57
  [NMJ v2] Deleting entries deletes files? mvveelen 3 305 03-28-2014 08:29 PM
Last Post: mvveelen
  [NMJ v2] NFO Files AdieBryer 3 548 10-24-2013 09:38 PM
Last Post: Bazrah
  [NMJ v1] NMJ naming files + other nunbaggi 2 646 10-15-2013 07:31 PM
Last Post: nunbaggi
  [NMJ v2] Save files coodbe 0 437 08-15-2013 05:00 PM
Last Post: coodbe
  [NMJ v1] Export database to nfo files gedror 3 1,230 07-14-2013 09:19 PM
Last Post: gedror
  [NMJ v2] [BUG] Error in scraping multi-episode files m.savazzi 3 904 07-11-2013 12:36 PM
Last Post: smiley
  [NMJ v2] Problem moving files (NMJ V2) paddys 2 661 06-29-2013 08:47 PM
Last Post: paddys
  [NMJ v2] NMJ won't delete avi files on hard disk vinny77 4 1,320 06-23-2013 12:17 AM
Last Post: Vinz
  [NMJ v2] .nfo files - imdb vs tmdb mediaminer 1 890 05-26-2013 10:15 AM
Last Post: Swen

Forum Jump: