caleb531 / play-song

An Alfred workflow for quickly and easily playing music in the Apple Music app
MIT License
109 stars 9 forks source link

Combine all actions into one #27

Closed tyilo closed 9 years ago

tyilo commented 9 years ago

I think we should combine all actions into one script, where the argument to the script would be prefixed with song-, album-, genre- etc., which would then be used to play the correct type of content.

This would allow filters which returns different kinds of items, eg. both songs and albums. This could maybe be used to create an unified play filter script.

This would also simplify updating the action using the python script.

Another thing, would it be possible to make the user choose multiple level of options like a menu? For example I might want to play an album by BandX, but I don't remember the album name, so I would type playalbumby Band, where both BandX and BandY would appear as options. I would then choose BandX and be presented with a list of all of BandX's albums. When I have chosen one of these it play-song would play that album.

caleb531 commented 9 years ago

@Tyilo,

Thanks for your proposal. Your idea is well-intentioned, however there are a few issues:

I realize that I am being somewhat critical, however I am certainly open to hearing your comments on my concerns. :)

Caleb

tyilo commented 9 years ago
  1. I don't understand how this would break tab autocompletion.
  2. I don't think this would be a problem as at this point you have already selected one item (song, album, etc.)
  3. Well you could show somewhere what type the item is.
  4. I actually posted this because I actually needed a playalbumby filter today. I don't think that there should be many of these so I don't see the problem. Do you know if it is actually possible to this with Alfred workflows? If so, how would do it?

I realize that I am being somewhat critical, however I am certainly open to hearing your comments on my concerns. :)

No problem :)

caleb531 commented 9 years ago
  1. Alfred is not programmed to tab complete arguments of keywords, because it doesn't know what those arguments for me. For example, if I type "pl", Alfred will complete it to "play ", however I would not be able to complete "plays" as I currently can. See the screenshot below for the current behavior—you'll notice that the tap completion only works because Alfred is aware of the other keywords and will list them as suggestions. However, it cannot do the same for arguments to any of those keywords.
  2. I'm not quite sure I understand what you mean by that. However, now that I think of it, performance might not be impacted much.
  3. I suppose we could show the result type, but we'd need to be creative about how we do so in an elegant fashion, because Alfred only offers us so much real-estate for displaying text.
  4. I can actually relate to a degree. Only a few weeks ago, I was desiring a playsongsinalbum keyword, which would list all of the songs for the given album.

If you're still convinced that this feature would be for the better, be my guest. ;) Caleb

screen shot 2015-03-03 at 4 45 01 pm

tyilo commented 9 years ago
  1. I only want to combine the actions not the filters, so there would still be all the keywords that exists now.
  2. I actually don't think this is possible in Alfred, as you would need to have a filter script going to another filter script, right? Or am I missing something?

I might take a look at unifying the filter scripts later in the week.

caleb531 commented 9 years ago

I like the idea of combining the action scripts—that seems more feasible. And no, it's not possible to point a filter script to another. But that wouldn't work anyway. New logic would need to be written to only match songs from a particular artist (or whatever additional filtering you'd like to achieve.