MENU

AppleScripts – Edit your iTunes Play Count

You might ask, why would I ever need to edit the play count of a song? That’s a valid question and this function is probably reserved for the more anal iTunes user but let me give you an example. Sometimes I begin listening to an artist through a ‘Best of’ Album. After a while I realise that I LOVE them and I decide to graduate to their studio albums. Now it annoys me to no end that the songs that I have been listening to on repeat on the Best of albums have no plays on the actual studio albums.

Yes, I’m that pathetic.

If you’re my kinda guy/gal here’s how you add a little script to iTunes to edit the play count of a song. I found the script on the Apple Forums so I thought I would share it here.

Scroll to the bottom if you’re…

** on a Windows machine.

** looking to change the play count of multiple tracks to one value I customised the script.

** using Catalina.

(And… If you want more of this stuff. Head over to Doug – he’s the king of iTunes applescripts. He probably has a script you didn’t know you wanted. He’s active on twitter if you’re the type…)

1. Download the following file:

 

It should look like this:

AppleScripts-Chikaboo_Designs-2

2. Now save it in the follow directory:

Users > [User] > Library > iTunes > Scripts (create this folder if it doesn’t already exist)

**The name of the file is what will appear in your iTunes services Menu, I named mine ‘Change Play Count’ as you can see from the file name.

AppleScripts-Chikaboo_Designs-3

(Untitled is the name of my hard drive and chikaboo is the name of my user)

**If you can’t find your Library folder, when you’re in finder select ‘Go’ in the menu bar and hold down the alt/option key at the same time, it will appear in the list of folders.

3. Ta dah, you will now see the option in the scripts menu of iTunes! Just select a song and type in the number

AppleScripts-Chikaboo_Designs-4

AppleScripts-Chikaboo_Designs-5

** WINDOWS UPDATE 21/05/2018

If you’re on a Windows machine, someone contacted me with an application they made: https://github.com/CDEngineer/iTunesDataEditor/releases. Some instructions from the creator:

In a nutshell, you create a playlist with the songs you want to edit, fire this tool, select that playlist and then you have a grid with all the songs, double click the play count and change it, when you press ENTER it is saved to the iTunes library.

Thank you Mistico!

 

** MULTIPLE TRACKS UPDATE 06/11/2018

Someone requested the the script make it possible for you to select multiple tracks and change their play count value at one go. I have adapted the below script for that purpose. The process for installing it is the same as above.

 

** CATALINA UPDATE 09/10/2019

Someone has alerted me to the fact that iTunes has been removed in the latest macOS Catalina. I don’t know how I am going to cope with that – I am likely going to wait till my current 2015 Mac has COMPLETELY died before succumbing to this tragedy. Anyway for now I have done some research and I believe the script should still work with a few changes.

1. Download the same script (button below)

2. Open it with the ‘Script Editor’ App and in the first line where it says ‘tell application iTunes’ change iTunes to Music (unfortunately I couldn’t do this for you because I haven’t updated to Catalina yet)

3. Now save/move this file to:

Users > [User] > Library > Music > Scripts (create this folder if it doesn’t already exist)

122 Comments

Join the discussion and tell us your opinion.

Benreply
16th February 2017 at 3:57 pm

Hi Natasha, I tried to add this script but it’s giving me “A command name can’t go after this identifier.” With “played count” in the fourth last line highlighted. Any Help would be appreciated. Thanks!

Natasha Natarajanreply
16th February 2017 at 4:05 pm
– In reply to: Ben

Hey there!

I have changed the tutorial slightly and included a downloadable file of the script. Here it is: https://www.chikaboo-designs.com/wp-content/uploads/2016/01/Change-Play-Count.zip

Let me know if that works!

Benreply
16th February 2017 at 4:10 pm
– In reply to: Natasha Natarajan

That worked perfectly! Thanks for the quick response and all the help. Really appreciate it!

Natasha Natarajanreply
16th February 2017 at 4:11 pm
– In reply to: Ben

No worries at all. I’m so happy that someone actually wants to change their play count and is reading this article – this is the best thing that’s happened to me all day. Hah. Have a good one!

Ben
16th February 2017 at 4:31 pm
– In reply to: Natasha Natarajan

