Jump to content

Alfred v2 not honoring xml order in Script Filter


Recommended Posts

I'm finishing a "delete downloads files" workflow, and I'm working hard on ordering the files the same way as you see them on the Dock's Downloads icon. I have the files correctly ordered, but Alfred is showing them in the following order (0 indexed): 2, 10, 0, 1, 3, 4, 5, 6... everything is perfectly order after the first glitch.

 

Let me know if you need a demo or something

Edited by ramiro.araujo
Link to comment

And I've just find out that if you type the keyword and do Cmd + number to select it, it's shown in the correct order!

And the 2, 10, 0, 1, 3, 4 order from before is now 11, 3, 0, 1, 2... :S

 

edit: BTW, I'm logging the generated order and the xml is always fine

Edited by ramiro.araujo
Link to comment

I'm finishing a "delete downloads files" workflow, and I'm working hard on ordering the files the same way as you see them on the Dock's Downloads icon. I have the files correctly ordered, but Alfred is showing them in the following order (0 indexed): 2, 10, 0, 1, 3, 4, 5, 6... everything is perfectly order after the first glitch.

 

Let me know if you need a demo or something

 

This could be the result of Alfred's learning. Does it put files you've selected before first? That's supposed to happen.

Edited by Tyler Eich
Link to comment

This is going to be a combination of the UID you use per result and Alfred's learning. The best way to get around this issue is to use random UIDs e.g. "my.workflow.result.[randomuid]". Alfred won't learn these as they are unique results, and he will always keep them in the same order that they were presented to the knowledge.

 

[moving to Workflow questions so others can benefit from this topic]

Link to comment

Will Alfred forget about such random UIDs after a while? If my script is creating them by the second (i.e. 5 per evaluation), it might pretty quickly start to slow down alfred?

 

Alfred doesn't remember them unless they are actioned. Then they are added to the knowledge database. That data isn't cleared automatically. It would have to be cleared manually

Link to comment

Alfred doesn't remember them unless they are actioned. Then they are added to the knowledge database. That data isn't cleared automatically. It would have to be cleared manually

 

The knowledge data actually expires after a month and is automatically tidied, so actioned random UIDs won't bloat things out :)

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...