Jump to content
Sign in to follow this  
Thornhunt

Mp3 file thing broke need help

Recommended Posts

Thornhunt

ok a while back i made this program to put all the mp3 files i had (just nocking around)

and put them in artist folders, now a year (maybe) has passed and i need to re use it.

but it doesnt seem to want to work :/

it makes the folders corrtly but doesnt move the files

( i think it may be because i might have made it on my XP syste, and is now trying it on a VISTA system)

p.s i didnt put a finished mssgbox or ender so basicly it runs till it errors (because there are no more .mp3 files)

any how heres the code

#include <array.au3>
_DLLstartup()
global $search = FileFindFirstFile("*.mp3*")
global $file = 0
global $oId3 = ObjCreate("CDDBControl.CddbID3Tag")
while 1
$filename = FileFindNextFile($search)
$fileloc = @ScriptDir & "\"
$file = $fileloc & $filename
$re = _getID3Tag($file)
sleep(100)
$Artist = $oId3.LeadArtist
FileMove($file, @ScriptDir & "\" & $artist & "\" & $filename & ".mp3", 8)
sleep(100)
WEnd




_DLLshutdown()


Func _getID3Tag($h_file)
    If Not IsObj($oId3) Then
        SetError(1)
        Return 0
    EndIf
    $oId3.LoadFromFile ($h_file, False)
    Local $idTag_A[15][2]
    $idTag_A[0][0] = 'Title'
    $idTag_A[0][1] = $oId3.Title
    $idTag_A[1][0] = 'LeadArtist'
    $idTag_A[1][1] = $oId3.LeadArtist
    $idTag_A[2][0] = 'Album'
    $idTag_A[2][1] = $oId3.Album
    $idTag_A[3][0] = 'TrackPosition'
    $idTag_A[3][1] = $oId3.TrackPosition
    $idTag_A[4][0] = 'Year'
    $idTag_A[4][1] = $oId3.Year
    $idTag_A[5][0] = 'Genre'
    $idTag_A[5][1] = $oId3.Genre
    $idTag_A[6][0] = 'Comments'
    $idTag_A[6][1] = $oId3.Comments
    $idTag_A[7][0] = 'Label'
    $idTag_A[7][1] = $oId3.Label
    $idTag_A[8][0] = 'FileId'
    $idTag_A[8][1] = $oId3.FileId
    $idTag_A[9][0] = 'ISRC'
    $idTag_A[9][1] = $oId3.ISRC
    $idTag_A[10][0] = 'CopyrightHolder'
    $idTag_A[10][1] = $oId3.CopyrightHolder
    $idTag_A[11][0] = 'CopyrightYear'
    $idTag_A[11][1] = $oId3.CopyrightYear
    $idTag_A[12][0] = 'PartOfSet'
    $idTag_A[12][1] = $oId3.PartOfSet
    $idTag_A[13][0] = 'Movie'
    $idTag_A[13][1] = $oId3.Movie
    $idTag_A[14][0] = 'BeatsPerMinute'
    $idTag_A[14][1] = $oId3.BeatsPerMinute
    Return $idTag_A
EndFunc   ;==>_getID3Tag





Func _DLLstartup($DLLpath = '')
    If $DLLpath = Default Or $DLLpath = '' Then $DLLpath = @ScriptDir & '\cddbcontrol.dll'
    RunWait('regsvr32 /s ' & '"' & $DLLpath & '"')
EndFunc  ;==>_DLLstartup

Func _DLLshutdown($DLLpath = '')
    If $DLLpath = Default Or $DLLpath = '' Then $DLLpath = @ScriptDir & '\cddbcontrol.dll'
    RunWait('regsvr32 /u /s ' & '"' & $DLLpath & '"')
EndFunc  ;==>_DLLshutdown
Edited by Thornhunt

Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D

Share this post


Link to post
Share on other sites
Thornhunt

anyone ? :/

oops missed a dll

http://rapidshare.com/files/396427685/cddbcontrol.dll.html

Edited by Thornhunt

Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D

Share this post


Link to post
Share on other sites
Somerset

don't be bumping threads... that is a no no....


 

Spoiler

shoot_zpsfd329d66.png
dontbelieveeverythingyouthink_zps0e1e900

Madness is the first step to understanding...

Share this post


Link to post
Share on other sites
Thornhunt

don't be bumping threads... that is a no no....

i know i know..


Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.