Page 13 of 32 FirstFirst ... 34567891011121314151617181920212223 ... LastLast
Results 121 to 130 of 317

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

  1. #121
    FLAC
    Auto Apps:loading...
    moahdib's Avatar
    Join Date
    Jul 2000
    Posts
    1,017
    Quote Originally Posted by Sonicxtacy02 View Post
    ok i gotta admit.. i'm mildly confused as to some of the inner workings of this script. i was under the impression that the main purpose of builder-genre.exe is to build albuminfob4.xml and folderslist.txt I created a script to do just that in your format allowing a potentially unlimited amount of directories. But xmlparser.exe doesnt appear to use that created .xml file at all. Is that correct? I guess my confusion is in the fact that there's a bunch of .xml's created and i dont understand what all there purposes are for. Maybe i can just send u my builder script and u can implement it into the rest of your code.
    Sure. I just need a function that will scan a certain directory, and return the paths of where the jpg is found in an array. That's it.
    The one i got dies after so many recursions...
    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. #122
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,169
    Blog Entries
    53
    Quote Originally Posted by moahdib View Post
    Sure. I just need a function that will scan a certain directory, and return the paths of where the jpg is found in an array. That's it.
    The one i got dies after so many recursions...
    here's what i got

    Code:
    #include<array.au3>
    #include<file.au3>
    ;-- set up global varibles
    Global $DIR
    Dim $FILES
    Dim $DIR							; directory later specified by rr.ini
    Dim $FILEMASK="folder.jpg"				  ; specify the filemask
    dim $FILEMASK2="*.mp3"				
    
    
    
    ;create SDK for COM with RR
    $rr = ObjCreate("RoadRunner.SDK")
    
    ;establish drive path for music
    $musicpath= $rr.GetInfo("=$musicpath$")
    
    
    $DIR=$musicpath
    
    
    $FILES = _GetFileList($DIR, $FILEMASK)
    if FileExists("albuminfo.xml") then filedelete("albuminfo.xml")
    filewriteline("albuminfob4.xml",'<?xml version="1.0" encoding="utf-8" ?>')
    filewriteline("albuminfob4.xml","    <artworkinfo>")
    For $X = 1 To UBound($FILES)-1
    	$artlocation="\folder.jpg"
    	$count= StringInStr ($files[$x], "\" ,"", -1)
    	$folder= Stringleft($files[$x],$count)
    	$foldersplit=stringsplit($folder,"\")
    	$foldercount=$foldersplit[0]
     	$album=$foldersplit[$foldercount-1]
    	$genre=$foldersplit[3]
    	;msgbox(0,"test", $trackname)
    	if fileexists($folder&"*.mp3") Then
    		;if fileexists($folder&"album.m3u") then filedelete($folder&"album.m3u")
    		$listarray=_FileListToArray($folder,"*.mp3")
    		;_ArrayDisplay($listarray,"test")
    		$trackfilename=$listarray[1]
    		$trackfilesplit=stringsplit($trackfilename, "-")
    		$artist=$trackfilesplit[1]
    		_FileWriteFromArray($folder&"album.m3u", $listarray)
    		filewriteline("list.txt",$files[$x])
    		filewriteline("albuminfob4.xml", "        <albuminfo>")
    		filewriteline("albuminfob4.xml","            <artLocation>"&$artlocation&"</artLocation>")
    		filewriteline("albuminfob4.xml","            <genre>"&$genre&"</genre>")
    		filewriteline("albuminfob4.xml","            <artist>"&$artist&"</artist>")
    		filewriteline("albuminfob4.xml","            <album>"&$album&"</album>")
    		filewriteline("albuminfob4.xml","            <folder>"&$folder&"</folder>")
    		filewriteline("albuminfob4.xml", "        </albuminfo>")
    	Else
    		$artist="Unknown"
    	EndIf
    	
    	
    
    		
    Next
    filewriteline("albuminfob4.xml","    </artworkinfo>")
    
    $final=fileread("albuminfob4.xml")
    
    ;$final=StringReplace($final, "\", "\\")
    ;FileWrite("albuminfo.xml",$final)
    ;filedelete("albuminfob4.xml")
    
    
    Func _GetFileList($T_DIR,$T_MASK)
       Dim $N_DIRNAMES[200000] ; max number of directories that can be scanned
       Local $N_DIRCOUNT = 0
       Local $N_FILE
       Local $N_SEARCH
       Local $N_TFILE
       Local $N_OFILE
       Local $T_FILENAMES
       Local $T_FILECOUNT
       Local $T_DIRCOUNT = 1
       ; remove the end \ If specified
       If StringRight($T_DIR,1) = "\" Then $T_DIR = StringTrimRight($T_DIR,1)
       $N_DIRNAMES[$T_DIRCOUNT] = $T_DIR
       ; Exit if base dir doesn't exists
       If Not FileExists($T_DIR) Then Return 0
       ; keep on looping until all directories are scanned
       While $T_DIRCOUNT > $N_DIRCOUNT
          $N_DIRCOUNT = $N_DIRCOUNT + 1
          ; find all subdirs in this directory and save them in a array
          $N_SEARCH = FileFindFirstFile($N_DIRNAMES[$N_DIRCOUNT] & "\*.*")
          While 1
             $N_FILE = FileFindNextFile($N_SEARCH)
             If @error Then ExitLoop
             ; skip these references
             If $N_FILE = "." Or $N_FILE = ".." Then ContinueLoop
             $N_TFILE = $N_DIRNAMES[$N_DIRCOUNT] & "\" & $N_FILE
             ; if Directory than add to the list of directories to be processed
             If StringInStr(FileGetAttrib( $N_TFILE ),"D") > 0 Then
                $T_DIRCOUNT = $T_DIRCOUNT + 1
                $N_DIRNAMES[$T_DIRCOUNT] = $N_TFILE
             EndIf
          Wend
          FileClose($N_SEARCH)
          ; find all Files that mtach the MASK
          $N_SEARCH = FileFindFirstFile($N_DIRNAMES[$N_DIRCOUNT] & "\" & $T_MASK )
          If $N_SEARCH = -1 Then ContinueLoop
          While 1
             $N_FILE = FileFindNextFile($N_SEARCH)
             If @error Then ExitLoop
             ; skip these references
             If $N_FILE = "." Or $N_FILE = ".." Then ContinueLoop
             $N_TFILE = $N_DIRNAMES[$N_DIRCOUNT] & "\" & $N_FILE
             ; if Directory than add to the list of directories to be processed
             If StringInStr(FileGetAttrib( $N_TFILE ),"D") = 0 Then
                $T_FILENAMES  = $T_FILENAMES & $N_TFILE & @CR
                $T_FILECOUNT = $T_FILECOUNT + 1
                ;MsgBox(0,'filecount ' & $T_FILECOUNT ,$N_TFILE)
             EndIf
          Wend
          FileClose($N_SEARCH)
       Wend
       $T_FILENAMES  = StringTrimRight($T_FILENAMES,1)
       $N_OFILE = StringSplit($T_FILENAMES,@CR)
       Return( $N_OFILE )
    EndFunc   ;==>_GetFileList
    the function works perfect without modification.. i've used it in various scripting projects.
    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

  3. #123
    FLAC
    Auto Apps:loading...
    moahdib's Avatar
    Join Date
    Jul 2000
    Posts
    1,017
    ok boys and girls I fixed the scanning issues (folder limit) and added a ini entry for what file to scan for.

    Download the attached and replace everything.
    Attached Files Attached Files
    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. #124
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,169
    Blog Entries
    53
    getting the same "subscript dimension range exceeded" error with it. Here's the autoit error code

    Code:
    id3 file1: D:\My Music\Soundtracks\Guitar Hero 2\Guitar Hero 2\Danzig - Mother.mp3
    C:\Program Files\Road Runner\skins\Sonique Evolution\coverflow\builder-genre.au3 (191) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: 
    $file2=$folder&$dirarray[$Z+1]&"\"&$listarray2[$Z+1] 
    $file2=$folder&^ ERROR
    >Exit code: 1    Time: 15.147
    i should note that the file1 path is incorrect. It should read D:\My Music\Soundtracks\Guitar Hero 2\Danzig - Mother.mp3 to be correct. It seems that your script has a problem with long file paths. I just went thru temporarily deleting all the folders that give me the error message and all of them were pretty long file paths and pretty long file names. Other than that i couldnt tell you what the issue is.
    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

  5. #125
    FLAC
    Auto Apps:loading...
    moahdib's Avatar
    Join Date
    Jul 2000
    Posts
    1,017
    Hey soni, do you have any subdirectories under Guitar Hero 2? or just mp3?
    The script stopped where it is looking for subdirectories below the level where the jpg file was found.

    Above line 191, add this and re-run the script and tell me the outcome.

    ConsoleWrite("id3file2 dirarray: "&$dirarray[$Z+1]&" / "&$listarray2[$Z+1]&@CR)

    or just try the scripts attached. I did some fixes.
    Attached Files Attached Files
    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

  6. #126
    Maximum Bitrate
    Join Date
    Nov 2005
    Posts
    597
    ohhhh.. this is gonna be released so soon.. i can feel it

    With the .jpg issue - will you need to enter a filename in the .ini.. or will it simply look for any .jpg file?

    As I mentioned, most of my album art is called <album name>.jpg, that way, it doesnt get lost if I move the file out of the folder. Also doing a search for *.jpg gives me the album name via the file itself. If this is not achievable just let me know, and I'll start renaming .
    cheers

  7. #127
    FLAC
    Auto Apps:loading...
    moahdib's Avatar
    Join Date
    Jul 2000
    Posts
    1,017
    Quote Originally Posted by Iceman_jkh View Post
    ohhhh.. this is gonna be released so soon.. i can feel it

    With the .jpg issue - will you need to enter a filename in the .ini.. or will it simply look for any .jpg file?

    As I mentioned, most of my album art is called <album name>.jpg, that way, it doesnt get lost if I move the file out of the folder. Also doing a search for *.jpg gives me the album name via the file itself. If this is not achievable just let me know, and I'll start renaming .
    cheers
    To do a search using first found jpg, you put .jpg or just jpg. No * wildcards here.

    the zip file in first post has all the new scripts.
    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

  8. #128
    Maximum Bitrate
    Join Date
    Nov 2005
    Posts
    597
    awesome!.. thanks for the tip

  9. #129
    Maximum Bitrate
    Join Date
    Nov 2005
    Posts
    597
    Builder-Artist works fine

    But using Builder-Genre I get an error.

    -----------------
    AutoIT Error
    Line: -1
    Error: variable used without being declared.
    -----------------

    I get this if the artfile is set to anything other than 'folder.jpg'.
    The builder-artist works perfect no matter what setting.

    If i rename the file (from front.jpg/<albumname>.jpg) to folder.jpg and change the .artfile to 'folder.jpg' it works perfect. So I know the jpg file isnt corrupt or anything like that.

    It also gives the error if I set the artfile to 'front.jpg' - basically anything other than 'folder.jpg' throws that error for the Builder-Genre.
    (Guessing the var dec missing from builder-G code perhaps?)

    Ice

  10. #130
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,169
    Blog Entries
    53
    Quote Originally Posted by moahdib View Post
    Hey soni, do you have any subdirectories under Guitar Hero 2? or just mp3?
    The script stopped where it is looking for subdirectories below the level where the jpg file was found.

    Above line 191, add this and re-run the script and tell me the outcome.

    ConsoleWrite("id3file2 dirarray: "&$dirarray[$Z+1]&" / "&$listarray2[$Z+1]&@CR)

    or just try the scripts attached. I did some fixes.
    -genre builder-
    downloaded the new version and there's no errors thrown. It gets to your "done" splash but its not done.. folderlist always stops at 27kb and artistlist is blank. no .xml file is created.

    -artist builder-
    this version works when i define my musicpath as my rock genre folder. Script runs, creates xmls and works inside of the .swf perfectly. Unforunately because its just one genre folder and not my entire music library i cant say if it works because there's a smaller amount of folders or if its that the artist code doesnt have the bug that the genre code does.
    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

Similar Threads

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