Jump to content

Add Current Song to an iTunes Playlist (or Build Playlists) 2.0


Recommended Posts

Overview

Add current iTunes song to a selected playlist or select or create a playlist and add songs to it.

Usage

Type the keyword addto and select a playlist to add the current iTunes song to it.

atp.png

Or type the keyword addto, highlight a playlist, press Command key then Return key to add any song from your library to the selected playlist:

atp_2.png

atp_3.png

The last selected playlist will always be used if you e.g. use the hotkey to add the current song to it without any interaction.

Download

  • Release date: 26 Feb 2014
  • OSX 1.9.2
  • iTunes 11.1.4
  • Alfred 2.1.1
  • Download Now
What's New
  • Rewritten to take advantage of all Alfred 2.1 AppleScript improvements
  • Support to iCloud songs (thanks to Katie)
  • Add songs to a playlist by using Command key (thanks to Katie)
  • Hotkey to add the current song to the last playlist
  • Hotkey to show the workflow
  • Create a new playlist if it is not found
  • Start and play iTunes if necessary
I would like to thanks Katie for all her help and great suggestions: THANK YOU!! :) Edited by Carlos-Sz
Link to comment

Thanks. This is great. I've been wanting to make something like this for a little while now.

 

Great. I’m about to make new playlists so I did this little workflow.

 

In addition, here is a new version:

 

- current playlist is not added to Alfred window

- the song will be added only if it does not exist in the selected playlist

 

Download: http://dl.getdropbox.com/u/127623/Add%20to%20Playlist.alfredworkflow

Link to comment
  • 4 weeks later...

Hi Carlos,

 

Thank you for this workflow. I use the TJN's extension on alfed v1 it one of the things that i cant live without in my workflow. Any plans to add growl support?

 

Alfred supports Growl so it’s just a matter of a small workflow change:

 

 

1. Open Alfred Preferences
2. Go to Workflows
3. Select Add to Playlist
4. Double click Post Notification (it’s the red dot at right)
5. Now click Output to and select Growl
6. Click Save and it should work
 
Let me know if you need any help. 
Link to comment
  • 1 month later...
  • 3 months later...

I updated add.scpt to work with any track in iTunes (in my library anyway — including iTunes Match tracks located in iCloud).

on run argv
	set sArgv to argv as text
	tell application "iTunes"
		set myList to sArgv
		set current_track to the current track
		set sTrack to name of current_track
		set sArtist to artist of current_track
		--check if in playlist
		set sListTracks to name of tracks of playlist myList as list
		if sListTracks contains sTrack then
			return "\"" & sTrack & "\"" & " is already in " & "\"" & myList & "\""
		else
			set currentList to playlist myList
			duplicate current_track to currentList
			return "\"" & sTrack & "\"" & " added to " & "\"" & myList & "\""
		end if
	end tell
end run
Link to comment

 

I updated add.scpt to work with any track in iTunes (in my library anyway — including iTunes Match tracks located in iCloud).

on run argv
	set sArgv to argv as text
	tell application "iTunes"
		set myList to sArgv
		set current_track to the current track
		set sTrack to name of current_track
		set sArtist to artist of current_track
		--check if in playlist
		set sListTracks to name of tracks of playlist myList as list
		if sListTracks contains sTrack then
			return "\"" & sTrack & "\"" & " is already in " & "\"" & myList & "\""
		else
			set currentList to playlist myList
			duplicate current_track to currentList
			return "\"" & sTrack & "\"" & " added to " & "\"" & myList & "\""
		end if
	end tell
end run

 

Thank you for the code. I’ll check the workflow later this week.

Link to comment
  • 6 months later...

Version 2.0 is Out!

  • Release date: 26 Feb 2014
  • OSX 1.9.2
  • iTunes 11.1.4
  • Alfred 2.1.1
  • Download Now

What's New

  • Rewritten to take advantage of all Alfred 2.1 AppleScript improvements
  • Support to iCloud songs (thanks to Katie)
  • Add songs to a playlist by using Command key (thanks to Katie)
  • Hotkey to add the current song to the last playlist
  • Hotkey to show the workflow
  • Create a new playlist if it is not found
  • Start and play iTunes if necessary

