44a45,87
>     def find_local_filename (self, location) :
>         try :
>             #TODO - What about fileshares and local networks?
>             if location[0:7] <> "file://" :
>                 #Not a local file...
>                 return None
> 
>             #TODO - Check what happens with accents...
>             #Must "unescape" things like spaces
>             location = location[7:].replace("%20"," ")
>             track_folder = os.path.dirname(location)
>             track_filename = os.path.basename(location)
> 
>             #Build a list of image files in this folder...            
>             local_files = os.listdir(track_folder)
>             local_images = []
>             for filename in local_files :
>                 if filename.split(os.path.extsep)[-1] in ["jpg", "jpeg","png"] :
>                     local_images.append(filename)
>             del local_files
> 
>             #First of all, look for track specific images using the track's base filename...
>             for filename in local_images :
>                 if os.path.extsep.join(filename.split(os.path.extsep)[:-1]) \
>                 == os.path.extsep.join(track_filename.split(os.path.extsep)[:-1]) :
>                     return os.path.join(track_folder, filename)
> 
>             #That failed, so we are reduced to folder/directory specific files...
>             #Special cases include "Cover.jpg" and variants, and ".folder.png"
>             #which is used as a folder image by Gnome Nautilus
>             for filename in local_images :
>                 if os.path.extsep.join(filename.split(os.path.extsep)[:-1]).lower() in ["cover",".folder"] :
>                     return os.path.join(track_folder, filename)
> 
>             #Should we return ANY image in the folder?
>             #What about if there is one and only one image?
>             return None
>         except :
>             #Something went wrong...
>             #I want the code to carry on the the next method, so catch the exception here.
>             #TODO log it?  Error message?
>             return None
> 
48a92,109
>         ##########################
>         # Method One - Localfile #
>         ##########################
>         
>         st_location = db.entry_get (entry, rhythmdb.PROP_LOCATION)
> 
>         # Note we do NOT make an extra copy in our cache
>         local_filename = self.find_local_filename(st_location)
>         if local_filename :
>             assert os.path.isfile(local_filename)
>             assert local_filename.split(os.path.extsep)[-1] in ["jpg","jpeg","png"]
>             pixbuf = gtk.gdk.pixbuf_new_from_file (local_filename)    
>             callback (entry, pixbuf)
>             return
> 
>         ##########################
>         # Method Two - Amazon    #
>         ##########################
