English > Support

Can I import from MyMovies

<< < (4/5) > >>

rick.ca:

--- Quote ---i presume that PVD will use this first (i.e. in preference to title and year) during the query to imdb to get the remainder of the fields?
--- End quote ---

That's correct.

junk_struc:

Hi Rick,
almost there (spent better part of day renaming tv shows).  

movies worked fine, used the excel import that brought in movie title and "location".  In pvd the correct path shows up in "media location" and the imdb lookups worked a treat.

i then when to do a scan of folders and none of the movies in the database are recognized, i.e. it thinks it has found a lot of new movies.

i thought i would just use the xml export to import into excel and then write a script to rename based on filename and movie title.  but this doesn't report anything in the "path" field for the majority of movies.  the only ones that have something are those that i have subsequently added after the excel import.

guess path and location are different?  but as I said, it displays ok in "media location".

any suggestions?  can i do a bulk copy of location to path if path field is empty?

thanks
craig

junk_struc:


sorry for last post,

my obvious stupidity, location being in the "hall closet",  path being the file path. 

still, any tips, little scared to do excel import again, incase it screws today's work.

any suggestions

craig

rick.ca:

--- Quote ---any suggestions
--- End quote ---

Make a backup, then be fearless. ;)

It's been a while since I've done imports, so I'll just say this: The import routine is quite sophisticated, in that it imports (or is configurable) to the field level. In that way it's powerful, but also more challenging to use. Practise—and the fact you can run the same import over again (responding differently to the add/overwrite prompts)—helps. For example, if you accidentally imported the file path to media location, you could probably fix the field mapping and run the import again to fix just the data in those two fields. No other data would be affected.

junk_struc:

For what it is worth to others (not much)...

I have finally made the change to pvd from mymovies.  main bsis was better/easier support for tv shows.  also liked the idea of the explicit mapping that you can do with pvdimport if you are also using jriver MC.

the excel import in pvd is great.  as rick suggeted, simply export xml file of all movies from mymovies and open in excel.  make a file of filename, title, year and imdb address and import into pvd.  database is largely populated.

Main difficulty with the switch was that all of my directories were poorly named and upon file rescan in pvd, it would constantly want to import it as a new movie, especially so if you move the file to a new drive/directory.  i appears (to me in ignorance) that the only way to reasonably use pvd is to have well named directories.  as i had gone through the movie selection process with mymovies, i had xml files in each directory. so i wrote a little excel script to grab the movie name and year from the mymovies.xml file and rename the directory and file (assuming one media file per directory).

 it is attached, not pretty code but worked for me.  note, comment the rename and move lines to see a list of what will be renamed etc.


--- Code: ---Sub renamefilesanddirectories()


Dim FSO, Fold, FIL, TS, fld, fld2
Dim strFolder, strContent, strPath, strComputer, objwmiservice, filelist
Dim nameonly, extension
Dim find1, find2, find3, find4, FileName, replacewith1, replacewith2, replacewith3, replacewith4
Dim dfilecontents, filecontents
Dim f, compiledlist, tempfilename
Dim temp, changed, missed, xmldoc

Const ForReading = 1, ForWriting = 2, ForAppending = 8

    'Change as needed
    'strFolder = "\\Tv\ripping\done"
    'strFolder = "\\Tv\Users\cleech\Videos\Ripping"
    'strFolder = "\\Tv\Done"
    'strFolder = "\\tv\Public\Videos\ripping"
    'strFolder = "\\tv\SG1\movies\ripping"
    'strFolder = "C:\Users\Public\Videos"
    strFolder = "F:\Movies\Craig"
    'strFolder = "F:\Movies\Mathew"
    'strFolder = "F:\Movies\ChrisM"
    'strFolder = "F:\Movies\ChrisMDbMovies"
    'strFolder = "C:\Users\Public\Videos\Test"
   
    tempfilename = "c:\temp\delme2.txt"
   
    On Error Resume Next

    'Create the filesystem object
    Set FSO = CreateObject("Scripting.FileSystemObject")
    'Get a reference to the folder you want to search
    Set Fold = FSO.GetFolder(strFolder)
     
    changed = strFolder & "\changed.txt"
    WriteFile changed, "<!>"
    missed = strFolder & "\missed.txt"
    WriteFile missed, "<!>"

    Set xmldoc = CreateObject("Microsoft.xmlDOM")
    i = 0
    For Each fld In Fold.subfolders
            i = i + 1
            j = 0
     For Each FIL In fld.Files
        extension = Right(FIL.Name, 3)
        nameonly = Left(FIL.Name, Len(FIL.Name) - 4)
        'msgbox nameonly
     
        If extension = "avi" Or extension = "mkv" Or extension = "mov" Or extension = "mp4" Or extension = "mpg" Then
            If j <> 0 Then
                activeheet.Cells(i, 4).Value = 1
                i = i + 1
            End If
            j = j + 1
            If FSO.fileexists(fld.Path & "\" & "mymovies.xml") Then

                xmldoc.Load (fld.Path & FIL.Name)
                xmldoc.async = False
                xmldoc.Load (fld.Path & "\" & "mymovies.xml")
                strQuery = "/Title/LocalTitle"
                mymoviestitle = ""
                mymoviesyear = ""
                Set colNodes = xmldoc.SelectNodes(strQuery)
                 For Each objnode In colNodes
                    mymoviestitle = objnode.Text
                 Next
                strQuery = "/Title/ProductionYear"
                Set colNodes = xmldoc.SelectNodes(strQuery)
                For Each objnode In colNodes
                    mymoviesyear = objnode.Text
                Next

                If mymoviestitle <> "" Then
                    temp2 = fld.Path & "\" & mymoviestitle & " (" & mymoviesyear & ")" & "." & extension
                    temp = FIL.Path
                    temp3 = Fold.Path & "\" & mymoviestitle & " (" & mymoviesyear & ")"
                    ActiveSheet.Cells(i, 1).Value = temp
                    ActiveSheet.Cells(i, 2).Value = temp2
                    ActiveSheet.Cells(i, 3).Value = temp3
                   FSO.moveFile temp, temp2
                   FSO.movefolder fld.Path, temp3
                End If

              '  MsgBox temp
               ' appendFile changed, temp
                'temp = fld.Path & "," & Fold.Path & mymoviestitle & "(" & mymoviesyear & ")"
                'appendFile changed, temp
           
            Else
                If j <> 0 Then
                    activeheet.Cells(i, 4).Value = 1
                    i = i + 1
                End If
           
                temp = fld.Path & "\" & FIL.Name
                ActiveSheet.Cells(i, 3).Value = temp
    '           Appendfile(missed, temp)
            End If
'           Fso.RenameFile(fld.path & "\" & fil.name), (fld.path & "\" & mymoviestitle & "(" & mymoviesyear & ")" & "." & extension)
'           FSO.movefolder fld.path, fold.path & mymoviestitle & "(" & mymoviesyear & ")"
           

        End If
     Next
    Next
           

'Clean up
Set TS = Nothing
Set Fold = Nothing
Set FSO = Nothing


End Sub
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version