Jump to content

Result list icons from URL


Recommended Posts

I made a workflow to search for movie titles and I really would like to add the movie covers as icon. Since Alfred does not accept URLs to an image as icon I have to download the covers and save them to disc before I can show them. That’s a slow solution. Furthermore the covers are distorted to a square. That’s not nice.

 

I think I’m not the only one who wants asynchronously loaded images (show the results at once and add the images when they are loaded) from an URL for showing them (undistorted) in result lists. I found some questions regarding that issue in the forum.

 

Are there plans to implement that to Alfred? It would be a great help to make wonderful and visually appealing workflows.

Link to post

I made a workflow to search for movie titles and I really would like to add the movie covers as icon. Since Alfred does not accept URLs to an image as icon I have to download the covers and save them to disc before I can show them. That’s a slow solution. Furthermore the covers are distorted to a square. That’s not nice.

 

I think I’m not the only one who wants asynchronously loaded images (show the results at once and add the images when they are loaded) from an URL for showing them (undistorted) in result lists. I found some questions regarding that issue in the forum.

 

Are there plans to implement that to Alfred? It would be a great help to make wonderful and visually appealing workflows.

 

I believe Andrew has a ticket to look into implementing this in the future but there has been no timeline for when it would be added.

Link to post
  • 1 month later...

While it would be cool to load images asynchronously, it will create a performance hit for the workflow because of the http requests. If you think about it, then if you pull in nine results from a REST query and grab the images for those, then you'll need to load the json or xml file as well as nine images. So you have ten requests. That will noticeably reduce the speed for Alfred because — I think — Alfred won't show the results until the images are downloaded, and not everyone has a reliably fast internet connection. If Andrew were to implement this feature, then, I imagine, he would probably cache the image results in order to have that performance hit only once.

 

Because of those performance reasons, it just makes sense to write your workflow so that it will download the images either to the workflow cache folder or to the permanent storage folder and have the workflow look to see if the file already exists in that location before attempting a download. If you're worried about fresh images, then you can easily create a function to expire the cache based on timestamps or something else.

 

So, while the asynchronous loading would be cool, I'm not sure if it has any net gain over downloading and caching. It's a matter of trading simpler code for a performance loss.

 

Shawn

Link to post

While it would be cool to load images asynchronously, it will create a performance hit for the workflow because of the http requests. If you think about it, then if you pull in nine results from a REST query and grab the images for those, then you'll need to load the json or xml file as well as nine images. So you have ten requests. That will noticeably reduce the speed for Alfred because — I think — Alfred won't show the results until the images are downloaded, and not everyone has a reliably fast internet connection. If Andrew were to implement this feature, then, I imagine, he would probably cache the image results in order to have that performance hit only once.

 

Because of those performance reasons, it just makes sense to write your workflow so that it will download the images either to the workflow cache folder or to the permanent storage folder and have the workflow look to see if the file already exists in that location before attempting a download. If you're worried about fresh images, then you can easily create a function to expire the cache based on timestamps or something else.

 

So, while the asynchronous loading would be cool, I'm not sure if it has any net gain over downloading and caching. It's a matter of trading simpler code for a performance loss.

 

Shawn

 

I agree that if Alfred waited until all images are received, this feature would be pointless. It's not that hard to download your own icons.

 

That said, the whole point of this feature is speed. Alfred would show the results before the images load, perhaps showing a 'placeholder' image (either static or specified by the workflow XML) in its place until that individual icon is retrieved.

Link to post

I agree that if Alfred waited until all images are received, this feature would be pointless. It's not that hard to download your own icons.

 

That said, the whole point of this feature is speed. Alfred would show the results before the images load, perhaps showing a 'placeholder' image (either static or specified by the workflow XML) in its place until that individual icon is retrieved.

 

Just my 2 cents thrown in... agreeing with Tyler and Shawn, depending on what you're doing, even on local network, this can get a bit excessive. For instance, the Plex workflow I was messing around with. I had it where it would grab the cover art for the tv show/movie from the plex server (on the same network) to show as icons. My plex library is rather large and when pulling those... it slowed down a good bit. I tried caching them, but then I found myself with large amounts of icons cached for a single query (since it was used on a search filter and querying on every character).

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...