I’ve been replacing older albums with remastered albums or deluxe editions so it was silly to start from “0” on all the albums I’ve been replacing. This is a great alternative to queuing the song 200x and skipping to the end 200x 🙂 I’m glad I found this post.

iereply
11th March 2017 at 4:55 am

This script was a godsend – thanks so much!

Natashareply
11th March 2017 at 3:05 pm
– In reply to: ie

I’m glad I could help!.. but mostly I’m glad I am not the only one needing to change my play count!!

Mikereply
27th May 2017 at 7:29 pm

Im confused on how to save it in itunes?

Natashareply
28th May 2017 at 8:16 pm
– In reply to: Mike

Hi Mike,
You should save it in this directory:
Users > [Username] > Library > iTunes > Scripts (create the Scripts folder if it doesn’t already exist)
Does that help?

Anthonyreply
27th September 2020 at 7:13 am
– In reply to: Natasha

How do I create the folder to save it to iTunes?

Natashareply
27th September 2020 at 11:06 am
– In reply to: Anthony

Hi Anthony. You need to create the folder in this directory: Users > [names of your user] > Library > Music > Scripts (create this Script folder if it doesn’t already exist). If you can’t see your Library folder when you’re in Finder. Select ‘Go’ in the menu bar and hold down the option key. Library should then appear in the list of folders to go to. Does this help?

Terry
6th January 2021 at 4:43 pm
– In reply to: Natasha

Hello Natasha, I can’t get this scripts to work with Big Sur, I wonder if this has been updated since Catalina. I get the following error; “error “AppleScript Utility got an error: Can’t get selection.” number -1728 from selection”

Natasha
7th January 2021 at 3:59 am
– In reply to: Terry

Hi Terry! I haven’t yet updated it to Big Sur actually. I found this though: https://stackoverflow.com/questions/45313753/new-to-scripting-error-finder-got-an-error-can-t-get-folder. Might it help?

Pedroreply
3rd July 2017 at 11:07 am

As a person the likes to own and organise my music in the era of Spotify & co I´m so glad to finally find a script like yours.
Thank you very much

Natashareply
3rd July 2017 at 12:47 pm
– In reply to: Pedro

Pedro!! You made my day! If you ever want to give me some iTunes tips get in touch!

Jasonreply
19th August 2017 at 6:29 am

Thanks, Natasha! This works just as intended on macOS 10.12.6 running iTunes 12.6.2.20. Cheers!

Aranreply
1st October 2017 at 2:04 am

Worked for me too! Exactly what I needed to do. I had someone send me a song or two of an album and liking it a hell of a lot, I decided to buy the official album off iTunes. I deleted my downloaded ones and re-downloaded right off iTunes and had to set up my play count again. I’m definitely one of those “anal” iTunes people haha

Édioreply
6th October 2017 at 3:21 pm

I’m so happy to know I’m not the only one who worries about play counts! Always work on it when I have a song in “XXXX 0 single” album and then the actual album is released.
I found this script on the Apple forum as well, but I couldn’t manage to make it work. With your tutorial, there was no way to miss it. Thank you for this! You made my day 🙂

Mattreply
19th January 2018 at 9:07 am

Thank you so much Natasha! iTunes Match managed to screw up one of my favourite albums, and the only way to fix the problem was to reimport the CD – which I expected would mean losing my play count data for these tracks, which would flow on to ruin several smart playlists I have which rely on play count data. Your script saved me 🙂 Once again, thank you so much!

Dave Dayreply
6th February 2018 at 2:53 pm

Hi, Thank you for this. Unfortunately after modifying the play count, as soon as iTunes syncs to the cloud it will change it back to it’s original count. I wonder if it’s because I have an Apple Music subscription?

Natashareply
6th February 2018 at 3:00 pm
– In reply to: Dave Day

Hi Dave,
That’s really strange. I haven’t experienced any problems like that so I imagine it is because of your Apple Music Subscription. That seems weird thought because you would think your library play count would just be added to the cloud. I will do some googling and see if I come up with anything. I briefly read that it might take some time. Maybe a couple of hours?

Dave Dayreply
6th February 2018 at 3:33 pm
– In reply to: Natasha

