Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Add additional numeric field to songs that can be searched

I was wondering if it were possible to add an additional field within iTunes that can be used for smart playlist searches and the like. I have found that there are a limited number of numeric fields available to add data into. Thanks in advance for the answers!

Posted on Apr 1, 2015 5:42 AM

Reply
25 replies

Apr 1, 2015 8:17 AM in response to turingtest2

Well it is something you responded too in one of my other threads. I am looking to add chart data in to music files. I will add some of this data in via the comments tag and the solution you provided the other day. However, I was trying to find a numeric field where I could add the data in so that when I do queries and searches, I don't have to search via text. I could use basic formulas such as greater than, or less than.


I am using the BPM and Year fields already, so they are non starters. Are season and episide numbers available for music files?

Apr 1, 2015 12:42 PM in response to Coop197823

Episode number isn't available to smart playlists which makes season number the only one that might help. It cannot be manipulated with get info for music items, but it can be adjusted via script. Season number is already supported during the import phase of my ExportImport script. The values are only exported at the moment if the Show field is completed.


tt2

Apr 1, 2015 3:14 PM in response to Coop197823

Ah, I just commented out the If ... End If statements at either end of this block.


If .Show & ""<>"" Then

WriteLine "<Show>" & .Show

WriteLine "<SortShow>" & SortValue(.Show,.SortShow)

WriteLine "<Season>" & .SeasonNumber

WriteLine "<Episode>" & .EpisodeNumber

WriteLine "<EpisodeID>" & .EpisodeID

End If


But replace it with this


' If .Show & ""<>"" Then

' WriteLine "<Show>" & .Show

' WriteLine "<SortShow>" & SortValue(.Show,.SortShow)

WriteLine "<Season>" & .SeasonNumber

' WriteLine "<Episode>" & .EpisodeNumber

' WriteLine "<EpisodeID>" & .EpisodeID

' End If


then you'll only get season exported.


tt2

Apr 1, 2015 5:32 PM in response to Coop197823

It depends a bit on what you're trying to do. If you look back at your other thread Batch Add Comments Tag Solution? you could simply extend that scheme so I don't think you really need to do an export again.


Instead of:


Once that is done you could create a new sheet that construct rows of data of the form:


<ID>32F346B7-BF018101

<Comment>A Comment

<ID>B19F4321-CC716CE2

<Comment>A Comment


You have

<ID>32F346B7-BF018101

<Comment>A Comment

<Season>1

<ID>B19F4321-CC716CE2

<Comment>A Comment

<Season>250


tt2

Apr 1, 2015 5:34 PM in response to Coop197823

Looks like the output of that script is a delimited text file ("iTunes Metadata.txt"), which you can open in Excel but invokes the data import wizard; however, you should be able to change the filename in the script to be "iTunes Metadata.csv" - this will then open directly in Excel. I use a modified version of another of tt2's scripts that I normally import into Access, but the .csv it produces opens fine in Excel, looking like this:

User uploaded file

Its a somewhat simpler script but the principle is the same as the ExportImport.vbs one you're looking at.

Add additional numeric field to songs that can be searched

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.