2009-07-14, 06:03
When there are both NFO and mymovies.xml for a movie, XBMC uses the info found in mymovies.xml instead of the NFO. I think the NFO should take the precedent.
DIM strStartFolder
strStartFolder = "M:\HD Movies"
Set FSO = CreateObject("Scripting.FileSystemObject")
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
createNFO FSO.GetFolder(strStartFolder), strStartFolder
sub createNFO (Folder, strStart)
Set objFSO = CreateObject("Scripting.FileSystemObject")
For Each Subfolder in Folder.SubFolders
GetIMDB Subfolder.Path, strStart
createNFO Subfolder, strStart
Next
End Sub
sub GetIMDB (Folder , strStart)
Dim xmlDoc, objNodeList, strIMDB, strTitle, strSET
strSET = ""
strSET = Mid(folder,len(strStart&"\")+1, (InStrRev(folder,"\") - len(strStart&"\") ) )
if len(strSET) > 0 then strSET = left(strSET, len(strSET)-1)
strSET = trim(strSET)
Set xmlDoc = CreateObject("Msxml2.DOMDocument")
xmlDoc.load(Folder & "\mymovies.xml")
Set objNodeList = xmlDoc.getElementsByTagName("IMDB")
If objNodeList.length > 0 then
For each x in objNodeList
strIMDB = x.Text
Next
End If
Set objNodeList = nothing
Set objNodeList = xmlDoc.getElementsByTagName("LocalTitle")
If objNodeList.length > 0 then
For each x in objNodeList
strTitle= x.Text
Next
End If
if (len(strTitle) > 0 ) and (len(strIMDB) > 0 ) then
CreateTheFile Folder, strTitle, strIMDB, strSET
end if
end sub
sub CreateTheFile (strFolder, strTitle, strIMDB, strSET)
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
DIM objFile
Set objFile = objFSO.CreateTextFile(strFolder & "\movie.NFO")
set objFile = nothing
DIM objTextFile
Set objTextFile = objFSO.OpenTextFile (strFolder & "\movie.NFO", ForAppending, True)
objTextFile.WriteLine("<movie>")
objTextFile.WriteLine(" <title>" & strTitle & "</title>")
if len(strSET) > 0 then
objTextFile.WriteLine(" <set>" & strSET & "</set>")
end if
objTextFile.WriteLine("</movie>")
objTextFile.WriteLine("http://www.imdb.com/title/" & strIMDB)
objTextFile.Close
end sub
sdellutri Wrote:Well... I did some experimenting, and found that if I simply ADD the "movie.NFO" file into the directory with the correct URL to the IMDB ID of the movie, then it will properly add to the XBMC library ... Now I can keep my "mymovies.xml" files in place, and add an appropriate NFO file.
I wrote a small VBScript (windows) which will read the mymovies.xml file, and extract out of it the IMDB ID and the Title of the movie, and the construct a proper NFO file.
Furthmore, I wrote the script to recursively look into all directories... and I organize my movie boxed sets into subdirectory... with this info, my script also creates the needed <set> </set> tags in the NFO file, and uses the name of the parent directory as the box set name!
I have put the script here for anyone else who could use it...
Enjoy....
sdellutri Wrote:Well... I did some experimenting, and found that if I simply ADD the "movie.NFO" file into the directory with the correct URL to the IMDB ID of the movie, then it will properly add to the XBMC library ... Now I can keep my "mymovies.xml" files in place, and add an appropriate NFO file.
I wrote a small VBScript (windows) which will read the mymovies.xml file, and extract out of it the IMDB ID and the Title of the movie, and the construct a proper NFO file.
Furthmore, I wrote the script to recursively look into all directories... and I organize my movie boxed sets into subdirectory... with this info, my script also creates the needed <set> </set> tags in the NFO file, and uses the name of the parent directory as the box set name!
I have put the script here for anyone else who could use it...
Enjoy....
mamayomyom Wrote:Scrap movie info from NFO...
sdellutri Wrote:Hi All,
First, (as this is my first post here) I would like to send a great big thank you to all that contribute to the XBMC project. I think its really outstanding and very impressive!!!
Can anyone advise if there is a way to tell XBMC to ignore the MYMOVIES.XML files?
I am having a similar problem to casperse as indicated in the earlier posts of this thread..but slightly different. I have used the advancedsetting.xml to set the fanart and the thumbs and that does work well... however, since my collection was previously scrapped with Metabrowser, and it has left in each folder a MYMOVIES.XML file (additionally folder.JPG and backdrop.JPG), the native library building inside of XBMC does not produce the expected results.
It seems that when the MYMOVIES.XML file is present in the directory, XBMC may use some of its content but not all of it.... my library is getting populated with just the titles, short descriptions of plot, and a few other details, but I am not getting the actors, and other details.
Interesting point about the situation is that for TV Shows, XBMC does either appear to be ignoring the mymovies.xml files, or reading them correctly because the library is populated with all details perfectly. I am only experiencing this problem with Movies adding to the library.
The question I have is, can the processing of the MYMOVIES.XML files be disabled via configuration in XBMC? I did a small test with the same movies and deleted the MYMOVIES.XML files, and XBMC populated them into the library correctly. I really do not want to delete the mymovies.XML files as the directories and files are on a shared server that I use to access by several systems, and some of them need the XML file to operate properly.
Can anyone advise if there is a way to tell XBMC to ignore the MYMOVIES.XML files?
thanks in advance!