Hi Natasha, as soon as iTunes syncs it reverts to the previous count. It’s as if Apple has a ‘the cloud is the truth’ policy. 🙂

Natashareply
6th February 2018 at 3:45 pm
– In reply to: Dave Day

Dave, I hate to say it but I think the cloud is slowly trying to ruin and take over our lives… ?

CMreply
22nd December 2018 at 4:22 am
– In reply to: Dave Day

Did you get this to work? I’m having the exact same issue 🙁

Natashareply
22nd December 2018 at 11:54 am
– In reply to: CM

I’m so sorry to hear that. I’m gonna look into it and see if I can find any solutions. I don’t have iCloud though so I might struggle… but I’ll do my best.

Kevinreply
3rd March 2018 at 4:15 pm

I know this has been a while.. This seems like an amazing tool! By any chance, do you have a Windows version of this, or know of something similar? I am in a similar boat as you and some of the other posters, in terms of needing to adjust playcounts when Remasters are taken into account. If I have heard every song in the Van Halen album ‘1984’ over 300 times each, it makes no sense for me to start over at 0 if I am updating!

Natashareply
3rd March 2018 at 4:56 pm
– In reply to: Kevin

Hi Kevin! I love when people take interest in this blog post, makes me feel less alone in my anal iTunes library sorting. I think the way you’re going to have to do this is by editing your iTunes library xml file (some information on it here: https://support.apple.com/en-gb/HT201610). Open it with notepad or another simple text editor, I don’t remember what the default one is on Windows anymore. Then find the songs and manually change the play count. That’s the only way I could think of. Let me know if it works.

Misticoreply
9th May 2018 at 6:19 am
– In reply to: Natasha

Hello Natasha, I modified the play count in the XML file, but as soon as I started iTunes my changes were overwritten. I seems the XML file is regenerated each time iTunes starts and any updating is uni-directional. Any other ideas? Thanks!

Natashareply
9th May 2018 at 10:30 am
– In reply to: Mistico

Hey! Are you using a mac? Have you tried saving my apple script? I haven’t changed the play count using the XML file but I can look into it if the script doesn’t work.

Mistico
9th May 2018 at 2:24 pm
– In reply to: Natasha

Hello, no, I am using Windows 7. Is there a version of the script for Windows? Thanks.

Natasha
9th May 2018 at 2:33 pm
– In reply to: Mistico

I found this: http://samsoft.org.uk/iTunes/scripts.asp. Was developed a while ago so I wonder if it still works but I would be interested if you managed to get it up and running.

Misticoreply
20th May 2018 at 12:09 am

Hello again Natasha, I built a tool to edit the iTunes play-count on Windows (https://github.com/CDEngineer/iTunesDataEditor/releases) Thanks for all your help!

Natashareply
21st May 2018 at 12:16 pm
– In reply to: Mistico

That’s so cool!! Wow. Thank you. How does it work exactly? I am going to put a link to it in the article. Do you want any credits (name/website/anything else..)?

Misticoreply
21st May 2018 at 5:37 pm
– In reply to: Natasha

You’re welcome! You should link to https://github.com/CDEngineer/iTunesDataEditor the instructions are there (the /releases page contains only the binaries). In a nutshell, you create a playlist with the songs you want to edit, fire this tool, select that playlist and then you have a grid with all the songs, double click the play count and change it, when you press ENTER it is saved to the iTunes library. Hopefully some one will find this helpful. Thanks again!

Natashareply
22nd May 2018 at 9:12 am
– In reply to: Mistico

Brilliant. You’re in the post now!

ForestBalrog
17th October 2019 at 11:27 pm
– In reply to: Natasha

Mistico & Natasha, thank you so much for sharing this info. I used the iTunesDataEditor and it’s a life saver, such a big help for managing my music playcounts. Thank you!

Natasha
18th October 2019 at 8:33 am
– In reply to: ForestBalrog

Our pleasure 🙂

Scott Foubisterreply
18th July 2018 at 4:18 pm

Natasha, this is amazing! This is exactly what I have needed for a long time to combine play counts for duplicate copies of songs (from different albums/downloads), so I can deduplicate my iTunes library without losing my precious play count data. As you walk around today, no one in person will know that you are an AppleScript angel. But commenters on this page do, and we appreciate you!

Natashareply
19th July 2018 at 5:03 pm
– In reply to: Scott Foubister

You made my day!! It’s really the little things in life hey..?

Andrewreply
14th August 2018 at 10:27 pm

Thank you so much for this! But there is a problem for me… I saved the script in the folder and there is also an icon of the script in the top bar of iTunes’ window. But when I push the “OK” button in the script plays are not changing at all. I’m getting the feeling i’m still doing something wrong… Can you please help me with this? Would really appreciate it
Thank you in advance!

Natashareply
15th August 2018 at 5:53 pm
– In reply to: Andrew

Hey Andrew. Thanks for getting in touch! I am emailing you directly a zipped file of the script I have installed on my computer. I just double checked that my script still works, and it does. I am running iTunes 12.8.0.150 on my Mac. Let me know what happens.

Josuke Higashikatareply
10th September 2018 at 1:32 am

Thank you SO SO SO much for this! I’m one of those “anal about iTunes” people and recently my most played song of all time got corrupted somehow. The past month or so I’ve just gone without listening to it rather than replace it because I didn’t want the play count to drop down to zero. I’ve also been meaning to upgrade a lot of my music to 320kbps versions so this will come in handy there as well.

What connects Claude Debussy, Ella Fitzgerald & Melba Doretta Liston? – Chikaboo Designsreply
3rd October 2018 at 1:31 pm

[…] iTunes library; turns out there are other music crazies on the internet who’ve gone mad for AppleScripts – Edit your iTunes Play Count. I love the internet, it makes me feel less […]

Kristareply
15th February 2019 at 7:41 pm

Omg this is going to save my sanity! Thank you so much for sharing!!!

Natashareply
15th February 2019 at 8:27 pm
– In reply to: Krista

so happy to help!

Dominicreply
16th February 2019 at 12:34 am

Great, thanks very much for making this available. I had an old version of a similar script from another developer that hasn’t worked with the more recent versions of iTunes so I really appreciate your efforts!

Natashareply
16th February 2019 at 11:40 am
– In reply to: Dominic

my pleasure

Mikereply
21st February 2019 at 8:43 pm

Thank you for this script! I have been looking for an easier way to update play counts and this script is the answer! Works great!

Kenreply
23rd February 2019 at 1:29 pm

I normally don’t leave behind comments but it needs to be said that the ease of the tutorial, not to mention to find a fellow iTunes Nerd, are very much appreciated. Thank you!

Natashareply
23rd February 2019 at 1:31 pm
– In reply to: Ken

That’s so kind!!

Kenreply
6th March 2019 at 1:08 am
– In reply to: Natasha

Unfortunately, my play counts have returned to their previous number. 🙁

Natashareply
6th March 2019 at 10:22 pm
– In reply to: Ken

Oh no! Someone did comment that before actually. I think it had something to do with Apple Music. Could it be to do with that for you? Does it return to the previous number immediately?

Ken
7th March 2019 at 2:07 pm
– In reply to: Natasha

Oh… I do have Apple Music. It doesn’t change it immediately, sometimes it sticks but it does change on another device I am using and then it will eventually change at one point or another. 🙁

Natasha
8th March 2019 at 8:30 pm
– In reply to: Ken

I’m afraid I haven’t yet figure out the solution this problem. I’m sorry about that. There seems to be some way in which Apple Music syncs music that conflicts with manually changing the play count!

Kym Taylorreply
1st April 2019 at 2:38 am

Thanks so much for this tip! I was a bit leery at first – but I went ahead and created a Scripts folder where you said. Then I quit iTunes, restarted it, and Presto! there was my little script menu! Now when songs are remastered, and I replace the old version with the new one, last.fm doesn’t think I’ve never listened to it before! Yes … that matters to a geek like me. Thanks again – wonderful feature!

Natashareply
1st April 2019 at 3:05 pm
– In reply to: Kym Taylor

My pleasure 🙂 omg love that you’re concerned about last.fm too!!!

Deanreply
5th April 2019 at 8:34 am

Thanks so much for this! I couldn’t find anything like it on Dougscripts and came up empty, fortunately found it here here, still can’t find it there. I got “This Is The Last Song” there, (love it, wish there were an iOS app for it) and yes, there’s just so much goodness on that site. Best!

Natashareply
14th April 2019 at 4:39 pm
– In reply to: Dean

Strange! I actually wrote to him once to tell him to link to my site and he said he already had a script on his own. Anyway glad you found what you were looking for.

Pranay Wadhavareply
5th July 2019 at 12:19 pm

I does work, it changes the play count but it won’t stay forever. it goes back to the original one after sometime, idont know how. maybe after I reopen iTunes or maybe after it refreshes itself, but the edited play count won’t stay forever. Please help regarding this and Thankyou.

Natashareply
5th July 2019 at 1:31 pm
– In reply to: Pranay Wadhava

That’s so strange. Are you using Apple Music? If you are, that can sometimes cause problems! Some other people have had a similar problems. I am not sure what the solution is to be honest!

Dean Donofrioreply
31st August 2019 at 1:33 am

Natasha, you are a GODSEND! I have been wanting to change the play counts for YEARS, as they are crucial to my listening experience, ha ha. I recently had to re-download over 1000 songs, which all have a 0 play count, so it messes up my playlist system. Thank you!!!!

Natashareply
1st September 2019 at 4:09 pm
– In reply to: Dean Donofrio

haha I love music/iTunes geeks like you 🙂 So so so so so happy to help.

Hardy Treply
8th October 2019 at 7:51 pm

Hey Natasha, 🙂 Love what you’ve done and love the script, been using it for a long time now. Just updated to MacOS Catalina and sorry if this has been asked already and/or if you’ve already answered this question, but now that iTunes is “gone” and Apple Music is the new official app for Music on the mac, what’s the word on getting this script working for Catalina? Apple Music is basically the same as iTunes with a little flare added to it, but I know nothing about programing or scripting, so was just seeing if there was an ETA on the script. Be happy to help in any way I can. 🙂 Thanks!

Natashareply
9th October 2019 at 12:26 pm
– In reply to: Hardy T

Hi there! So glad you’ve been enjoying the script. I did a little research and have added a little update to the end of the post. PLEASE have a go and let me know if it works. I don’t have access to Catalina to try it out myself.

Hardy Treply
9th October 2019 at 8:51 pm
– In reply to: Natasha

SUCCESS! Thank you so much! I missed a step and didn’t see to make a new “Music” folder, but after I caught that it loaded right up. Just tested it out too and it works just fine. Thanks again!

Natashareply
9th October 2019 at 9:11 pm
– In reply to: Hardy T

I’m so pleased to hear that!

MJreply
31st October 2019 at 5:44 pm

Thanks so much! I am running macos Catalina and my iphone has the latest ios. I don’t know where the bug is, but every time I sync my phone, songs that have previously been sync’ed, the play counts get incremented again.

Natashareply
31st October 2019 at 8:41 pm
– In reply to: MJ

Hi MJ. I’m not sure I understand. What do you mean by the play count gets incremented? You mean when you sync your phone the songs return to the play count they had before you used the script? In my experience, these bugs usually have something to do with Apple Music. Could that be the case for you?

MJreply
31st October 2019 at 11:33 pm

Oh no, problem isn’t your script. It’s a sync issue between my phone and mac. The script works great. Let’s see if I can describe the issue much clearer… Let’s say i played Song A on my phone. After sync’ing the play count of Song A would be X. If I played song B and I sync’ed again , song B’s play count would be X, but song A would have X+1 even though I didn’t play it. If I played song C and sync’ed, song C would have X play count, song B would have X+1 and song A X+2 without playing both song B and song A. I had to use your script to correct the play counts.

Natashareply
6th November 2019 at 6:12 pm
– In reply to: MJ

Gosh, that’s a complex problem! I have no idea how to help you on that front… I’m so sorry about that!

AVreply
6th November 2019 at 5:05 pm

Thank you for Catalina info, I have been using Add play count -script in iTunes for years and was bit confused when it wasn’t available in the new Music App. I too missed the creation of Music-folder, after that script loaded right away. I rarely leave comments on websites but for this I just had to make an exception, cool to know that I am not alone with this edit playcount obsession 😀

Natashareply
6th November 2019 at 6:13 pm
– In reply to: AV

I am so happy to help!! And I feel honoured to have received your comment seeing as you don’t give them out so easily.

rmwreply
19th November 2019 at 8:32 pm

If you change the phrase ‘played count’ to ‘skipped count’ you can use a new version of the script to change the skip count as well.
Just in case 🙂

Natashareply
19th November 2019 at 10:54 pm
– In reply to: rmw

oooh. Thanks for the addition! But may I ask, what is the skip count?

Eoghanreply
4th March 2020 at 8:24 am

Thanks, this is something I have wanted for years — works perfectly in Catalina too.

Natashareply
4th March 2020 at 8:27 am
– In reply to: Eoghan

So glad to hear it!

Emreply
24th April 2020 at 4:25 pm

Thank you for the script, I managed to change the number of plays on a song but for some reason the song no longer appears in my most listened playlist, even though it should be in the top 20!, do you know if it’s normal ?

Natashareply
30th April 2020 at 1:06 pm
– In reply to: Em

Hmm! That is a strange issue. That isn’t normal. Does it definitely have enough plays to be in the top 20? I am not sure what the problem would be… Maybe try putting up the play count to something really crazy big and see if it works then..

cintoreply
30th April 2020 at 1:00 pm

please ): it doesn’t work for me anymore ): the icon doesn’t show up

