Changing names to TBNs after changing path at database
#1
Hi all,
I'll explain you my problem: I've changed my paths at my library (before I used XBMS and now I'll use SMB). All is working fine but the TBNs and the fanarts. As I posted at forum and an user wrote me, TBN files are named using an MD5 hash of the path. What I want to do is to make a VBS or powershell script (I don't know how to program in perl) to do the following:

1.- Read the old path in the old database
2.- Calculate the MD5 hash of the old path
3.- Read the new path in the new database (using the same ID)
4.- Calculate the MD5 hash of the new path
5.- Rename (and move if necessary to the right folder) the TBN file from the old one to the new hash.

Can anyone help me for calculating the hash? I've found a DLL for this but it does the calc in a different manner. There is an example

Comparing 2 strings:

OLD PATH:
xbms://192.168.0.1:1400/DivxG/2008/2008-03/Dinero.Sucio.2008.SPANISH.DVDRIP.XVID
-EnDoR/

MD5: d33849846351ea642d2c3fd6bf378f31

NEW PATH:
smb://StorageSrv/DivxG/2008/2008-03
/Dinero.Sucio.2008.SPANISH.DVDRIP.XVID-EnDoR/

MD5: aa5a3fdc8fb916deb0288db4d24e147c


But the XBMC md5 hashes has only 8 characters... and that one has more than 8...
I want to do it because I have near 500 MB of tbn files and I don't know how to "automate" the cover/fanart search for elements that now exists in the database.

Thanks in advanced

NaBz
Reply

Logout Mark Read Team Forum Stats Members Help
Changing names to TBNs after changing path at database0