Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DavidEsp

macrumors newbie
Original poster
Dec 18, 2021
5
1
United Kingdom
Some directories seem to "know" they contain media files, others don't. I am not using iTunes/Music (app) btw.

For some directories, in Finder, List-view, when I click on the headings, I can add extra columns such as Album and Genre - let's call those "media columns".

However when I created a new (test) directory and placed some mp3 files inside it, then right-clicked that directory's headings, no options to add media columns were given. These mp3 files did contain ID3v2 metadata btw (I don't know if that's relevant).

What is it that distinguishes / determines these two types of "add column" behaviour?
 

Brian33

macrumors 65816
Apr 30, 2008
1,427
354
USA (Virginia)
I know what you're talking about, and would love to know the answer. I believe the Movies directory had movie-specific columns that could be added, too.

IIRC, if you make your own directory within Music, or Movies, then it would also have the ability to add the unique columns. Like maybe your new dir would inherit the ability. I could be off, but I know somehow I did make a new directory with the ability to add the extra movie-related columns. (Will try to remember to check on my iMac when I get a chance.)
 
  • Like
Reactions: DavidEsp

DavidEsp

macrumors newbie
Original poster
Dec 18, 2021
5
1
United Kingdom
Yes if I create a directory under ~/Music then it inherits the ability to add the music-related columns. If I them move that directory under ~/Documents then that ability is lost. Likewise if I move it from ~/Music to an external HFS+ drive.

OTOH some directories I used with music tagger Musicbrainz Picard behave the same as those under Music. I will try asking on their forum what it might have done to make this happen.
 

DavidEsp

macrumors newbie
Original poster
Dec 18, 2021
5
1
United Kingdom
I asked but was told that app (Picard) does nothing special to make that come about - it's down to the OS's "black magic". One suggestion was maybe it has something to do with the [.DS_Store] hidden-files. I am not clear where to go with that possibility though.
Rename the folder to Music and by some Apple magic those options will show up :)
https://eclecticlight.co/2021/07/09/finders-metadata-puzzles/
Yes! If I change the folder name to "Music" then indeed the magic happened.
I tried changing it back and that magic evaporated

Following some further quick tests, it seems...
The only requirement is that the folder name begins with "Music", and it is case-sensitive

Hence it worked also for one of my folders: "MusicBrainz Picard Tests"
And indeed (just now) for "Musiczhnuvk nguyivabjk"

But not "music" or "MUsic" etc.
I also tried "Musique" but that did not work - at least while my system is in English-language mode.

Incidentally, in contrast to advice in that (informative) article you linked, the "Music behaviour" did not persist when I changed the name of the folder.

Thank you!!!
 
  • Like
Reactions: Brian33

bogdanw

macrumors 603
Mar 10, 2009
5,715
2,750
it's down to the OS's "black magic". One suggestion was maybe it has something to do with the [.DS_Store] hidden-files.
It’s really a mystery, the change happens even for an empty folder renamed Music without the creation of a .DS_Store file and without any apparent change of metadata.
mdls.jpg
Commands used for test

Code:
mkdir ~/desktop/MyFolder
mdls ~/desktop/MyFolder
mv ~/desktop/MyFolder ~/desktop/Music
mdls ~/desktop/Music
ls -a ~/desktop/Music

Some documentation https://developer.apple.com/documentation/coreservices/file_metadata/mditem
 
  • Like
Reactions: DavidEsp

BrianBaughn

macrumors G3
Feb 13, 2011
9,674
2,425
Baltimore, Maryland
It's hocus pocus for any folder starting with "Music" ("Movies" does the same thing but different tags) but can this attribute be assigned to any folder? Would anyone know what this attribute actually is and can it be seen somehow…like viewing permissions in Terminal?
 
  • Love
Reactions: DavidEsp

chown33

Moderator
Staff member
Aug 9, 2009
10,766
8,466
A sea of green
It's hocus pocus for any folder starting with "Music" ("Movies" does the same thing but different tags) but can this attribute be assigned to any folder? Would anyone know what this attribute actually is and can it be seen somehow…like viewing permissions in Terminal?
Directories can have xattrs. You can see them using the '@' option to 'ls':
Code:
ls -ld@ ~/Music

These xattrs, if any, are distinct from any .DS_Store file present in the folder.
 
  • Like
Reactions: DavidEsp

bogdanw

macrumors 603
Mar 10, 2009
5,715
2,750
The metadata can be viewed with mdls and changed with xattr.
Examples
mdls ~/desktop/Music
xattr -w com.apple.metadata:kMDItemAlternateNames "Music" ~/desktop/Music
 
  • Like
Reactions: DavidEsp

DavidEsp

macrumors newbie
Original poster
Dec 18, 2021
5
1
United Kingdom
It's hocus pocus for any folder starting with "Music" ("Movies" does the same thing but different tags) but can this attribute be assigned to any folder? Would anyone know what this attribute actually is and can it be seen somehow…like viewing permissions in Terminal?
Did some experiments and... Bingo! As you say, name only needs to start with "Music"
Yes, e.g. works with "Music" or "Music Test"
And it's case-sensitive, so e.g. neither "music" nor "MUsic" work.

Thanks Brian!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.