Jump to content

Help with Mortscript for Album art


Recommended Posts

Guest Jokes On You
Posted

I have this album art script that keeps giving me a comma expected and invalid download parameter statement. Am I doing something wrong. Here are the instructions if anyone can get to work for them let me know.

oot = "\Storage Card\Music\"

Foreach ArtistDir in Directories (Root \ "*")

Artist = replace(ArtistDir,Root ,"")

Foreach AlbumDir in directories (ArtistDir \ "*")

Album = replace(AlbumDir,ArtistDir & "\","")

If (FileExists(AlbumDir \ "folder.jpg"))

#message ("yes")

Else

Sleepmessage (1,Artist & " " & Album,"Download Album Art")

thepath = "\Program Files\MortScript\"

thefile = "dl1.html"

connect("The Internet")

Download ("http://albumart.org/index.php?srchkey=" & Artist & "+" & Album & "&itempage=1&newsearch=1&searchindex=Music",thepat h & thefile)

strParse = ReadFile(thepath&thefile)

mainleft = find(strParse,"main_left")

arttitle = find(strParse, "title=", mainleft)

if (arttitle>0)

srcstart=find(strParse, "src=", arttitle)

imagestart = srcstart + 5

imageend = find(strParse, ".jpg", imagestart) + 4

imagepath=substr(strParse,imagestart,imageend-imagestart)

Download (imagepath,Root & Artist & "\" & Album & "\folder.jpg")

endif

Endif

Endforeach

Endforeach

Exit

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.