Is there a utility that will do this?

Speak your mind

Is there a utility that will do this?

Postby str1der on Mon Apr 09, 2007 12:18 am

I am using an exported XML file from DVD Profiler to populate my database with coverart. As a convinence I would also like to have a copy of the jpeg in the directory that the movie resides in. The jpegs in Profiler use a number instead of a name so picking them out is kind of a pain and I have 500+ DVDs so it would be a daunting task anyway. My question is does a utility exist that would go through the xlobby database read the name of what file is being used as coverart and then make a copy of it in the directory where the actual movie files are?
str1der
 
Posts: 60
Joined: Wed Sep 17, 2003 3:30 pm
Location: Kentucky

Postby str1der on Thu Apr 12, 2007 8:06 pm

Any ideas?
str1der
 
Posts: 60
Joined: Wed Sep 17, 2003 3:30 pm
Location: Kentucky

Postby tswhite70 on Thu Apr 12, 2007 8:12 pm

Nothing that will do it off hand - it should be relatively easy to write a quick vbs script to do it though. Read in the xml, parse(regex) it for coverart and parameter, copy the coverart to the parameter location.

good luck,
tsw
tswhite70
 
Posts: 318
Joined: Tue Jan 06, 2004 3:44 pm
Location: Houston, Tx

Postby cmhardwick on Thu Apr 12, 2007 8:12 pm

The only thing I can think of would be a script that would read the XML file from Xlobby (since it will have the paths in it for both the images AND the movies) and grab the image name and copy it over. I have NO clue how to do this, btw I can logic it out, but don't know the commands, etc.
:lol:
cmhardwick
 
Posts: 508
Joined: Fri Jul 14, 2006 6:07 pm
Location: Tennessee

Postby R32 on Thu Apr 12, 2007 10:07 pm

It's been a while but something like the following should get you started

Set MSXML = CreateObject("MSXML.DOMDocument")

' Set MSXML Options
MSXML.Async = False
MSXML.preserveWhiteSpace = False
MSXML.validateOnParse = True
MSXML.resolveExternals = False

XMLURL = "The path to your xml file"

Loaded = MSXML.Load(XMLURL)

If (Loaded) Then

If your xml file loaded then your logic goes here
Else
Your document didn't load
End If

I personaly prefer to use XPath queries vs. RegEx expressions. Something like the following should work to get your original coverart location.

strLoc = MSXML.SelectSingleNode("database/item/coverart").text

Hope that helps
R32
 
Posts: 34
Joined: Tue Jan 31, 2006 11:24 pm

Postby str1der on Fri Apr 13, 2007 2:38 am

Thanks guys. I'm a network guy with a little programing experince but I've partnered with someone from work who is working on a VB that will do the job.
str1der
 
Posts: 60
Joined: Wed Sep 17, 2003 3:30 pm
Location: Kentucky

Postby cmhardwick on Fri Apr 13, 2007 3:26 am

Would you be willing to share this after it's done and tested? I would suggest, also, renaming the file folder.jpg in the movie directories. This gives the advantage of, viewed with Windows Explorer in thumbnail view, seeing the cover art on the folder icons.
cmhardwick
 
Posts: 508
Joined: Fri Jul 14, 2006 6:07 pm
Location: Tennessee

Postby lpg on Fri Apr 13, 2007 5:13 am

I wrote something to do this after I loaded my 500 vids into one directory. It does a bit more than you are asking. You can match the Profiler name with the name you gave the dvd, you can move the files to a different directory structure. You can point to a cover directory match the movie and them copy the file to the movie directory. If you are interested I will post a link. It is written in VB 8. Let me know if you are interested and I will package it up.

Here are some screen shots
Image

Image

Image

Image

Image

Larry
lpg
 
Posts: 296
Joined: Thu Apr 14, 2005 8:17 pm
Location: Chicago

Postby lpg on Fri Apr 13, 2007 5:26 am

Here is the link to the web page with the source. Just click on the yellow text "Change Video Name Program" The file will download.

http://lpgiese.googlepages.com/home

If you want the source I can send it but I do not know if Google will let me store it.

Larry
lpg
 
Posts: 296
Joined: Thu Apr 14, 2005 8:17 pm
Location: Chicago

Postby str1der on Fri Apr 13, 2007 1:53 pm

Thanks LPG. I downloaded it but can't get it to run. Is there anything I need to do? I tried the exe but it just bombs out? One question about it though. The way we are writing ours it would scan the movies.xml file in xlobby. It would then find the coverart for each movie (long string of numbers .jpg) then copy it to the directory that the actual movie files are in and name it "title".jpg . Will your program do that?
str1der
 
Posts: 60
Joined: Wed Sep 17, 2003 3:30 pm
Location: Kentucky

Postby lpg on Sat Apr 14, 2007 3:59 am

I posted the source. Go to the same link above it is the .zip file. Maybe you can use some of the code it is pretty well structured. I zipped the whole directory. Maybe it is reaching in the parent dir for some of the files. The program is in the bin directory. Try to run it after you unzip everything. It should work then.

Mine reads and processes the xml file that is exported from DVD Profiler but the logic to do this is the same.

I hope this helps.

Larry
lpg
 
Posts: 296
Joined: Thu Apr 14, 2005 8:17 pm
Location: Chicago

Postby str1der on Sat Apr 14, 2007 6:21 pm

Thanks got it working. If you have time can you give us a little tutorial. Since you wrote it I'm sure it's pretty intuittive to you but I'm a little confused by it and I'm afraid I'll destroy my current setup. I'm sure a lot of people on here would love to use it. Thanks.
str1der
 
Posts: 60
Joined: Wed Sep 17, 2003 3:30 pm
Location: Kentucky

Postby lpg on Sat Apr 14, 2007 10:32 pm

str1der wrote:Thanks got it working. If you have time can you give us a little tutorial. Since you wrote it I'm sure it's pretty intuittive to you but I'm a little confused by it and I'm afraid I'll destroy my current setup. I'm sure a lot of people on here would love to use it. Thanks.


It has been a year since I wrote and used it. I will try to write a tutorial by the end of the week. In the meantime set up a test directory with some fake vid files to see how it works.

Larry
lpg
 
Posts: 296
Joined: Thu Apr 14, 2005 8:17 pm
Location: Chicago