You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

📰 Newsroom Update

Billie Eilish is Apple Music’s Artist of the Year for 2024. Learn more >

Strange Behavior with Music Files

I recently purchased an M4 Mac mini and have been setting it up over the last few days. I'm running OS 15.1.1 and have two external HD's attached through a CalDigit Thunderbolt 4 Pro Doc. One HD is a Time Machine Backup, the other is a G-Drive USB-C drive which contains my music files and photos. I was having some problems telling Music where to find the music files on the external HD. The folder Named "Music" on the HD originally had the following folders in it: Automatically Add to Music, Media (which I renamed from Music), and Previous Libraries. There is also a file named "Music Library.musiclibrary". I changed the location in Music settings to /G-DRIVE USB-C/Music and I thought it worked. I could see all my albums, artists, etc in Music. I then run into two problems when I tried to play songs:

1. Not every track would play. I'd select a track and hit play and nothing happened. I'd select a second track in the same album and it would play fine. Then I could go back and play the original track. If I tried to play another track, I would get the same problem. 2. I noticed after playing a number of tracks, that now there was a newly created "Music" folder and that the tracks I played were moved into this folder from the Media folder, keeping the same file structure. Why is this happening? Is there a way I can fix it? Can I move the tracks I played back into the Media folder? Here are some screenshots for illustration purposes.


Thanks for reading and any advice

Ed


Posted on Nov 22, 2024 11:33 AM

Reply
5 replies

Nov 22, 2024 1:33 PM in response to ELFritzen

See Managing your Mac media libraries - Apple Community for some background on the standard shape of a Music library, which should also explain why a folder called Music may appear in your designated media folder. The standard layout is a folder called Music containing the Music Library.musiclibrary database, and a media folder called Media which contains all of the music connected to the library. There may also be an additional Music subfolder before you get to artist subfolders, which is a legacy of iTunes Media Organization in previous versions of iTunes. See the article for steps to remove this additional layer by editing a .plist file.


You would ideally set your media folder to /G-DRIVE USB-C/Music/Media rather than /G-DRIVE USB-C/Music. Hopefully this will resolve the issue where some tracks don't play at the first attempt. You should then consolidate the library (File > Library > Organize Library > Consolidate Files) after which the files that remain in /G-DRIVE USB-C/Music/Music should be duplicates that you can discard. You should really backup everything to another drive before you start making changes, just in case of a misstep.


tt2

Nov 22, 2024 5:38 PM in response to ELFritzen

From the section on iTunes Media Organization:


To remove this additional (Music) folder (inside the meda folder) if required first use shift+cmd+. to show/hide hidden files, then open the hidden file .Media Preferences.plist inside the media folder with TextEdit and change the integer value from 1 to 0. Save the change, restart Music and turn the Keep Music Media folder organized preference off and on again to enforce the new layout.


This should move everything currently in ../Media/Music/ up into ../Media/.


tt2

Nov 22, 2024 7:19 PM in response to turingtest2

Thank you again tt2.

I don't quite understand. Found the .Media Preferences.plist file located in the Media Folder, and changed the integer value from 1 to 0. I saved the file, and restarted Music. I then turned the Keep Music Media folder organized off and back on again. Nothing seemed to happen. Do I now consolidate libraries? I tried that and the Music Folder in the Media Folder remained. All I've seem do have done is to split up my library into three different folders now:

G-Drive USB-C/Music (seems to contain music moved from the original Media folder that I played)

G-Drive USB-C/Media (has some music, but I don't where these files came from

G-Drive USB-C/Media/Music (has most of my music)


In the Music app, I can see all the music in my library, but it's not playing correctly. I don't think I lost any music files, I just have too many folders containing media and I think the Music app is confused. I know I'm confused. Thanks again for your help. I need to do some more research to see if I can get all the music back into a single folder.


Ed


Strange Behavior with Music Files

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