Natashareply
30th April 2020 at 1:04 pm
– In reply to: cinto

Hi Cinto, are you on OS Catalina? I have a some updated instructions to get the script to work with the new ‘Music’ app. It’s at the bottom of the post.

Liamreply
20th May 2020 at 10:38 am

I don’t think you have to save it in a specific location. I’m on OS Catalina, I just kept it in downloads. To change the play count, I just have to highlight the song I want to change and open the script using script editor. Then all I have to do is click the run button and the script will run perfectly. The only inconvenience is that I have to find it in downloads (which is fine for me) but other than that it works fine. Thanks for the script Natasha!

Natashareply
20th May 2020 at 12:24 pm
– In reply to: Liam

Ah! That’s really good to know. Thanks Liam. Glad it’s working for you.

Jamesreply
20th January 2023 at 1:45 am
– In reply to: Liam

This is what’s working for me too. I’m on Catalina, but the Library > Music folder isn’t there, so I put it in Library > iTunes. The script icon didn’t show up. I found this comment and tried this, and it worked. I can even select multiple songs at a time and run the script. It doesn’t batch process, I still have to enter one play count at a time, but it pops them up in sequence, so it’s faster than selecting a tab, cmd-tabbing to the Script Editor, running, changing, and tabbing back to select the next song.

