View Single Post
  #920  
Old 1st May 2008, 08:20 AM
sudermatt sudermatt is offline
Senior Member
 
Join Date: Nov 2003
Posts: 226
Default Update Album Art directly from your device!

I have a script which will look for album art from albumart.org and place it in the proper folder. This is great if you use S2P.

The script assumes a couple things:
- Mortscript
- your music is in \storage card\music\$artist\$album
-YOu will need GSFinder
-the folder view dropdown is visible (I scrape the path in the top dropdown to get the artist and album.
-You need to be able to execute the script from within GSFinder. (map script to button, or use a cascading menu that allows you to select the script file)

THe script basically sends the artist and album to the website,
parses the page
then pulls the image that has atag that matches the album

I get about 70% success rate....which is FINE WITH ME!


---------------------------------------------------------
musicroot = "\Storage Card\Music\"
d = windowtext(30,30)
message(d)
d = replace(d,musicroot,"")

arrMusic = split(d,"\")
theartist = arrMusic[1]
thealbum = arrMusic[2]

#message (theartist)
#message (thealbum)

thepath = "\Program Files\MortScripts\"
thefile = "dl1.html"
#connect("Data Network Connect")
connect("The Internet")
Download ("http://albumart.org/index.php?srchkey=" & theartist & "+" & thealbum & "&itempage=1&newsearch=1&searchindex=Music",thepat h & thefile)
strParse = ReadFile(thepath&thefile)
mainleft = find(strParse,"main_left")
#message(mainleft)
arttitle = find(strParse, "title=", mainleft)
#message(arttitle)
if (arttitle>0)
srcstart=find(strParse, "src=", arttitle)
imagestart = srcstart + 5
#message("imagestart:" & imagestart)
imageend = find(strParse, ".jpg", imagestart) + 4
#message("imageend:" & imageend)
imagepath=substr(strParse,imagestart,imageend-imagestart)
message(imagepath)
Download (imagepath,musicroot&theartist & "\" & thealbum & "\folder.jpg")
message("refresh folder")
endif
--------------------------------------------------

Hope you enjoy it....I LOVE IT!
__________________
Current Carrier: Verizon
Current Phone: Touch Pro (Sprint -> Verizon)

Past Devices: xv6800, xv6600, sx5050, HP 6315, HP Jornada 568, HP Jornada 650, HP Jornada 350

PhoneROMs DB

http://theMobilityExperts.com
Free Tools to Track your Device Info.