I would like to thanks Katie for all her help and great suggestions: THANK YOU!!  :)

Link to comment
  • 3 months later...
  • 2 months later...

Hi,

 

I was using the older version of this workflow and had it working in Yosemite, but I accidentally overwrote it with the newer version which doesn't seem to work due to a change to the behavior of System Events. Any chance there is a copy of the older pre 2.0 workflow around somewhere that I could use?

 

Thanks!

Link to comment

Hi,

 

I was using the older version of this workflow and had it working in Yosemite, but I accidentally overwrote it with the newer version which doesn't seem to work due to a change to the behavior of System Events. Any chance there is a copy of the older pre 2.0 workflow around somewhere that I could use?

 

Thanks!

 

I’ll update it ASAP.

 

Anyway, you can download version 1.0 here.

Link to comment
  • 1 year later...

Hi, I really like this Workflow. Even if it is quite old, it still works with the current OS X (10.11.5), iTunes (12.4) and Alfred (2.8.4) for songs in my iTunes library.

 

But it does not add songs to the playlist if the song is a Apple Music streamed song.

I don't know how to correct this.

Can any body help please?

 

Thanks, Mike 

Link to comment
  • 2 weeks later...

Hi, I really like this Workflow. Even if it is quite old, it still works with the current OS X (10.11.5), iTunes (12.4) and Alfred (2.8.4) for songs in my iTunes library.

 

But it does not add songs to the playlist if the song is a Apple Music streamed song.

I don't know how to correct this.

Can any body help please?

 

Thanks, Mike 

 

 

Unfortunately I don’t use Apple Music.

 

I hope someone else can help us here.

Link to comment

Hi Mike,

 

I'm not the developer but understand the workflow of this program, I've used it for years.

 

Think of apple music like pandora, A streaming music service. With that in mind your not playing music you own, just a stream a music that pandora or in this case apple has selected for you with your help.

 

With that being said, streaming programs cant be added to a playlist as its not actual songs, just a connection to their server playing music for you.

 

Great Question,

 

Chris G

Link to comment

I don't think this is like pandora, its more like spotify or tidal in which you can stream individual songs. You can definitely add apple music streamed songs to playlists through the UI, but I don't know what can done through scripting.

 

The alfred mini player for iTunes also doesn't do well with apple music songs currently, so I'm guessing some api/applescript entry points for that may not be available. 

 

That being said, if you add a song from apple music to your library even if you don't download it this plugin appears to work, unfortunately that doesn't allow you to listed to a curated playlist or radio station and pick out songs as they come up to add to a playlist...

Link to comment
  • 3 months later...

I did a clean install (but I synced my Alfred settings) and it broke this workflow :( I got this error in debugging mode:

[2016-10-07 09:13:03][ERROR: input.scriptfilter] Code 1: 0:90: execution error: mkdir: /Users/katie/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data: No such file or directory (1)

I tried to change the scripts to point to Alfred-3, but that was not enough to fix the error. So I tried to re-install but the download link is missing :unsure:

 

I'm going to dig through my backups to try and get it back, but I thought I would post because people are missing out on this awesome workflow!

Link to comment
  • 5 months later...
On 03/10/2016 at 9:00 PM, petebocken said:

Is this one dead?

 

Won't work for me with OS X 10.11.5, iTunes 12.4.3.1, Alfred 3.1.1, Add to Playlist 2.0.

 

States "Loading playlists..." and then won't load them or let you search to find one.

 

Doesn't work for me also on 10.12.4 with iTunes 12.6.0.100 ... No playlists are showing up, it just goes to normal search

 

Please if you could fix this would be great, or make it open source so someone else could

 

Cheers. :)

 

Link to comment
On 4/1/2017 at 10:27 AM, humancopy said:

 

Doesn't work for me also on 10.12.4 with iTunes 12.6.0.100 ... No playlists are showing up, it just goes to normal search

 

Please if you could fix this would be great, or make it open source so someone else could

 

Cheers. :)

 

I second this! Would really love to be able to add songs to specific playlists.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...