Natasha, I want to thank you for creating useful instructions! There are so many apps and scripts available to do this, but without enough instruction for those of us who don’t use scripts regularly. I’ve been trying to fix my problem (Music just deleted play counts on some songs, even when it showed a “last played” date and time!) for _years_ and your solution and instruction is the only one that has worked.

Natashareply
21st January 2023 at 11:33 am
– In reply to: James

James! My pleasure. Thanks for feeding back. As always, I’m glad to know that there are still people who are holding on to their digital files like me. Maybe together we can convince someone to bring out an ipod classic type device?!

Justinreply
10th June 2020 at 7:56 pm

Does this script have the ability to add or subtract play counts to multiple songs?

For example, if I have a song that was played 5 times, a song that was played 12 times, and a song that was only played once, can I select all of them, add “+1” to the multiple song editor, and have all the songs play counts change to 6, 12, and 2, respectively?

If that is not already feature, would it be possible to add it as one?

Natashareply
11th June 2020 at 2:16 pm
– In reply to: Justin

Hi Justin! I’m afraid as of now the script doesn’t have that function. I’m sure it’s possible but it’s beyond my knowledge of Apple Scripts. I reckon with some how to guides on Apple Scripts you’d be able to edit the ‘Change Play Count (Multiple) Script’ to do what you want. Sorry I can’t help more!

