Page 11 of 32 FirstFirst ... 23456789101112131415161718192021 ... LastLast
Results 101 to 110 of 317

Thread: Browse by Cover (Coverflow) - Updated 11/8/07

  1. #101
    FLAC
    Auto Apps:loading...
    moahdib's Avatar
    Join Date
    Jul 2000
    Posts
    1,017
    Quote Originally Posted by davidp View Post
    not quite sure exactly what i did, but i got it to now display the albums, i can select them (where they flip over) and pick a song to play, but when it loads the song in roadrunner, it also starts playing a second instance of the same song. if i pick a song from the playlist in rr on my audio screen, it plays that song on top of the one i picked in coverflow. i have no idea where the original song is playing, there is only one winamp process running. any ideas?
    other than the trippy dual songs, it looks absolutly amazing

    thanks,
    david
    Make sure your skin file has these in it:

    L,0,0,0,0,,,,,,"RRSCREEN",
    S,-400,-400,1,2000,255,255,255,0,0,0,0,0,0,80,80,80,0,255, 0,,20,"Arial Narrow"


    The label RRSCREEN will prevent from playing two instances. Flash has its own bult in mp3 player which I added to play in a browser. Adding that label will prevent it from playing the mp3 in flash. The S is the playlist which RR needs to point to the correct song.
    04 Acura TL w/ core2duo 2ghz laptop w/ 1gb RAM on a docking station.

    Fast car, fast PC. ;)

    http://www.arcdesigns.net/carpc/

    My TL CarPC ver2

    FSR Flash Skin w/ moving weather maps

  2. #102
    FLAC Griff1's Avatar
    Join Date
    Nov 2005
    Location
    Midlands
    Posts
    1,052
    Wow,totally awesome moahdib,what an update.
    The performance is much better with the reflections off,60% better in fact.
    Its now 100% percent useful.

    If i can be picky.....When selecting from the track list dragging the list up and down,the list just keeps on rolling instead of stopping when i stop dragging,i can slow it down with a click but can't stop it from carrying on to the bottom of the list....Am i missing something?

    Top job though mate.
    P4 2.8 HT, 512Mb Ram, 60Gb 2.5 HD, M4-ATX, SB Audigy2, BU353, Lilliput TS,Soundgraph Imon VFD,SONY Optiarc dvd Burner,RideRunner, iGo8, Custom Freedom 2.1

  3. #103
    FLAC
    Auto Apps:loading...
    moahdib's Avatar
    Join Date
    Jul 2000
    Posts
    1,017
    Quote Originally Posted by Griff1 View Post
    Wow,totally awesome moahdib,what an update.
    The performance is much better with the reflections off,60% better in fact.
    Its now 100% percent useful.

    If i can be picky.....When selecting from the track list dragging the list up and down,the list just keeps on rolling instead of stopping when i stop dragging,i can slow it down with a click but can't stop it from carrying on to the bottom of the list....Am i missing something?

    Top job though mate.
    well its supposed to work like this: If you drag like 10 pixels up or down, it will just move one page, about 40 pixels and it will scroll 2 pages.

    If you drag across like 40 pixels ( left to right or right to left) it will go to bottom or top of the page... maybe I need to add a sensitivity setting. WOrks fine on my end IMHO.

    Yeah... those reflections are a pain, it creates bitmap datas for every album TWICE! and adding all the blur, alpha, distort effects doesn't help either.

    This should make it useable to those with epia carPC's. Glad you find it nice
    04 Acura TL w/ core2duo 2ghz laptop w/ 1gb RAM on a docking station.

    Fast car, fast PC. ;)

    http://www.arcdesigns.net/carpc/

    My TL CarPC ver2

    FSR Flash Skin w/ moving weather maps

  4. #104
    FLAC Nomader's Avatar
    Join Date
    Apr 2006
    Location
    Greece
    Posts
    1,291
    one request
    can you make the album JPG to use (folder.jpg) to be defined in the INI as a variable... my cover art is all called "front.jpg" (as i have front, back and CD art in my collections)

  5. #105
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,161
    Blog Entries
    51
    anyway you could send me the autoitscripts in .au3 format.... i'd like to have a look into how they work so i can see if i can improve on the logic to allow bigger libraries. I already have a script made that will create a folderlist.txt file but i dont understand how your converting folderlist.txt into the .xmls
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  6. #106
    FLAC
    Auto Apps:loading...
    moahdib's Avatar
    Join Date
    Jul 2000
    Posts
    1,017
    Soni you decompile my script if you go to Autoit program folder-> Autoit Extras-> decompile exe to au3.
    what the script does is scans the folder for folder.jpg, and creates xml files and album.m3u all in unicode to allow for foreign chars. I really don't know how to make it allow for bigger so go ahead decompile it have a crack at it
    A warning tho...code is confusing...cuz thats the way I think. haha

    And Nomader.. yes i can put that into the ini. I'll post it on the next update coming soon.
    04 Acura TL w/ core2duo 2ghz laptop w/ 1gb RAM on a docking station.

    Fast car, fast PC. ;)

    http://www.arcdesigns.net/carpc/

    My TL CarPC ver2

    FSR Flash Skin w/ moving weather maps

  7. #107
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,161
    Blog Entries
    51
    the decompiler doesnt work on new scripts ... i tried it. If you prefer to pm them to me you can do that.
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  8. #108
    Newbie maxzor's Avatar
    Join Date
    Feb 2005
    Location
    Italy
    Posts
    51
    I've tried the decompiler but it doesn't work.
    I've tried all version of Autoit (included Beta release)
    Can you post or pm the script?
    Thanks
    Max

  9. #109
    Maximum Bitrate
    Join Date
    Nov 2005
    Posts
    597
    Awesome work Moahdib!! Using this on my E4500 Core2Duo (2.2Ghz) and it rox!
    Are the animations going to get any more extravagant? [asking for trouble]

    Is there any way to remove the scrollbar at the bottom of the flash?
    What does the 'recycle'/'square' icon do, in the bottom right corner?

    Can you explain what each line in the .ini file does. Most are easy to figure out, but some I couldnt.

    Thanks
    Ice

  10. #110
    FLAC
    Auto Apps:loading...
    moahdib's Avatar
    Join Date
    Jul 2000
    Posts
    1,017
    These sources have some fixes from the last released version. I didn't save the au3 from the released ones... I believe it fixes the issue with having one mp3 in a folder which will stop the script from finishing.
    Someone take a crack at fixing the scanfolder function bc right now it doesn't support having more than 500 or so albums ( thats what my count was when it broke). Something to do with autoit limit on recursive calls. i apologize ahead of time for the confusion of the script.. I end up writing this stuff very late at night, high on caffeine and often forget where my thought process begin or ends.


    Build-Genre.au3

    Code:
    #include<Array.au3>
    #include<File.au3>
    #include<SendRR.au3>
    
    Dim $FILEMASK="folder.jpg"			; specify the filemask
    Dim $dir
    
    $musicpath=IniRead("builder.ini","builder","path","default")
    if $musicpath="default" or $musicpath="" Then
    	$musicpath= InputBox("Music Folder","Path to your genres folders. Put C:\MUSIC if your directory is structured in this manner:"&@CR&"C:\Music\80s\Albums\"&@CR&"C:\Music\Rock\Albums\"&@CR&"Do NOT put \ at the end. Edit builder.ini if you mess up.")
    	IniWrite("builder.ini","builder","path",$musicpath)
    EndIf
    
    SplashTextOn("Message","Rebuilding XML Data...",500,50,@DesktopWidth/2-500/2,@DesktopHeight/2-50/2,1,"Arial","28","800")
    $iswebserver=false   ; builds XML with relative paths.
    $webpath=@MyDocumentsDir &"\My Music\"
    $webpathlen=StringLen($webpath)
    
    $dirlevel=StringSplit($musicpath,"\")
    $folderlevel = $dirlevel[0]+1;
    ConsoleWrite($folderlevel&@CR)
    
    ; Instantiate a COM instance with your new dll
    $oId3 = ObjCreate("CDDBControl.CddbID3Tag")
    if @error then
    	Runwait( @comspec & " /c regsvr32 cddbcontrol.dll","",@SW_HIDE)
    	Sleep(3000)
    	WinActivate("RegSvr32")
    	WinClose("RegSvr32")
    endif
    	Runwait( @comspec & " /c del Genre_*.xml","",@SW_HIDE)
    if FileExists("FoldersList.txt") then filedelete("FoldersList.txt")
    Dim $FolderName = $musicpath
    Dim $FileCount = 0
    dim $files[200000]
    ScanFolder($FolderName)
    ;MsgBox(0,"Done","Folder Scan Complete.  Scanned " & $FileCount & " Files")
    
    Func ScanFolder($SourceFolder)
    	Local $Search
    	Local $File
    	Local $FileAttributes
    	Local $FullFilePath
    
    	$Search = FileFindFirstFile($SourceFolder & "\*.*")
    
    	While 1
    		If $Search = -1 Then
    			ExitLoop
    		EndIf
    
    		$File = FileFindNextFile($Search)
    		If @error Then ExitLoop
    
    		$FullFilePath = $SourceFolder & "\" & $File
    		$FileAttributes = FileGetAttrib($FullFilePath)
    
    		If StringInStr($FileAttributes,"D") Then
    			ScanFolder($FullFilePath)
    		Else
    			if Stringinstr($FullFilePath,$filemask) then
    				$files[$filecount+1]=$FullFilePath
    				FileOpen("FoldersList.txt",32)
    				FileWriteLine(@ScriptDir & "\FoldersList.txt",$FullFilePath)
    				$FileCount += 1
    			endif
    		EndIf
    	WEnd
    	FileClose($Search)
    	FileClose("FoldersList.txt")
    	$Files[0]=$Filecount
    EndFunc
    
    $Y=1
    
    $count = StringInStr ($files[1], "\" ,"", -1)
    $folder = Stringleft($files[1],$count)
    $foldersplit = StringSplit($folder,"\")
    $lastgenre = $foldersplit[$folderlevel]
    $genrename = $lastgenre
    $genrenametxt=StringReplace($genrename,"&","%26")
    $temp = "list=" &$genrenametxt
    
    ConsoleWrite($lastgenre&@CR)
    
    if FileExists("albuminfob4.xml") then filedelete("albuminfob4.xml")
    if FileExists("genre.txt") then filedelete("genre.txt")
    if FileExists("genrelist.txt") then filedelete("genrelist.txt")
    	
    $fname="Genre_"&$genrename&".xml"
    $Falbuminfo=FileOpen("albuminfob4.xml",33)
    filewriteline($Falbuminfo,"<?xml version=""1.0"" encoding=""UTF-16""?>")
    filewriteline($Falbuminfo,"<artworkinfo>")
    
    For $X = 1 To $filecount
    	
    	$count= StringInStr ($files[$x], "\" ,"", -1)
    	$folder= Stringleft($files[$x],$count)
    	$foldersplit=StringSplit($folder,"\")
    	$foldercount=$foldersplit[0]
     	$trackname=$foldersplit[$foldercount]
    	$genre=$foldersplit[$folderlevel]
    	$isflac=0
    	if $lastgenre <> $genre then
    		;Close File
    			$Y+=1
    			$lastgenre=$genre
    			$genrename=$genre
    			$genrenametxt=StringReplace($genrename,"&","%26")
    			$temp=$temp &","& $genrenametxt
    
    			ConsoleWrite($genrename&@CR)
    			filewriteline($Falbuminfo,"</artworkinfo>")
    			FileClose($Falbuminfo)
    			FileCopy("albuminfob4.xml",$fname,1)
    			Filedelete("albuminfob4.xml")
    			
    			$fname="Genre_"&$genrename &".xml"
    			$Falbuminfo=FileOpen("albuminfob4.xml",33)
    			filewriteline($Falbuminfo,"<?xml version=""1.0"" encoding=""UTF-16""?>")
    			filewriteline($Falbuminfo,"<artworkinfo>")
    	EndIf
    			;ConsoleWrite($folder&@CR)
    			if fileexists($folder&"album.m3u") then filedelete($folder&"album.m3u")
    			filewriteline("genrelist.txt",$folder)
    			if fileexists($folder&"*.mp3") Then
    				$listarray=_FileListToArray($folder,"*.mp3")
    			elseif fileexists($folder&"*.wma") Then
    				$listarray=_FileListToArray($folder,"*.wma")
    			elseif fileexists($folder&"*.flac") Then
    				$isflac=1
    				$listarray=_FileListToArray($folder,"*.flac")
    			Else
    				$listarray=""
    			endif
    			if $listarray<>"" Then
    				;_ArrayDisplay($listarray)
    				$trackfilename=$listarray[1]
    				$file =$folder&$trackfilename
    				
    				
    				$albumm3u=FileOpen($folder&"album.m3u",129)
    				For $Y=1 to $listarray[0]
    					FileWriteLine($albumm3u,$listarray[$Y])
    				Next
    				FileClose($albumm3u)
    				
    				
    				
    				if $isflac=0 Then
    					; Load the tags
    					$oId3.LoadFromFile ($file, True)
    					$sTitle = $oId3.Title
    					$sLeadArtist = $oId3.LeadArtist
    					$sAlbum = $oId3.Album
    					if $listarray[0] > 1 Then
    						$trackfilename2=$listarray[2]
    						$file2=$folder&$trackfilename2
    						;ConsoleWrite("id3file2: "&$file2&@CR)
    						$oId3.LoadFromFile($file2, True)
    						$sLeadArtist2 = $oId3.LeadArtist
    						if $sLeadArtist<>$sLeadArtist2 and $sLeadArtist<>"" Then
    							$sLeadArtist = "Various Artists"
    						Endif
    					EndIf
    				Else
    					$sLeadArtist = ""
    					$sAlbum = ""
    				EndIf
    			Else
    				ConsoleWrite($folder&@CR)
    				$dirarray=_FileListToArray($folder,"*.*",2)
    				
    				;_ArrayDisplay($folder2)
    			For $Z=1 to $dirarray[0]
    				$folder2=$folder&$dirarray[$Z]&"\"
    				$append=$dirarray[$Z]&"\"
    				if fileexists($folder2&"album.m3u") then 
    					filedelete($folder2&"album.m3u")
    				EndIf
    				if fileexists($folder2&"*.mp3") or fileexists($folder2&"*.wma") Then
    					If fileexists($folder2&"*.mp3") Then
    						$listarray2=_FileListToArray($folder2,"*.mp3")
    					EndIf
    					If fileexists($folder2&"*.wma") Then
    						$listarray2=_FileListToArray($folder2,"*.wma")
    					EndIf
    					
    					
    					
    					$albumm3u=FileOpen($folder&"album.m3u",129)
    					For $Y=1 to $listarray2[0]
    						FileWriteLine($albumm3u,$append&$listarray2[$Y])
    					Next
    					FileClose($albumm3u)
    					
    					If $Z=1 Then
    						$trackfilename=$folder
    						;ConsoleWrite("dirrarray: "&$trackfilename&@CR)
    						$file =$folder&$dirarray[$Z]&"\"&$listarray2[$Z]
    						; Load the tags from your specified file
    						ConsoleWrite("id3 file1: "&$file&@CR)
    						$oId3.LoadFromFile ($file, True)
    						$sTitle = $oId3.Title
    						$sGenre = $oId3.Genre
    						$sLeadArtist = $oId3.LeadArtist
    						$sAlbum = $oId3.Album
    						If $listarray2[0]>1 Then
    							$file2=$folder&$dirarray[$Z+1]&"\"&$listarray2[$Z+1]
    							;ConsoleWrite("id3file2: "&$file2&@CR)
    							$oId3.LoadFromFile ($file2, True)
    							$sLeadArtist2 = $oId3.LeadArtist
    							if $sLeadArtist<>$sLeadArtist2 and $sLeadArtist<>"" Then
    								$sLeadArtist = "Various Artists"
    							Endif
    						EndIf
    					EndIf
    				ElseIf fileexists($folder2&"*.flac") Then
    					$listarray2=_FileListToArray($folder2,"*.flac")
    					
    					$albumm3u=FileOpen($folder&"album.m3u",129)
    					For $Y=1 to $listarray2[0]
    						FileWriteLine($albumm3u,$append&$listarray2[$Y])
    					Next
    					FileClose($albumm3u)
    
    
    					If $Z=1 Then
    						$trackfilename=$folder
    						$file =$folder&$dirarray[$Z]&"\"&$listarray2[$Z]
    						$sLeadArtist = ""
    						$sAlbum = ""
    					EndIf
    				EndIf
    			Next
    
    			Endif
    			$folderloc=StringTrimRight($files[$x],10) ; remove folder.jpg from end of the string
    			if $iswebserver=true Then
    				$folderloc=StringTrimLeft($folderloc,$webpathlen)
    			endIf
    			filewriteline($Falbuminfo,"<albuminfo>")
    			filewriteline($Falbuminfo,"<artLocation>\folder.jpg</artLocation>")
    			filewriteline($Falbuminfo,"<genre>"&$genre&"</genre>")
    			filewriteline($Falbuminfo,"<artist>"&$sLeadArtist&"</artist>")
    			filewriteline($Falbuminfo,"<album>"&$sAlbum&"</album>")
    			filewriteline($Falbuminfo,"<folder>"&$folderloc&"</folder>")
    			filewriteline($Falbuminfo, "</albuminfo>")
    			
    Next
    			filewriteline($Falbuminfo,"</artworkinfo>")
    			FileClose($Falbuminfo)
    			FileCopy("albuminfob4.xml",$fname,1)
    			;Filedelete("albuminfob4.xml")
    			$temp=$temp&","
    			FileWriteline("genre.txt",$temp)
    			FileClose("genre.txt")
    			ConsoleWrite("done")
    			RunWait("xmlparser.exe")
    			SplashOff()
    			SplashTextOn("Message","Done. Reloading Skin.",500,50,@DesktopWidth/2-500/2,@DesktopHeight/2-50/2,1,"Arial","28","800")
    			Sleep(2000)
    			SplashOff()
    			SendCommand($My_Hwnd, $hwnd_RR, "RELOADSKIN")
    Exit

    Build-Artist.au3

    Code:
    #include<Array.au3>
    #include<File.au3>
    #include<SendRR.au3>
    
    Dim $FILEMASK="folder.jpg"			; specify the filemask
    Dim $dir
    
    $musicpath=IniRead("builder.ini","builder","path","default")
    if $musicpath="default" or $musicpath="" Then
    	$musicpath= InputBox("Music Folder","Path to your music folders. Put C:\MUSIC if your directory is structured in this manner:"&@CR&"C:\Music\Album1"&@CR&"C:\Music\Rock\Album2"&@CR&"Do NOT put \ at the end. Edit builder-alpha.ini if you mess up.")
    	IniWrite("builder.ini","builder","path",$musicpath)
    EndIf
    
    SplashTextOn("Message","Rebuilding XML Data...",500,50,@DesktopWidth/2-500/2,@DesktopHeight/2-50/2,1,"Arial","28","800")
    $iswebserver=false   ; builds XML with relative paths.
    $webpath=@MyDocumentsDir &"\My Music\"
    $webpathlen=StringLen($webpath)
    $dirlevel=StringSplit($musicpath,"\")
    
    ; Instantiate a COM instance with your new dll
    $oId3 = ObjCreate("CDDBControl.CddbID3Tag")
    if @error then
    	Runwait( @comspec & " /c regsvr32 cddbcontrol.dll","",@SW_HIDE)
    	Sleep(3000)
    	WinActivate("RegSvr32")
    	WinClose("RegSvr32")
    endif
    Runwait( @comspec & " /c del artist_*.xml","",@SW_HIDE)
    
    Dim $FolderName = $musicpath
    dim $listarray2
    dim $listarray
    Dim $FileCount = 0
    dim $files[1000]
    dim $count
    dim $folder
    dim $foldersplit
    dim $sLeadArtist
    dim $sGenre
    dim $sAlbum
    dim $foldercount
    dim $trackfolder
    dim $isflac
    dim $letter
    dim $xmlfile="Artist_"
    dim $letters[100]
    dim $lettercount=0
    dim $letterindex=1
    if FileExists("FoldersList.txt") then filedelete("FoldersList.txt")
    ScanFolder($FolderName)
    if FileExists("Artistlist.txt") then filedelete("Artistlist.txt")
    For $x = 1 To $Filecount
    	$folder= $files[$x]&"\"
    	$foldersplit=StringSplit($folder,"\")
    	$foldercount=$foldersplit[0]
     	$trackfolder=$foldersplit[$foldercount-1]
    	$isflac=0
    	$trackfolderlen=StringLen($trackfolder)
    	FileWriteLine("Artistlist.txt",$folder)
    	If fileexists($folder&"album.m3u") then filedelete($folder&"album.m3u")
    	
    	if fileexists($folder&"*.mp3") Then
    		$listarray=_FileListToArray($folder,"*.mp3")
    	elseif fileexists($folder&"*.wma") Then
    		$listarray=_FileListToArray($folder,"*.wma")
    	elseif fileexists($folder&"*.flac") Then
    		$isflac=1
    		$listarray=_FileListToArray($folder,"*.flac")
    	Else
    		$listarray=""
    	endif
    	;_ArrayDisplay($listarray)
    	
    	if $listarray<>"" Then
    		;_ArrayDisplay($listarray)
    		$trackfilename=$listarray[1]
    		$file =$folder&$trackfilename
    		
    		
    		$albumm3u=FileOpen($folder&"album.m3u",129)
    		For $Y=1 to $listarray[0]
    			FileWriteLine($albumm3u,$listarray[$Y])
    		Next
    		FileClose($albumm3u)
    		
    		if $isflac=0 Then
    			
    			; Load the tags
    			;ConsoleWrite("id3file1: "&$file&@CR)
    			$oId3.LoadFromFile($file, True)
    			$sTitle = $oId3.Title
    			$sGenre = $oId3.Genre
    			$sLeadArtist = $oId3.LeadArtist
    			$sAlbum = $oId3.Album
    			if $listarray[0] > 1 Then
    				$trackfilename2=$listarray[2]
    				$file2=$folder&$trackfilename2
    				ConsoleWrite("id3file2: "&$file2&@CR)
    				$oId3.LoadFromFile($file2, True)
    				$sLeadArtist2 = $oId3.LeadArtist
    				if $sLeadArtist<>$sLeadArtist2 and $sLeadArtist<>"" Then
    					$sLeadArtist = "Various Artists"
    				Endif
    			EndIf
    		Else
    			$sLeadArtist = ""
    			$sAlbum = ""
    		EndIf
    	Else
    		$dirarray=_FileListToArray($folder,"*.*",2)
    		;_ArrayDisplay($dirarray)
    		For $Z=1 to $dirarray[0]
    			$folder2=$folder&$dirarray[$Z]&"\"
    			$append=$dirarray[$Z]&"\"
    			if fileexists($folder2&"album.m3u") then
    				filedelete($folder2&"album.m3u")
    			EndIf
    			if fileexists($folder2&"*.mp3") or fileexists($folder2&"*.wma") Then
    				If fileexists($folder2&"*.mp3") Then
    					$listarray2=_FileListToArray($folder2,"*.mp3")
    				EndIf
    				If fileexists($folder2&"*.wma") Then
    					$listarray2=_FileListToArray($folder2,"*.wma")
    				EndIf
    				
    				
    				$albumm3u=FileOpen($folder&"album.m3u",129)
    				For $Y=1 to $listarray2[0]
    					FileWriteLine($albumm3u,$append&$listarray2[$Y])
    				Next
    				FileClose($albumm3u)
    				
    				If $Z=1 Then
    					$trackfilename=$folder
    					;ConsoleWrite("dirrarray: "&$trackfilename&@CR)
    					$file =$folder&$dirarray[$Z]&"\"&$listarray2[$Z]
    					; Load the tags from your specified file
    					ConsoleWrite("id3 file1: "&$file)
    					$oId3.LoadFromFile ($file, True)
    					$sTitle = $oId3.Title
    					$sGenre = $oId3.Genre
    					$sLeadArtist = $oId3.LeadArtist
    					$sAlbum = $oId3.Album
    					If $listarray2[0]>1 Then
    						$file2=$folder&$dirarray[$Z+1]&"\"&$listarray2[$Z+1]
    						ConsoleWrite("id3file2: "&$file2&@CR)
    						$oId3.LoadFromFile ($file2, True)
    						$sLeadArtist2 = $oId3.LeadArtist
    						if $sLeadArtist<>$sLeadArtist2 and $sLeadArtist<>"" Then
    							$sLeadArtist = "Various Artists"
    						Endif
    					EndIf
    				EndIf
    			ElseIf fileexists($folder2&"*.flac") Then
    				$listarray2=_FileListToArray($folder2,"*.flac")
    				
    				$albumm3u=FileOpen($folder&"album.m3u",129)
    				For $Y=1 to $listarray2[0]
    					FileWriteLine($albumm3u,$append&$listarray2[$Y])
    				Next
    				FileClose($albumm3u)
    				
    				If $Z=1 Then
    					$trackfilename=$folder
    					$file =$folder&$dirarray[$Z]&"\"&$listarray2[$Z]
    					$sLeadArtist = ""
    					$sAlbum = ""
    				EndIf
    			EndIf
    		Next
    	Endif
    
    	If $sLeadArtist="" Then
    		$letter=StringLeft($trackfolder,1)
    	Else
    		$letter=StringLeft($sLeadArtist,1)
    	EndIf
    	
    	If $letter=" " OR $letter="(" OR $letter="[" OR $letter="*" Then
    		$letter=StringMid($trackfolder,2,1)
    	ElseIf $letter="#" OR $letter="0" OR $letter="1" OR $letter="2" OR $letter="3" OR $letter="4" OR $letter="5" OR $letter="6" OR $letter="=7" OR $letter="8" OR $letter="9" Then
    		$letter="#"
    	EndIf
    	$letter=StringUpper($letter)
    	If _ArraySearch($letters,$letter,1)==-1 Then
    		$letters[$lettercount]=$letter
    		$lettercount+=1
    	EndIf
    	
    	If  FileExists($xmlfile&$letter&".xml")=0 Then
    		$currentfile=FileOpen($xmlfile&$letter&".xml",33)
    		FileWriteLine($currentfile,'<?xml version="1.0" encoding="UTF-16"?>')
    		Filewriteline($currentfile,"<artworkinfo>")
    	Else
    		$currentfile=FileOpen($xmlfile&$letter&".xml",33)
    	EndIf
    	
    	ConsoleWrite($letter&" "&$folder&" "&$sLeadArtist&" "&$sAlbum&@CR)
    	FileWriteLine($currentfile,"<albuminfo>")
    	FileWriteLine($currentfile,"<artLocation>\folder.jpg</artLocation>")
    	FileWriteLine($currentfile,"<genre>"&$sGenre&"</genre>")
    	FileWriteLine($currentfile,"<artist>"&$sLeadArtist&"</artist>")
    	FileWriteLine($currentfile,"<album>"&$sAlbum&"</album>")
    	FileWriteLine($currentfile,"<folder>"&$folder&"</folder>")
    	FileWriteLine($currentfile, "</albuminfo>")
    	FileClose($currentfile)
    	
    Next
    
    ; Finalize XML files and empty array
    dim $artists=""
    dim $xmlfiles[200]
    $filecount=0
    $FILEMASK="Artist_"
    $xmlfiles=_FileListToArray(@ScriptDir,"Artist*.xml",1)
    FileClose("Artistlist.txt")
    ;_ArrayDisplay($xmlfiles)
    For $I = 1 To $xmlfiles[0]
    	$thisfile=FileOpen($xmlfiles[$i],33)
    	Filewriteline($thisfile,"</artworkinfo>")
    	FileClose($thisfile)
    Next
    
    ; Write artist.txt
    If FileExists("artist.txt") ==1 Then
    	FileDelete("artist.txt")
    EndIf
    
    $letters[0]=$lettercount-1
    ;_ArrayDisplay($letters)
    _ArraySort($letters,0,1,$lettercount-1)
    ;\_ArrayDisplay($letters)
    $artists=_ArraytoString($letters,",",1,$lettercount)
    FileWriteLine("artist.txt","list="&$artists)
    SplashOff()
    SplashTextOn("Message","Done. Reloading Skin.",500,50,@DesktopWidth/2-500/2,@DesktopHeight/2-50/2,1,"Arial","28","800")
    Sleep(2000)
    SplashOff()
    SendCommand($My_Hwnd, $hwnd_RR, "RELOADSKIN")
    
    EXIT
    
    
    Func ScanFolder($SourceFolder)
    	Local $foundfile
    	Local $Search
    	Local $File
    	Local $FileAttributes
    	Local $FullFilePath
    
    	$Search = FileFindFirstFile($SourceFolder & "\*.*")
    
    	While 1
    		If $Search = -1 Then
    			ExitLoop
    		EndIf
    
    		$File = FileFindNextFile($Search)
    		If @error Then ExitLoop
    		$FullFilePath = $SourceFolder & "\" & $File
    		$FileAttributes = FileGetAttrib($FullFilePath)
    
    		If StringInStr($FileAttributes,"D") Then
    			ScanFolder($FullFilePath)
    		Else
    			if Stringinstr($FullFilePath,$filemask) then
    				$files[$filecount+1]=$SourceFolder
    				FileOpen("FoldersList.txt",32)
    				FileWriteLine("FoldersList.txt",$SourceFolder)
    				$FileCount += 1
    			endif
    		EndIf
    	WEnd
    	FileClose($Search)
    	FileClose("FoldersList.txt")
    	$Files[0]=$Filecount
    EndFunc

    xmlparser.au3

    Code:
    #Include<Array.au3>
    #include<file.au3>
    
    dim $foldername=@ScriptDir
    dim $FILEMASK="Genre_"
    Dim $FileCount = 0
    dim $files[100]
    dim $linecount=0
    dim $xmlfile="Artist_"
    dim $letters[100]
    dim $lettercount=0
    dim $letterindex=1
    
    Runwait( @comspec & " /c del Artist_*.xml","",@SW_HIDE)
    ;dim $nodes[500]
    if FileExists("genretoartist.txt") then filedelete("genretoartist.txt")
    ScanFolder($FolderName)
    $files[0]=$filecount
    ;_ArrayDisplay($files)
    
    For $i = 1 To $filecount
    	dim $file
    	_FileReadToArray($files[$i],$file)
    	Consolewrite("file: " &$files[$i] &@CR)
    	$linecount=$file[0]
    	For $x=1 to $linecount
    		if StringInStr($file[$x],"<albuminfo>") <> 0 Then
    			$getloc=StringInStr($file[$x+3],"<artist>")
    			;ConsoleWrite("getloc: "&$file[$x+3] &@CR)
    			$getloc=$getloc+8
    			$letter=StringMid($file[$x+3],$getloc,1)
    			if $letter=" " Then
    				$letter=StringMid($file[$x+3],$getloc+1,1)
    			Elseif $letter=="#" OR $letter=="0" OR $letter=="1" OR $letter=="2" OR $letter=="3" OR $letter=="4" OR $letter=="5" OR $letter=="6" OR $letter=="=7" OR $letter=="8" OR $letter=="9" Then
    				$letter="#"
    			Elseif ($letter=="<") Then
    				$letter="~"
    			Else
    				$letter=StringUpper($letter)
    			EndIf
    			If _ArraySearch($letters,$letter,1)==-1 Then
    				$letters[$lettercount]=$letter
    				$lettercount+=1
    			EndIf
    			ConsoleWrite("letter: "&$letter &"/" &$file[$x+3] &@CR)
    			
    			If  fileexists( $xmlfile&$letter&".xml")==0 Then
    				;_FileCreate($xmlfile&$letter&".xml")
    				$currentfile=FileOpen($xmlfile&$letter&".xml",129)
    				FileWriteLine($currentfile,'<?xml version="1.0" encoding="UTF-8"?>')
    				Filewriteline($currentfile,"<artworkinfo>")
    				Filewriteline($currentfile,$file[$x])
    				Filewriteline($currentfile,$file[$x+1])
    				Filewriteline($currentfile,$file[$x+2])
    				Filewriteline($currentfile,$file[$x+3])
    				Filewriteline($currentfile,$file[$x+4])
    				Filewriteline($currentfile,$file[$x+5])
    				Filewriteline($currentfile,$file[$x+6])
    				FileClose($currentfile)
    			Else
    				$currentfile=FileOpen($xmlfile&$letter&".xml",129)
    				Filewriteline($currentfile,$file[$x])
    				Filewriteline($currentfile,$file[$x+1])
    				Filewriteline($currentfile,$file[$x+2])
    				Filewriteline($currentfile,$file[$x+3])
    				Filewriteline($currentfile,$file[$x+4])
    				Filewriteline($currentfile,$file[$x+5])
    				Filewriteline($currentfile,$file[$x+6])
    				FileClose($currentfile)
    			EndIf
    		Endif
    	Next
    Next
    
    ; Finalize XML files and empty array
    dim $artists=""
    $filecount=0
    $FILEMASK="artistinfo"
    ScanFolder(@ScriptDir)
    FileClose("genretoartist.txt")
    $files[0]=$filecount
    ;_ArrayDisplay($files)
    For $i = 1 To $filecount
    	$thisfile=FileOpen($files[$i],129)
    	Filewriteline($thisfile,"</artworkinfo>")
    	FileClose($thisfile)
    Next
    
    ; Write artist.txt
    If FileExists("artist.txt") ==1 Then
    	FileDelete("artist.txt")
    EndIf
    $letters[0]=$lettercount-1
    ;_ArrayDisplay($letters)
    _ArraySort($letters,0,1,$lettercount-1)
    ;_ArrayDisplay($letters)
    $artists=_ArraytoString($letters,",",1,$lettercount)
    FileWriteLine("artist.txt","list="&$artists)
    
    EXIT
    
    Func XMLreplace($string)
    $string = StringReplace($string,'&', "&amp;")
    $string = StringReplace($string,"'", "&apos;")
    $string = StringReplace($string,"’", "&apos;")
    $string = StringReplace($string,'"', "&quot;")
    $string = StringReplace($string,'<', "&lt;")
    $string = StringReplace($string,'>', "&gt;")
    $string = StringReplace($string,'—', " ")
    $string = StringReplace($string,'“', " ")
    $string = StringReplace($string,'”', " ")
    ;$string = StringReplace($string,'\', " ")
    $string = StringReplace($string,'', " ") 
    	;ConsoleWrite($xmlstr&@CR)
    	Return $string
    	
    EndFunc
    Func ScanFolder($SourceFolder)
    	Local $Search
    	Local $File
    	Local $FileAttributes
    	Local $FullFilePath
    
    	$Search = FileFindFirstFile($SourceFolder & "\*.*")
    
    	While 1
    		If $Search = -1 Then
    			ExitLoop
    		EndIf
    
    		$File = FileFindNextFile($Search)
    		If @error Then ExitLoop
    
    		$FullFilePath = $SourceFolder & "\" & $File
    		$FileAttributes = FileGetAttrib($FullFilePath)
    
    		If StringInStr($FileAttributes,"D") Then
    			ScanFolder($FullFilePath)
    		Else
    			LogFile($FullFilePath)
    			;ConsoleWrite($FullFilePath)
    		EndIf
    
    	WEnd
    	FileClose($Search)
    EndFunc
    
    Func LogFile($FileName)
    	if Stringinstr($filename,$filemask) then
    	$files[$filecount+1]=$filename
    	FileOpen("xmllist.txt",32)
    	FileWriteLine(@ScriptDir & "\xmllist.txt",$FileName)
    	$FileCount += 1
    endif
    EndFunc
    04 Acura TL w/ core2duo 2ghz laptop w/ 1gb RAM on a docking station.

    Fast car, fast PC. ;)

    http://www.arcdesigns.net/carpc/

    My TL CarPC ver2

    FSR Flash Skin w/ moving weather maps

Similar Threads

  1. Need Help With Damaged Bumper Cover
    By Hoshwa in forum Newbie
    Replies: 1
    Last Post: 11-29-2007, 02:40 PM
  2. Tonneau Cover for my truck
    By ford master in forum Off Topic
    Replies: 0
    Last Post: 11-05-2006, 06:56 PM
  3. RR 03-09-05 .. Multiple Browse ..
    By guino in forum Road Runner
    Replies: 25
    Last Post: 04-18-2005, 12:22 PM
  4. Replies: 0
    Last Post: 03-24-2005, 12:17 PM
  5. Best way to make a 'flip up' monitor?
    By GReeToZ in forum Fabrication
    Replies: 34
    Last Post: 01-21-2005, 05:48 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •