Florian Posted October 8, 2014 Share Posted October 8, 2014 (edited) So I'm working on this new workflow that makes extensive use of the modifier keys. Though, some items have no use for it (or for all of them). So in order not to get a blank subtext, i just copy the default subtext. At this point in the development, I only set up the CMD and ALT keys in the workflow: And so when the output from the main script filter is the following, nothing displays at all (like it's loading forever): <?xml version="1.0"?><items> <item uid="" valid="NO" autocomplete=""> <title>Next episode on Wednesday</title> <subtitle>2014-10-14 S04E05 Landline</subtitle> <arg></arg> <icon></icon> <subtitle mod="shift">2014-10-14 S04E05 Landline</subtitle> <subtitle mod="fn">2014-10-14 S04E05 Landline</subtitle> <subtitle mod="ctrl">2014-10-14 S04E05 Landline</subtitle> <subtitle mod="alt">2014-10-14 S04E05 Landline</subtitle> <subtitle mod="cmd">2014-10-14 S04E05 Landline</subtitle> </item> <item uid="" valid="YES" autocomplete=""> <title>Add New Girl to my favorites</title> <subtitle></subtitle> <arg>f11420</arg> <icon>love.png</icon> <subtitle mod="shift"></subtitle> <subtitle mod="fn"></subtitle> <subtitle mod="ctrl"></subtitle> <subtitle mod="alt"></subtitle> <subtitle mod="cmd"></subtitle> </item> <item uid="" valid="YES" autocomplete=""> <title>New Girl is an American television sitcom that premiered on Fox on September 20, 2011. It stars Zooey Deschanel, Jake Johnson, Max Greenfield, Lamorne Morris, and Hannah Simone. New Girl has received some favorable responses from critics since its conception, many giving particular praise for Deschanel's performance. The show has been nominated for several awards, including four Golden Globe Award nominations and five Primetime Emmy Award nominations. On March 4, 2013, the series was renewed for a third season, which premiered on September 17, 2013.</title> <subtitle>★★★★☆ (2011) Comedy — Returning Series</subtitle> <arg>l1420</arg> <icon>what.png</icon> <subtitle mod="shift">★★★★☆ (2011) Comedy — Returning Series</subtitle> <subtitle mod="fn">★★★★☆ (2011) Comedy — Returning Series</subtitle> <subtitle mod="ctrl">★★★★☆ (2011) Comedy — Returning Series</subtitle> <subtitle mod="alt">★★★★☆ (2011) Comedy — Returning Series</subtitle> <subtitle mod="cmd">★★★★☆ (2011) Comedy — Returning Series</subtitle> <text type="largetype">New Girl is an American television sitcom that premiered on Fox on September 20, 2011. It stars Zooey Deschanel, Jake Johnson, Max Greenfield, Lamorne Morris, and Hannah Simone. New Girl has received some favorable responses from critics since its conception, many giving particular praise for Deschanel's performance. The show has been nominated for several awards, including four Golden Globe Award nominations and five Primetime Emmy Award nominations. On March 4, 2013, the series was renewed for a third season, which premiered on September 17, 2013.</text> </item> <item uid="" valid="YES" autocomplete=""> <title>latest episode: S04E04 Micro</title> <subtitle>Add this episode to Watch Later</subtitle> <arg>m1420 0 New Girl, S04E04: Micro</arg> <icon></icon> <subtitle mod="shift">Add this episode to Watch Later</subtitle> <subtitle mod="fn">Add this episode to Watch Later</subtitle> <subtitle mod="ctrl">Add this episode to Watch Later</subtitle> <subtitle mod="alt">Go to The Movie DataBase's page for this episode</subtitle> <subtitle mod="cmd">Add this episode to Watch Later</subtitle> </item> </items> Am I doing something wrong? It this voluntary from Andrew? Is this a bug? Of course the simple fix is to only assign the <subtitle mod> for the keys that are actually assigned to something. But I don't really understand why that should matter. Instead of not displaying anything at all, let's just ignore the extra ones, no? PS: debugging this I thought that one of us should do an Alfred XML online validator, so new developers can quickly figure out what they have wrong. Edited October 8, 2014 by Florian Link to comment Share on other sites More sharing options...
jdfwarrior Posted October 9, 2014 Share Posted October 9, 2014 So I'm working on this new workflow that makes extensive use of the modifier keys. Though, some items have no use for it (or for all of them). So in order not to get a blank subtext, i just copy the default subtext. At this point in the development, I only set up the CMD and ALT keys in the workflow: And so when the output from the main script filter is the following, nothing displays at all (like it's loading forever): <?xml version="1.0"?><items> <item uid="" valid="NO" autocomplete=""> <title>Next episode on Wednesday</title> <subtitle>2014-10-14 S04E05 Landline</subtitle> <arg></arg> <icon></icon> <subtitle mod="shift">2014-10-14 S04E05 Landline</subtitle> <subtitle mod="fn">2014-10-14 S04E05 Landline</subtitle> <subtitle mod="ctrl">2014-10-14 S04E05 Landline</subtitle> <subtitle mod="alt">2014-10-14 S04E05 Landline</subtitle> <subtitle mod="cmd">2014-10-14 S04E05 Landline</subtitle> </item> <item uid="" valid="YES" autocomplete=""> <title>Add New Girl to my favorites</title> <subtitle></subtitle> <arg>f11420</arg> <icon>love.png</icon> <subtitle mod="shift"></subtitle> <subtitle mod="fn"></subtitle> <subtitle mod="ctrl"></subtitle> <subtitle mod="alt"></subtitle> <subtitle mod="cmd"></subtitle> </item> <item uid="" valid="YES" autocomplete=""> <title>New Girl is an American television sitcom that premiered on Fox on September 20, 2011. It stars Zooey Deschanel, Jake Johnson, Max Greenfield, Lamorne Morris, and Hannah Simone. New Girl has received some favorable responses from critics since its conception, many giving particular praise for Deschanel's performance. The show has been nominated for several awards, including four Golden Globe Award nominations and five Primetime Emmy Award nominations. On March 4, 2013, the series was renewed for a third season, which premiered on September 17, 2013.</title> <subtitle>★★★★☆ (2011) Comedy — Returning Series</subtitle> <arg>l1420</arg> <icon>what.png</icon> <subtitle mod="shift">★★★★☆ (2011) Comedy — Returning Series</subtitle> <subtitle mod="fn">★★★★☆ (2011) Comedy — Returning Series</subtitle> <subtitle mod="ctrl">★★★★☆ (2011) Comedy — Returning Series</subtitle> <subtitle mod="alt">★★★★☆ (2011) Comedy — Returning Series</subtitle> <subtitle mod="cmd">★★★★☆ (2011) Comedy — Returning Series</subtitle> <text type="largetype">New Girl is an American television sitcom that premiered on Fox on September 20, 2011. It stars Zooey Deschanel, Jake Johnson, Max Greenfield, Lamorne Morris, and Hannah Simone. New Girl has received some favorable responses from critics since its conception, many giving particular praise for Deschanel's performance. The show has been nominated for several awards, including four Golden Globe Award nominations and five Primetime Emmy Award nominations. On March 4, 2013, the series was renewed for a third season, which premiered on September 17, 2013.</text> </item> <item uid="" valid="YES" autocomplete=""> <title>latest episode: S04E04 Micro</title> <subtitle>Add this episode to Watch Later</subtitle> <arg>m1420 0 New Girl, S04E04: Micro</arg> <icon></icon> <subtitle mod="shift">Add this episode to Watch Later</subtitle> <subtitle mod="fn">Add this episode to Watch Later</subtitle> <subtitle mod="ctrl">Add this episode to Watch Later</subtitle> <subtitle mod="alt">Go to The Movie DataBase's page for this episode</subtitle> <subtitle mod="cmd">Add this episode to Watch Later</subtitle> </item> </items> Am I doing something wrong? It this voluntary from Andrew? Is this a bug? Of course the simple fix is to only assign the <subtitle mod> for the keys that are actually assigned to something. But I don't really understand why that should matter. Instead of not displaying anything at all, let's just ignore the extra ones, no? PS: debugging this I thought that one of us should do an Alfred XML online validator, so new developers can quickly figure out what they have wrong. Easily replicated this and it does look like that it's the subtitle mod tags.. I'll make sure that this catches Andrews attention. Thanks Link to comment Share on other sites More sharing options...
Florian Posted October 9, 2014 Author Share Posted October 9, 2014 Cool thanks. So I'm the first one ever to do this? Wow ! :-) Link to comment Share on other sites More sharing options...
Andrew Posted October 9, 2014 Share Posted October 9, 2014 Cool thanks. So I'm the first one ever to do this? Wow ! :-) Nicely spotted, this is actually a bug in Alfred's XML parsing which is throwing an exception, hence the script not returning and Alfred continually showing "Please Wait...". I'm going to move this into the bugs forum and get it fixed for the next release Cheers, Andrew Link to comment Share on other sites More sharing options...
Andrew Posted October 17, 2014 Share Posted October 17, 2014 This fix is now in Alfred 2.5.1 pre-release, available in Alfred's Update preferences Link to comment Share on other sites More sharing options...
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