Bricereply
23rd September 2020 at 7:31 pm

Thank you for this! I thought I was the only one who cared about this kind of thing ?
Didn’t see the scripts icon at the top of my screen but was able to make it work by 1) highlighting the song in Apple Music 2) opening the script, regardless of where it is saved and 3) pressing the “Run” button on the script. Took me a long time to figure out that step 3 was necessary. Anyway, thanks again for this.

Natashareply
24th September 2020 at 8:29 am
– In reply to: Brice

Hi Brice. I am so glad you made it work! And thank god for other people who care about this kind of thing 🙂

CSreply
30th September 2020 at 9:09 pm

it works but when i update icloud music library to see the numbers on my phone, its being deleted :'( i guess its because of apple music, i mean counts are important, they affect streams

Natashareply
30th September 2020 at 10:29 pm
– In reply to: CS

Hi Norman. You’re right, I think having apple music affects your play count. I’m afraid I don’t know how to work around that. I don’t have Apple Music myself…

ModelDreply
16th November 2020 at 4:07 pm

Hi, thanks for this! I have a slightly different thing I wanted to do, namely being able to set the play count for a whole bunch of songs at once, without being asked to confirm it for each one. Using your script as a starting point, I was able to get the following to work (in this version you just enter a play count, and it applies it to every song you’ve got selected in the Music app):

tell application “Music”
set sel to selection
set dialog_answers to display dialog “Enter a new play count for selected tracks” default answer “”
repeat with t in sel
set newcount to text returned of dialog_answers as integer
set played count of t to newcount
end repeat
end tell

Natashareply
16th November 2020 at 4:08 pm
– In reply to: ModelD

Amazing!! Thank you for that update.

Raul Moscardo Ferrandoreply
3rd August 2023 at 4:48 pm
– In reply to: ModelD

Thanks a lot

Joe Sieglerreply
26th February 2021 at 5:32 pm

Just an update in Feb 2021. This works with macOS Big Sur and the current Music app. Your 09/10/2019 update works with one exception. When I opened the script in the script editor, it didn’t say “‘tell application iTunes’ it said “‘tell application Script Editor’. I changed Script Editor to Music, and it worked as stated above otherwise.

Natashareply
1st March 2021 at 9:04 am
– In reply to: Joe Siegler

Thanks Joe! Strangely when I download the script it says tell application iTunes. I wonder what’s going on. Thanks for flagging though.

marshallreply
26th May 2023 at 2:04 pm
– In reply to: Joe Siegler

Thanks for this! same thing for me when first opening the script.

Kristenreply
15th March 2021 at 8:46 pm

Apple Music 1.1.3.3 compatibility? You are my kind of people… I’m SO hoping this will work 4 years post original post… I’m on Big Sur and Apple Music 1.1.3.3 and wondering if there’s a likelihood this will work if I follow the Catalina part of the instruction?! Thoughts? anyone else out there try recently?? Thanks so much fellow play-count geeks 😉

Natashareply
15th March 2021 at 9:31 pm
– In reply to: Kristen

Hi Kristen! Haha, we are your people! I have had feedback that it does work on Big Sur. Follow the instructions in the
CATALINA UPDATE 09/10/2019 and then let me know how you get on.

Kristen Bartlereply
18th March 2021 at 6:02 pm
– In reply to: Natasha

Natasha, I’m in awe! I had a stint in Healthcare IT working with SharePoint before I left my job to be home with my (little) kiddos. You’re making me miss some of the work I got to do there. I’m inspired to learn more about Apple scripts! This WORKED for me. I did have to poke around to figure out that the folder to save your file into was: /Users/[username]/Library/Scripts/Applications/Music – i also wasn’t showing the Scripts menu, so had to turn that on. I’m so pleased with this lovely little bit of scripting! Now I just need to find the time to update the playcounts for 100 or so music files… wish me luck!

Natashareply
18th March 2021 at 6:29 pm
– In reply to: Kristen Bartle

I am sooooo glad! GOOD LUCK!!

John Breply
8th April 2021 at 8:59 pm

That is awesome! Been wanting to do this for years!

Natashareply
9th April 2021 at 5:18 pm
– In reply to: John B

I’m so glad!

Carolreply
28th May 2021 at 5:00 pm

Hi! For some reason when I click on the button to download the file nothing happens. I have no clue why… I’m on macOS Catalina 10.15.17 please help I left a playlist on overnight and now the play count is bothering me so much

