( info, image_link_order=None)
return image_link
get the link for the thumbnail
get the link for the thumbnail
get the link for the thumbnail
def get_link_path( info, image_link_order=None):
        ''' get the link for the thumbnail '''
        image_link = None

        default_image_link_order = ['web', 'main', '.swf']
        
        if image_link_order:
            default_image_link_order = image_link_order


        for item in default_image_link_order:
            if item in info:
                image_link = info[item]
                break
        else:
            # grab the first one that is not an icon
            for key, value in info.items():
                # _repo and icon are special, skip it
                if key in ["icon", "_repo"]:
                    continue
                image_link = info[key]
                break

        # as a last resort, get the icon path
        if not image_link:
            image_link = info.get('icon')

        return image_link
def get_link_path ( info , image_link_order = None ) : image_link = None default_image_link_order = [ 'web' , 'main' , '.swf' ] if image_link_order : default_image_link_order = image_link_order for item in default_image_link_order : if item in info : image_link = info [ item ] break else : # grab the first one that is not an icon for key , value in info . items ( ) : # _repo and icon are special, skip it if key in [ "icon" , "_repo" ] : continue image_link = info [ key ] break # as a last resort, get the icon path if not image_link : image_link = info . get ( 'icon' ) return image_link