Batch to remove backdrop info and change title tag

Heres a batch to remove all of the backdrop info from the XML files.

It also changes the to match the XML filename

example:

Clowns (2008).xml

Adventure
67676
<imdb_id>tt9878767</imdb_id>
After failing : to get his wife pregnant, a guy recruits his pals to steal the deposit he left at a sperm bank years ago.
2011-11-11
23
<title>The Clowns: of eastwick and then some</title>

NoBrakes

http://www.youtube.com/watch?v=fghfh
<backdrop>http://cf2.imgobject.com/t/p/w1280/tytyty.jpg</backdrop>
<backdrop>http://cf2.imgobject.com/t/p/w1280/tytytytygh.jpg</backdrop>

will change to

Adventure
67676
<imdb_id>tt9878767</imdb_id>
After failing : to get his wife pregnant, a guy recruits his pals to steal the deposit he left at a sperm bank years ago.
2011-11-11
23
<title>Clowns (2008)</title>

NoBrakes

This MUST be run from a drive letter and does not recurse into subdirs.  I can easily do that if its requested. 

-nb

Hey nobrakes,

Nice post, looks interesting!

Just a quick question but what is the purpose of this batch file assides the obvious? Does it speed up backdrop display by removing uneccessary clutter? Likewise do you have to arrange your media content into genres for this to work?

Finally, if implementing this batch file would WD SMP simply overwrite the data next time it scans it?

Cheers!

Im not sure how much it speeds up anything.  It does reduce clutter in the XML obviously.

The SMP will only overwrite this modified XML if you either delete the XML and rescan or ‘remove content info’ and then ‘get content info’

I made this for myself because I have my structure on a NAS in the order of:

FOLDER

Moviename (2001).mp4 — (this is the folder name trick)

          FILES

          Movie.mp4 — (this is the movie file)

          Moviename (2001).xml — (this is the scraped xml file)

What  I do then is search from the root of all Movies for *.xml and copy all of them to the root.

so I get this long list of xml files listed under all of the movie folders.

Then I run that batch from the root and it cleans up all of the xml files.  Which now, I have a description for each FOLDER (no backdrops) and inside that folder I have the actual movies… also with the same description but including backdrops.

Let me know if you want pics.

I wrote like 5 or 6 different batch files to manipulate the files/folders and corresponding xml code.  I got tired of changing something like 4100 filenames and xml titles and such.

NOTE**  I am also finishing a batch to change the backdrop tags to point to the local drive instead of URLs.

Be aware that these batch files ae to be run on a PC and MUST be placed into a drive letter not a unc path like \computer\movies.

Finally, NO you dont have to have them arranged in any order.  This will only change the XML title and remove the backdrop and trailer from the XML file that is located in the same folder as the batch. (It wont search subdirs, but I can make it do that)

-nb

I’m guessing for those peole who truly understand the implications of using such a batch file may find this quite useful and cetainly if they have many movies on a NAS drive. I was interested to read your post as I like to tinker and customise everything whenever possible. That said, I only have around 20 or so movies shared over my network at present  and to be honest I’m struggling to find a descent free program to rip my movies. I tried VLC Media Player the other night which worked quite quickly but ended up with a 4:3 MP4 when it should have been 16:9.

I guess once I’ve got to grips with building my library of rips then your batch file might prove very useful.

Thanks for sharing your idea. :slight_smile:

Slinky

I wrote like 5 or 6 different batch files to manipulate the files/folders and corresponding xml code.  I got tired of changing something like 4100 filenames and xml titles and such.

 

NOTE**  I am also finishing a batch to change the backdrop tags to point to the local drive instead of URLs.

 

I would be very interested in getting a copy of your scripts.  I just picked up an SMP to test and am most likely going to be adding these to several TVs.  I am currently setup with all media shared from a FreeNAS server and using OpenELEC/XBMC as my media player.  

 

My folders and metadata are organized for such and Im am currently trying to figure out the best way to have both platforms merged.  This would help if I need to do some renaming/rearranging of my ~1000 titles.

 

Thanks in advance!