caleb531 Posted March 17, 2013 Posted March 17, 2013 (edited) Introduction With the introduction of Alfred v2.0, the built-in iTunes mini player is now the only way to interact with my iTunes library in Alfred. However, I would prefer to quickly search for and play songs without entering the mini player first. Therefore, I created Play Song—a workflow designed to make playing songs in iTunes extremely quick and convenient. Download Download Play Song (latest) Usage Play Song enables five keywords which allow you to search for and play songs in your iTunes library. In order for Play Song to function properly, it requires access to assistive devices. You can enable this for Alfred via the Security & Privacy pane of System Preferences. Playing a song To play an individual song, use the playsong keyword. Songs whose names match your query will populate the list of results. Choosing a song from the list will play that song once. Playing an album To play all songs from a particular album, use the playalbum keyword. Albums whose names match your query will populate the list of results. Choosing an album from the list will play all songs from that album (ordered by track number). Playing an artist To play all songs by a particular artist, use the playartist keyword. Artists whose names match your query will populate the list of results. Choosing a artist from the list will play all songs by that artist (grouped by album). Playing a genre To play all songs within a particular genre, use the playgenre keyword. Genres whose names match your query will populate the list of results. Choosing a genre from the list will play all songs within that genre (grouped by artist). Playing a playlist To play all songs within a particular playlist, use the playplaylist keyword. Non-empty playlists whose names match your query will populate the list of results. Choosing a playlist from the list will play all songs within that playlist (according to playlist order). Support If you have a bug to report or a feature to request, please submit an issue on GitHub. Release Notes Release notes for the workflow are also available on GitHub. Edited May 24, 2020 by caleb531 Correcting broken link kisy, mixterdee, gsputnik and 10 others 13
blkrk4000 Posted March 19, 2013 Posted March 19, 2013 this is great! thanks would it be possible to include podcasts?
caleb531 Posted March 19, 2013 Author Posted March 19, 2013 this is great! thanks would it be possible to include podcasts? Sure! I've updated the script with an option (called podcastsIncluded) that will enable the showing of podcasts in the results. -Caleb blkrk4000 1
twinpeaks Posted March 19, 2013 Posted March 19, 2013 Very useful workflow, powerful and saves a heck of a lot of time finding songs in finder or itunes. Plus the features I haven't even played with yet. Nice one thanks for sharing!
morphorod Posted March 19, 2013 Posted March 19, 2013 Definitely one of the best workflows to come out so far. Great job man. Thank you so much. I had no idea I wanted it till I tried it.
greghoch Posted March 21, 2013 Posted March 21, 2013 This is great! Would it also be possible to search for and play artists and albums? I would love that!
caleb531 Posted March 21, 2013 Author Posted March 21, 2013 This is great! Would it also be possible to search for and play artists and albums? I would love that! Not sure about that. I think with AppleScript, I can only search and play songs, not artists or albums. Either way, I would prefer to have only songs show in the results for the sake of simplicity. -Caleb
Buja Posted March 21, 2013 Posted March 21, 2013 When I search for a song, the results are found (and filtered) also by album or artist. Is it possible to separate it? play song "x" - would look for songs named "x" only play artist "y" - would look for artists named "y" only play album "z" - would look for albums named "z" only BTW, the best like you said is to have only songs, but I believe also only to search by the song name. It's a great workflow and very useful. Congrats!
caleb531 Posted March 21, 2013 Author Posted March 21, 2013 (edited) When I search for a song, the results are found (and filtered) also by album or artist. Is it possible to separate it? play song "x" - would look for songs named "x" only play artist "y" - would look for artists named "y" only play album "z" - would look for albums named "z" only BTW, the best like you said is to have only songs, but I believe also only to search by the song name. It's a great workflow and very useful. Congrats! No, it's really not possible, AFAIK, AppleScript only lets you play a track, not an artist (nor an album, for that matter). -Caleb Edited September 16, 2013 by caleb531
Buja Posted March 22, 2013 Posted March 22, 2013 Maybe I didn't explain myself very good... What I meant is not to play an artist or album. What is mean is that your search, is filtering also by artist and album name (and not only by song name). So for example when I search for Foo Fighters, it shows me all songs from Foo Fighters (even though they have no "Foo Fighters" in their song name). What I think would be nice is to search *only* the song name for whatever string you put. So if for example, there is no song named Foo Fighters, the previous example would return blank (instead of all songs from the band Foo Fighters). Thanks YtseJam 1
YtseJam Posted March 22, 2013 Posted March 22, 2013 Maybe I didn't explain myself very good... What I meant is not to play an artist or album. What is mean is that your search, is filtering also by artist and album name (and not only by song name). So for example when I search for Foo Fighters, it shows me all songs from Foo Fighters (even though they have no "Foo Fighters" in their song name). What I think would be nice is to search *only* the song name for whatever string you put. So if for example, there is no song named Foo Fighters, the previous example would return blank (instead of all songs from the band Foo Fighters). Thanks I second that. In addition to "play" perhaps there can be "band" and/or "song" keywords, that they will show a list of songs by the artist or the song you're searching for, and the next step would be as with "play", to play it.
poritsky Posted March 22, 2013 Posted March 22, 2013 Anyone know if it's possible to add songs to "Play Next" or "Up Next" in iTunes. I've been screwing around with it and the only seems to be through GUI scripting (blech). Would love to queue up the next song rather than play immediately. Awesome workflow though! I like it a bit more than the mini-player (no offense Alfred!).
caleb531 Posted March 22, 2013 Author Posted March 22, 2013 Maybe I didn't explain myself very good... What I meant is not to play an artist or album. What is mean is that your search, is filtering also by artist and album name (and not only by song name). So for example when I search for Foo Fighters, it shows me all songs from Foo Fighters (even though they have no "Foo Fighters" in their song name). What I think would be nice is to search *only* the song name for whatever string you put. So if for example, there is no song named Foo Fighters, the previous example would return blank (instead of all songs from the band Foo Fighters). Thanks Hmm, I'm not sure I like the sound of that. I would prefer to get some results as opposed to no results, as long as the results maintain their relevance (in which case, they usually will). Besides, I would imagine that iTunes orders songs with titles matching the query above songs with artists matching the query (if that makes sense). The goal of the workflow is to make the action of playing an iTunes song as quickly and easily as possible. Therefore, I believe the app should include whichever results are relevant to the search query. Now, I realize that I could make this an option rather than the default behavior, but I would much prefer to preserve the simplicity of the workflow. Given all of the acclaim it has received in the above posts, I believe that it has accomplished its aforementioned goal, and therefore doesn't need any significant additions. I second that. In addition to "play" perhaps there can be "band" and/or "song" keywords, that they will show a list of songs by the artist or the song you're searching for, and the next step would be as with "play", to play it. Again, for the reasons listed above, I don't plan of adding such a feature. Even more so, I wouldn't add such a feature because it would require creating multiple "Filter" scripts, with much of the same codebase and a few minor changes. That solution is not very DRY, if you ask me. -Caleb
mixterdee Posted April 13, 2013 Posted April 13, 2013 Thanks for this Caleb. The addition of podcasts is great. Is there any way that audiobooks could also be activated as well?.
caleb531 Posted April 15, 2013 Author Posted April 15, 2013 (edited) Thanks for this Caleb. The addition of podcasts is great. Is there any way that audiobooks could also be activated as well?. Sure, I will consider adding audiobook support. I will post here if I do. -Caleb Edited April 15, 2013 by caleb531 mixterdee 1
dyarbrough Posted April 17, 2013 Posted April 17, 2013 This addon is awesome! One question though. If you search for an album name is there any way to have results sorted by track number instead of alphabetically?
caleb531 Posted April 17, 2013 Author Posted April 17, 2013 (edited) This addon is awesome! One question though. If you search for an album name is there any way to have results sorted by track number instead of alphabetically? I'm not sure about that. The script internally uses iTunes's search function in AppleScript to find songs matching the given query. Therefore, because iTunes determines the order of its own search results, I cannot sort songs by track number without sacrificing script performance (which is important to me). -Caleb Edited April 17, 2013 by caleb531
dyarbrough Posted April 17, 2013 Posted April 17, 2013 I'm not sure about that. The script internally uses iTunes's search function in AppleScript to find songs matching the given query. Therefore, because iTunes determines the order of its own search results, I cannot sort songs by track number without sacrificing script performance (which is important to me). -Caleb That makes sense. Ok well it was worth at least asking. Again it works flawlessly. Thank you!
judgejohn82 Posted April 17, 2013 Posted April 17, 2013 (edited) Great workflow, but it doesn't seem to find all songs / artists / albums. For example, if I search for the album "One For The Road" by Ocean Colour Scene, which is correctly tagged in my library as shown:- Then the workflow cannot find it, either by artist or album, and reverts back to the fallback searches:- Edited April 17, 2013 by judgejohn82
caleb531 Posted April 19, 2013 Author Posted April 19, 2013 Great workflow, but it doesn't seem to find all songs / artists / albums. For example, if I search for the album "One For The Road" by Ocean Colour Scene, which is correctly tagged in my library as shown:- Then the workflow cannot find it, either by artist or album, and reverts back to the fallback searches:- Okay, I pushed a new version of the plugin with a potential fix. Let me know if it works for you. -Caleb
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