Jacintareply
7th August 2021 at 12:38 pm

Hi Carol! This was also happening to me, I was able to fix it by dragging the download link over to create a new tab instead of just clicking on it. Hope this helps TT

Also I found out I didn’t have a Music file, took me a while that just creating a new folder and calling it Music did the same thing TT thank you so much for this script !!

Mikereply
31st October 2021 at 7:49 pm

Natasha, this is so awesome! I didn’t think anyone else cared about the play count the way I do. This has saved me so much time from doing it manually and showed me that Applescript is still very useful. I may look into what else I could do with it. Thank you so much!

Natashareply
1st November 2021 at 10:13 am
– In reply to: Mike

No Problem Mike! Always glad to meet other Play Count fanatics. Let me know if you figure out any other uses for the script. I am yet to delve into the world of Apple Scripts thought they look like they could open a whole universe for me.

RJreply
17th March 2022 at 5:24 am

Hey Natasha, thanks for the script! I came across a bit of an unsual problem—I had no ~/Library/iTunes/ folder! and so I was racking my brain about where to create the /Scripts/ folder. I keep my library on an external drive so that’s probaby why that folder is missing. Solution was just simply creating the ~/Library/iTunes/ folder lol …took me a few minutes! In any case, thanks again, I’ve recently noticed iTunes doesn’t always register play counts—like a few days ago it only registered play counts for half the songs in an album even though I listened to it all… you can imagine the frustration! x)

Natashareply
17th March 2022 at 1:04 pm
– In reply to: RJ

I feel your frustration RJ. Glad you managed to figure it out.

Aynahreply
10th June 2022 at 11:55 pm

Hi! I added script to Library > Music > Scripts. The tiny logo showed up but when I click on it it says “Can’t get selection of application AppleScript Utility”. What do I do? I switched from Windows to macOS two days ago so I struggle with every little thing.

Aynahreply
11th June 2022 at 12:11 am
– In reply to: Aynah

See, I should’ve waited a bit before asking. I fixed it, it works. Thank you a lot!

Natashareply
17th June 2022 at 1:11 pm
– In reply to: Aynah

So glad!

Harrisreply
28th August 2022 at 9:37 pm

Thank you! I’m still using Mojave (still not sure about the whole iTunes -> Music transition), and this is exactly what I needed. I pre-ordered an album that came with instant grat tracks, and when I put the entire new album in my library I needed to update the play counts of the tracks that I’ve been playing. Occasionally a friend and I will compare our listens for, say, 1990 songs and compare what tracks are currently in our top 10. Thanks again!

Natashareply
30th August 2022 at 10:50 am
– In reply to: Harris

Thanks for sharing! So glad it worked for you.

mickeyreply
12th May 2023 at 3:55 am

Love this! However I have Apple Music and home sharing set up- is anyone else noticing that the play count reverts back to what it used to be once the sync occurs? I have the new version (Ventura 13.3.1) – has anyone found a solution for this?

Antonioreply
19th May 2023 at 1:07 pm

I’ve just used this code to correct a couple of outliers (over 1,800 plays each). It worked swiftly. Thank you so much for sharing, and kudos!

Antonioreply
19th May 2023 at 1:14 pm
– In reply to: Antonio

It may be worth mentioning that I use Ventura 13.0 and Music 1.3.0.138. The only modification I had to make to the script was on the first line (tell application “Music”).

Paulreply
4th October 2023 at 10:02 pm

Your 7 year old post is still saving lives! Thank you!

lizreply
6th April 2024 at 10:32 pm

does anyone know if is it still working in the Apple Music App? I can’t install back iTunes 🙁

Natashareply
14th April 2024 at 11:01 pm
– In reply to: liz

I think it is Liz. I’ve used it.

Andre Teixeirareply
30th May 2024 at 2:50 pm

This is amazing, thank you!!!!!

vicreply
7th June 2024 at 10:43 am

it works but reverts back in a few minutes. anyone has the solution?

Natashareply
7th June 2024 at 4:18 pm
– In reply to: vic

Oooh. I haven’t come across that before. Sorry I’m not sure about the fix.

Leave a reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.