English > Scripts and Templates
automatic MovieImport with .nfo-File
layerbreak:
Hello all,
I am using XBMC to view my video collection but I have managed the videos before with PVD. For XBMC I have needed weeks to
My folder/file-structure is:
Folder: "Videoname_ttxxxxxxx(from IMDB)_(YYYY)"
Files:Videoname.ext, Videoname-poster.jpg and Videoname.nfo
The nfo-file have all information inside about the movie. Here a example of the xml-stucture.
Is there a way to scan the folders automatically and import the movie-informations by reading the nfo-File and import the jpg?
Who can help me please?
Thx.
layerbreak:
Pity, nobody can help me. ???
Maybe a other way who can help me someone.
My Folder-Structure ist:
Video_Title_with_underscore_tt1234567(IMDB id)_(ReleaseYear)
When I insert in the FileScanner the RegEx who filter the IMDB ID can that match?
I am not familiar with RegEx. I need here help too.
Could that be a solution?? Can PVD match with the IMDB ID the movie to 100%?
rick.ca:
--- Quote ---Pity, nobody can help me.
--- End quote ---
Welcome, and sorry you haven't yet found help. Your question is very specific, and that normally increases the chances of getting a good answer. Unfortunately, it also makes is easier for the reader to think, "I don't know," and therefore not respond.
In this case, I can tell you there probably are ways to import XML data, but not directly. I've never found a way to easily convert XML files into a plain text, CSV or XML files that can be imported. If there were a tool that would batch convert the NFOs to the particular TXT format PVD will import (when found "beside" he video file), that, of course, would be a solution.
But it might be better to question your objective. Your original question implies it's important the XBMC produced NFO's be the source of the data. But PVD's primary purpose is provide the tools necessary to gather and maintain the data for a video database. As such, it would normally be the source of data for XBMC, and it seems that might what you actually want to do. If the data in the existing NFO files is the same as what PVD will get anyway (e.g., basic data from IMDb), then there's no need to import that. If there's some personal data (e.g., date viewed, rating), there's probably a more straightforward way to do a one-time export/import of that data using a list.
--- Quote ---Could that be a solution?? Can PVD match with the IMDB ID the movie to 100%?
--- End quote ---
Yes. Unfortunately, PVD will not use the IMDb tt number to find the movie. (I'm not sure if even the IMDb web interface will.) But with an accurate [Title] and [Year] you should get the correct movie about 90% of the time. That's not bad, since it means a Silent Mode import will get 90% in one go. Each of the remaining 10% with then require a few seconds of your time to resolve whatever the ambiguity is. Even if there's a 100 of them, you'll be done faster than anyone can dream up a better solution.
You describe a file-naming scheme in which [Title] and [Year] would always be found in the folder name, consistently delimited by the "_" (or by the "tt000000" separating them). This should do the trick:
(?i)^.+\\(?P<title>[^\\]+)_tt\d{7}_\((?P<year>(19|20)\d{2})\)
The attached screen shot of Expresso's 'regex analyzer' window shows what this expression means/does.
[attachment deleted by admin]
layerbreak:
--- Quote from: rick.ca on April 11, 2013, 11:32:14 pm ---
--- Quote ---Could that be a solution?? Can PVD match with the IMDB ID the movie to 100%?
--- End quote ---
Yes. Unfortunately, PVD will not use the IMDb tt number to find the movie. (I'm not sure if even the IMDb web interface will.)
--- End quote ---
The IMDB webside matche the movie by using the tt number in the search field.
--- Quote ---But with an accurate [Title] and [Year] you should get the correct movie about 90% of the time. That's not bad, since it means a Silent Mode import will get 90% in one go. Each of the remaining 10% with then require a few seconds of your time to resolve whatever the ambiguity is. Even if there's a 100 of them, you'll be done faster than anyone can dream up a better solution.
You describe a file-naming scheme in which [Title] and [Year] would always be found in the folder name, consistently delimited by the "_" (or by the "tt000000" separating them). This should do the trick:
(?i)^.+\\(?P<title>[^\\]+)_tt\d{7}_\((?P<year>(19|20)\d{2})\)
The attached screen shot of Expresso's 'regex analyzer' window shows what this expression means/does.
--- End quote ---
Hello @rick.ca and thx for responding. I had given up to get an answer. 8)
My problem is that I have not ever the accurate [Title]
e.g.
James_Bond_007_01_James_Bond_jagt_Dr_No_tt0055928_(1962)
the origin title is
Dr. No
But in all my movie folder names the IMDB ID matches to 100%
I insert your regex in FileScanner at first place but my e.g. movie cant match it.
rick.ca:
--- Quote ---The IMDB website matches the movie by using the tt number in the search field.
--- End quote ---
So it does. That should provide a workaround. Modify the regex to extract the tt number as <origtitle>. That will be used in the search to return the unique movie. 8)
I was expecting the import to then [Original Title]. It did not. I may be misunderstanding something, but that seems to be a bug in the plugin. Nostra?
--- Quote ---I insert your regex in FileScanner at first place but my e.g. movie cant match it.
--- End quote ---
Sorry. I was thinking your "_" delimited the terms. It doesn't, and there's a standard 'find and replace' that changes them to spaces anyway. Try this...
(?i)^.+\\(?P<title>[^\\]+)(?P<origtitle>tt\d{7})\ \((?P<year>(19|2\d)\d{2})\)
I haven't tried that in the program, but the PVD Regex Tester suggests it should work (see attached).
--- Quote ---James_Bond_007_01_James_Bond_jagt_Dr_No_tt0055928_(1962)
--- End quote ---
It's going to put both your titles into [Title], but I see no way around that. At least this way, you can simply edit-out the part you don't want. BTW, if it's not already apparent, [Title] is used for however you wish to refer to the movie (e.g., translated to you own language, the release title in your country, it's 'popular' title, or whichever variation you remember it by). [Original Title] is intended to be the 'official' title, which is why it's better to import that from a reliable source without modification.
[attachment deleted by admin]
Navigation
[0] Message Index
[#] Next page
Go to full version