Jump to content
edc1591

Add songs to iTunes Up Next

Recommended Posts

Hi all,

 

I've been getting lots of requests to update this workflow to make it compatible with Ruby >=2.0 which is what's been shipping with the past couple releases of macOS. Well, I took some time this week to finally do it and also added a few new features.

 

Results will now show their album art, and the pairing process has been improved. You can also now search by artist name and album title. I've also renamed the workflow to iTunes DJ (reminiscent of the original queuing feature in iTunes).

 

See the README on Github for more info and download links.

 

-------------------------------------------

ORIGINAL POST

-------------------------------------------

 

Hey Guys!

 

Up Next is one of my favorite features of iTunes 11, but adding songs to it can be pretty tedious. That's what this workflow tries to fix.

 

You can search for songs right in Alfred and quickly queue them to be played in iTunes!

 

screenshot1.png

 

The source is available on Github. Feel free to fork it and submit pull requests.

 

Here's a download of the workflow that you can import directly into Alfred.

 

This workflow works similarly to the iOS Remote app. Because of this, it needs to be paired with iTunes before you can use it. To do that just follow these instructions:

 

  1. iTunes must be open to complete the pairing process.
  2. Invoke Alfred and type pair followed by a 4-digit numeric pin number and hit enter.
  3. Switch to iTunes and click the devices button in the top right.
  4. Then click on Alfred in the devices list and enter your 4-digit pin.

 

Now you're all set to start queuing songs! Just type "next" followed by the name of a song and Alfred will search as you type. Then just hit enter on the song you'd like to queue.

 

Enjoy!

 

Known Issues:

  • Searching can be slow for large libraries
  • Can only search using song titles, not artists or albums
Edited by edc1591

Share this post


Link to post

 

Hey Guys!

 

Up Next is one of my favorite features of iTunes 11, but adding songs to it can be pretty tedious. That's what this workflow tries to fix.

 

 

 

I think i could use some help pairing. I type in a numeric 4 digit number and just get a google suggestion.

Share this post


Link to post

Hi!

 

This sounds really great! However, as soon as I start to type the pin, Alfred shows the fallback search (so it's impossible to pair Alfred to iTunes).

 

In addition, do you think it would be possible aldo to support "Add to queue" and generate Genius playlist that way?

Share this post


Link to post

@TingTingBen, if you give it a moment, Alfred should realize that "pair" should trigger an action for this workflow; mine initially showed me the fallback search, then switched to the pair process.

Share this post


Link to post

@TingTingBen, if you give it a moment, Alfred should realize that "pair" should trigger an action for this workflow; mine initially showed me the fallback search, then switched to the pair process.

 

I'm afraid it's not just a time problem. By pasting the pin code in Alfred, I managed to get Alfred display "pair 1234", and the so-called "Please wait" subtext appears as it should  ("Pairing..."). But after few seconds, the fallback searches show again.

 

Has anyone else managed to pair Alfred to iTunes?

Share this post


Link to post

TingTingBen, Do you see the following screenshot during the pairing process?

 

screenshot2.png?raw=true

If you do see something similar to this, hit enter then switch to iTunes to finish pairing.

Share this post


Link to post

TingTingBen, Do you see the following screenshot during the pairing process?

 

No, Alfred turns to fallback search instead (as soon as I type the first digit).

Share this post


Link to post
edc1591, this workflow is unbelievably awesome!!! Great job, thank you so much :)

 

I do see one little issue though: I can't add tracks with an apostrophe in the title.

I noticed this while I was trying to add Led Zeppelin's "That's the way" - the track just would not get added, no matter what. I tried a couple of other tracks and all worked fine (all without apostrophe). So I tested this with a dozen or so songs and sure as hell, the ones with an apostrophe don't get added.

 

Also the notification appears with the text "queued" only (for tracks with an apostrophe), the track title is missing:

 

Bildschirmfoto%202013-05-10%20um%2021.00

 

Does anybody else see this?

Share this post


Link to post

No, Alfred turns to fallback search instead (as soon as I type the first digit).

 

Try this,

  1. Open Alfred's preferences and go to the Workflows pane
  2. Right click on the Up Next workflow and then click "Show in Finder"
  3. Open Terminal in /Applications/Utilities
  4. In Terminal, type "cd " (note the space at the end) and then drag the little blue folder icon from the top on the finder window into the terminal window and hit enter
  5. Now in Terminal, type "ruby pair.rb " followed by a 4-digit number pin and hit enter
  6. Paste the results here

 

 

I do see one little issue though: I can't add tracks with an apostrophe in the title.

 

 

I'll look into this right away!

Edited by edc1591

Share this post


Link to post

Turns out Alfred does not support escaping single quotes. So, until they fix that, you can't search for songs with a single quote in the title.

Share this post


Link to post

Thanks for looking into it! It's a shame though... maybe this should be posted in the "feature suggestions" forum (if it hasn't been already).

 

Anyway, apart from the single-quotes-thing the workflow performs perfectly, thanks again!

Share this post


Link to post

4. In Terminal, type "cd " (note the space at the end) and then drag the little blue folder icon from the top on the finder window into the terminal window and hit enter

 

I assume you referred to the main folder of the workflow. Unfortunately, I got no result to paste (only the basic command invite).

Share this post


Link to post

It took me a couple tries to get it to pair, but eventually Alfred did show up in the devices list.

 

It works - but artist and album matching would make it a lot more useful....

Share this post


Link to post

I assume you referred to the main folder of the workflow. Unfortunately, I got no result to paste (only the basic command invite).

 

Yeah, from the workflow directory. Is iTunes open when you're doing this?

Share this post


Link to post

Try this,

  1. Open Alfred's preferences and go to the Workflows pane
  2. Right click on the Up Next workflow and then click "Show in Finder"
  3. Open Terminal in /Applications/Utilities
  4. In Terminal, type "cd " (note the space at the end) and then drag the little blue folder icon from the top on the finder window into the terminal window and hit enter
  5. Now in Terminal, type "ruby pair.rb " followed by a 4-digit number pin and hit enter
  6. Paste the results here

 

 

I'll look into this right away!

 

Hey there!

 

This is utterly brilliant, and I'm excited to start using it! Unfortunately, I'm having some trouble: I can't get iTunes to react, even using the Terminal command, which just runs without any output. I tried disabling Norton's firewall and LittleSnitch, but I never even got notice from them that a service was starting on your port. If it helps, ruby -v turns up ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]; I recently updated it with MacPorts, which I worry might be the source of the problem.

Share this post


Link to post

For the people that are having trouble pairing, I have two questions:

 

  1. Is iTunes running when you try to pair? (it should be)
  2. Do you have sharing enabled in iTunes?

Share this post


Link to post

 

For the people that are having trouble pairing, I have two questions:

 

  1. Is iTunes running when you try to pair? (it should be)
  2. Do you have sharing enabled in iTunes?

 

Oh, how foolish of me! Sharing was disabled. It looks to be working beautifully now—thanks a billion!

Share this post


Link to post

 

For the people that are having trouble pairing, I have two questions:

 

  1. Is iTunes running when you try to pair? (it should be)
  2. Do you have sharing enabled in iTunes?

 

 

Yep, iTunes is open and sharing is enabled.

Share this post


Link to post

I really like that workflow, exactly what I was looking for! But searching for a song takes quite long and it's a bummer that it only looks through the song titles. So I was wondering: There is this workflow to search for a song in Alfred and play it right away. Search results are limited to 20, which allows for instant feedback. I'm not an expert, otherwise I would have tried it myself - but isn't it possible to merge that feature in the "Up next" workflow to improve searching? ;)

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...