iTunes Play Next
-
- Rank 1
- Posts: 28
- Joined: Sun Aug 16, 2009 10:39 am
iTunes Play Next
Would it be possible to add an option to add a song to "Up Next" in iTunes instead of replacing the current song? It would be great to be able to queue up several songs from LaunchBar.
-
- Rank 1
- Posts: 28
- Joined: Sun Aug 16, 2009 10:39 am
Re: iTunes Play Next
That's all true, but you can also manually add a song to play next, after which, it will continue with the previous queue. That's what I would like to do.
-
- Rank 1
- Posts: 28
- Joined: Sun Aug 16, 2009 10:39 am
Re: iTunes Play Next
davidsmith36 wrote:To begin with Up Next, upgrade to iTunes 11 and after that view your music library. When you float your mouse over any craftsman, collection, or tune you'll see a little bolt symbol show up. Click on the bolt to uncover a rundown of moves you can make. Selecting Play Next will play that thing (collection, craftsman, or tune) next.
I thought it would be implied by the fact that I posted this in the LaunchBar forum, but I would like to add a song to the up next queue from LaunchBar. I am completely aware of how to do this from within iTunes.
Re: iTunes Play Next
invictus26 wrote:I thought it would be implied by …
This is a copy ’n’ paste spammer, “he” isn’t responding to help anyone, just appear vaguely helpful by copying content from elsewhere, and then include a spammy link at the end. It’s been noted before: “It's a spam bot, not a real user.”
Flag as spam, I’d suggest using this reason “The reported message has the only purpose to advertise for a website or another product.”
Re: iTunes Play Next
The problem is that all 3rd party access to iTunes has to be made through AppleScript, and then only the actions that developer has made available can be used. Unfortunately for us, there’s no actions to interact with the Up Next queue.*
There’s this slightly mad approach that one developer has created for Alfred, Workflow for iTunes Up Next, it works by making the application appear as a paired device (meant for pairing iOS devices). Maybe it could be converted to work with LaunchBar?
Ideally Apple would add the ability to access and modify the Up Next queue to iTunes scripting library. If you’ve got the time, it might be worth telling Apple through their iTunes Feedback.
*You can see all of the available actions for any application by using Apple’s Script Editor, inside the application, go to the Window → Library – LaunchBar can be scripted this was too.
There’s this slightly mad approach that one developer has created for Alfred, Workflow for iTunes Up Next, it works by making the application appear as a paired device (meant for pairing iOS devices). Maybe it could be converted to work with LaunchBar?
Ideally Apple would add the ability to access and modify the Up Next queue to iTunes scripting library. If you’ve got the time, it might be worth telling Apple through their iTunes Feedback.
*You can see all of the available actions for any application by using Apple’s Script Editor, inside the application, go to the Window → Library – LaunchBar can be scripted this was too.
-
- Rank 1
- Posts: 28
- Joined: Sun Aug 16, 2009 10:39 am
Re: iTunes Play Next
Ok, I did some playing around with AppleScript. I'm not sure what LaunchBar does to play a song, but it clears out the up next queue. If I do this instead:
It will play the correct track (which LaunchBar isn't doing at the moment) but preserves the existing up next queue. Could you switch to this technique instead?
Code: Select all
tell application "iTunes" to play (the first track whose name is "Bohemian Rhapsody")
It will play the correct track (which LaunchBar isn't doing at the moment) but preserves the existing up next queue. Could you switch to this technique instead?
Re: iTunes Play Next
I think you’ll need to create your own playlist, there’s then the problem of trying remove played tracks. There’s another way to manipulate iTunes, but it’s very brittle, Stack Overflow – Use iTunes' Up Next function…
LaunchBar uses bundled scripts to control iTunes, for example:
/Applications/LaunchBar.app/Contents/Resources/Actions/iTunes - Play Pause.lbaction/Contents/Scripts/default.scpt
(They use Apple’s UTI reverse DNS to identify applications.)
Incidentally, Objective Development could possibly simplify that, remove the if conditional.
Without Apple providing the necessary AppleScript actions, we’re really limited as to what we can do. I’m fairly sure there’s no easy answer, but you might find some inspiration over at Doug’s AppleScripts for iTunes.
Failing that, maybe a different media player would do what you’re looking for? Of course, thanks to iTunes’ dominance, there’s not much in the way of competition…
LaunchBar uses bundled scripts to control iTunes, for example:
/Applications/LaunchBar.app/Contents/Resources/Actions/iTunes - Play Pause.lbaction/Contents/Scripts/default.scpt
Code: Select all
-- Copyright (c) 2006-2016 Objective Development
-- http://www.obdev.at/
-- Version 5
tell application id "com.apple.iTunes"
if player state is playing then
pause
else
play
end if
end tell
Incidentally, Objective Development could possibly simplify that, remove the if conditional.
Code: Select all
playpause v : toggle the playing/paused state of the current track
playpause
Code: Select all
tell application id "com.apple.iTunes"
playpause
end tell
Without Apple providing the necessary AppleScript actions, we’re really limited as to what we can do. I’m fairly sure there’s no easy answer, but you might find some inspiration over at Doug’s AppleScripts for iTunes.
Failing that, maybe a different media player would do what you’re looking for? Of course, thanks to iTunes’ dominance, there’s not much in the way of competition…
-
- Rank 1
- Posts: 28
- Joined: Sun Aug 16, 2009 10:39 am
Re: iTunes Play Next
Sorry, I probably wasn't very clear. When I select a song in LaunchBar and hit enter, the current up next playlist is cleared and the selected song plays.
I've discovered that this action could be replaced with the applescript and the up next playlist remains intact.
As far as I can tell, the behavior of hitting enter when a song is selected is not controlled by one of the actions in the LaunchBar package contents, so I'm not able to override it.
So, I'm asking if the default functionality could be changed to the applescript above.
I've discovered that this action could be replaced with the applescript
Code: Select all
tell application "iTunes" to play (the first track whose name is "Bohemian Rhapsody")
As far as I can tell, the behavior of hitting enter when a song is selected is not controlled by one of the actions in the LaunchBar package contents, so I'm not able to override it.
So, I'm asking if the default functionality could be changed to the applescript above.