gimmel Posted November 19, 2013 Share Posted November 19, 2013 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 comment
jdfwarrior Posted November 19, 2013 Share Posted November 19, 2013 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 comment
rwt Posted January 13, 2014 Share Posted January 13, 2014 Any news about this implementation? Link to comment
rice.shawn Posted January 13, 2014 Share Posted January 13, 2014 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 comment
Tyler Eich Posted January 13, 2014 Share Posted January 13, 2014 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 comment
jdfwarrior Posted January 14, 2014 Share Posted January 14, 2014 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 comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now