Is there an nfo file scanner that pulls the imdb url within it?

Is there an nfo file scanner that pulls the imdb url within it?



I want to have Plex 9 scan an nfo file for the IMDB url contained in it first to extract the movie name.



For example, I have two files-

abc-bbb-720p-bluray.mkv

abc-bbb-720p-bluray.nfo



The IMDB url http://www.imdb.com/title/tt1540400/ (Bonded by Blood) is contained in the nfo file.



I simply would like Plex 9 media manager to correctly identify this movie based on the IMDB url (just like XBMC).

I have the same question (2.5 years later) :slight_smile:

I haven’t found any info about this. It is the absolutely most efficient way to get 100% match on a library if you keep those NfO files (which you of course do :-))

Sent from my Nexus 10 using Tapatalk 4

Hello,

I will try to help you a little. I don't know much about it. But plex is doing the stuff quite different. I am not very experienced, but I hope some one else who knows better can fill the gaps! ;-)

Here the scraping and stuff is split up.

You have "scanners" and "Meta data agents". The scanner is trying to find the Movie Name and Year and is then giving this info to the meta data agent which is checking (themoviedb for example) the coresponding meta data database. And extracting the pictures and infos from there.

So. What you want is two things. First you want to make your own custom scanner, which is extracting the URL from the nfo file and second you want a custom Meta data agent to check the IMDB Website. Because, naturally PLEX is not using IMDB as far as I understand.

I had a similar problem: I use the following naming convention: Title (IMDBID) - HD.ts So the standart scanner from plex is ALWAYS checking the name for title and year. So 95% of my movie collection was either wrong or not found at all......so I had to make my own custom scanner, which is than giving the IMDBID contained in the filename to the meta data agent, and then giving me a 100% match!.....this is working in 99% of my cases, but some movies are not in themoviedb, only in the IMDB and I have not yet found out, how to get a custom meta data agent to scan in the IMDB also.....

Hope I can help you a little with my rough explenations....

Regards

Hossa

I am not sure what I did but I restarted with freebase. I managed to get localized titles by rearranging the agents used (read some thread about similar problems with freebase) and now all movies was just found. No idea how that happened because some movies have really strange naming. I almost think that Freebase is pulling imdb from NfO files. No idea how it else could pull the names correctly. :slight_smile:

I’m happy but not sure what I did.

Now my next task is to understand trakt synchronization. Tv series work but movies I only get about 30 movies to sync watched status. I know there should be at least 150 more movies in my database that are marked as watched.

It only seems to sync when pms is restarting (which I never intend to do since running on nas). Manual sync doesn’t work either. Only tells me “channel not available” on manual sync. Not even log file gets created. :frowning:

Sent from my Nexus 10 using Tapatalk 4

Hossa,

With your scanner, a reversing program could be written to create the special ".ts" file once the metadata

is filled out with the correct information (imdb id key). Then, place that next to ALL of your movies.

This would be VERY useful for moving media around (and renaming the file, moving to different servers, etc.)

I just started looking into this because I'm figuring out how PLEX works on a MAC, but will eventually be

running it all on a Ubuntu server.  As I add media, I learn the name the stuff is supposed to be according

to the databases. (It's too late then.)  But, if this information could be stored associated with each media

(Extended attribute file, or your specially named file ".ts"), then I could rename everything and your scanner

would be able to repull the stuff from the on-line databases.

Do you ship your scanner bundle??? (or have the python I can borrow?)

Hi,

as I am a nice and friendly user. I already desribed my way in this post:

http://forums.plexapp.com/index.php/topic/78326-custom-scanner-use-imdbid-in-filename-instead-of-name-and-year/

So that other users, as you, can benefit from my work.

Just follow the "described way"!

If you have questions, just ask! :-)

I wish you luck!

Regards

Hossa

Movie scanner looks for tt* in .nfo for some time now, here is the code in "Plex Movie Scanner.py"

def checkNfoFile(file, fileCount):
  try:
    path = None
 
    # Depending on how many media files we have, check differently.
    if fileCount == 1:
      # Look for any NFO file.
      for f in os.listdir(os.path.dirname(file)):
        if f[-4:].lower() == '.nfo':
          path = os.path.join(os.path.dirname(file), f)
          break
    else:
      # Look for a sidecar NFO file.
      path = os.path.splitext(file)[0] + '.nfo'
 
    if path is not None and os.path.exists(path):
      nfoText = open(path).read()
      m = re.search('(tt[0-9]+)', nfoText)
      if m:
        return m.groups(1)[0]
  except:
    print "Warning, couldn't read NFO file."

Can you tell me what info should be contained in a standard .nfo file?

If plex finds the IMDB ttxxx will Plex use that to retrieve the metadata from IMDB?

I ask because I have several files that are listed on IMDB but Plex fails to match them for some reason. If I were able to put the relevant tt code into an .nfo file and have plex find and use it to get the metadata that would be great :)

Any help would be appreciated.

 
1/ here is an example of a small .nfo file :
# cat Corto.Maltese.By.MAGiCAL.nfo
<?xml version="1.0" encoding="utf-8"?>

  tt0259134
  Corto Maltese: La cour secrète des Arcanes
  2002

the and aren't needed, is.

 
2/ no, plex doesn't necesserally use imdb, but it uses the tt* key if any to search some databases.
in fact, plex use the selected agents specified in http://diskstation:32400/manage/index.html#!/settings
Agents->Movies->Freebase in order.
My order  is :
Local Media Assets (Movies) for scanning .nfo first
The Movies Database
Freebase
 
for instance, the following agents aren't selected :
MoviePosterDB
OpenSubtitles.org
Wikipedia
 
in The Movies Database, I've selected Prefer artwork based on section language and choose France as Country,
also, in Freebase, I've selected Localized Titles.
 
if a movies isn't found, is incomplete or not in the rigth language, check http://www.themoviedb.com first.
many movies may have an empty overview in some language, or an incomplete crew, casts or genre.
if the rank (no stars) is missing, I use the one from imdb the edit/save the overview to force keep my rank !
of course, to edit something from the movie database, you need to be registered.

@gits said:
Movie scanner looks for tt* in .nfo for some time now, here is the code in “Plex Movie Scanner.py”

def checkNfoFile(file, fileCount):

try:

path = None

# Depending on how many media files we have, check differently.

if fileCount == 1:

# Look for any NFO file.

for f in os.listdir(os.path.dirname(file)):

if f[-4:].lower() == ‘.nfo’:

path = os.path.join(os.path.dirname(file), f)

break

else:

# Look for a sidecar NFO file.

path = os.path.splitext(file)[0] + ‘.nfo’

if path is not None and os.path.exists(path):

nfoText = open(path).read()

m = re.search(‘(tt[0-9]+)’, nfoText)

if m:

return m.groups(1)[0]

except:

print “Warning, couldn’t read NFO file.”

This code is included in the “Plex Movie Scanner.py” actually?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.