Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Dealing with hidden or ghost files
#1
Trying to get the Library and album metadata detailed and had a lot of things that wouldn't update as I made changes to the tags. I've used the dot_clear and .mpdignore, which got rid of many old sticky tags and one "unknown" album. Just a couple of things remaining that I'd appreciate some help with.

I have two albums that are ghosts in that they cannot be seen. They were duplicates with wrong tags and title, existing together with the correct album intended to replace them. I've now deleted the correct albums and the incorrect albums persist in the Library, and can even be played, but they cannot be seen on the drive, and apparently are not subject to either dot_clear or .mpdignore (which worked on some).

For ease of understanding, the first instance is an Astrude Gilberto album, "A Certain Smile A Certain Sadness" that featured Walter Wanderley and I guess he was initially tagged as "album artist." This album is shown and sorts under "W" regardless of whether the corrected version is on the drive. Secondly, a Norah Jones album, "Feels Like Home," persists after deleting the album on the drive. I was trying to change the genre and it kept showing up under both genres. After deleting correct one, the old one is still there. In both cases these albums still play. 

I am not all that fluent using command line but as best I can tell neither is being found with the find command. Can anyone give me any insight into how to get rid of these?  ~Thanks!
Reply
#2
(07-24-2021, 03:38 PM)lascala_2a3 Wrote: Trying to get the Library and album metadata detailed and had a lot of things that wouldn't update as I made changes to the tags. I've used the dot_clear and .mpdignore, which got rid of many old sticky tags and one "unknown" album. Just a couple of things remaining that I'd appreciate some help with.

I have two albums that are ghosts in that they cannot be seen. They were duplicates with wrong tags and title, existing together with the correct album intended to replace them. I've now deleted the correct albums and the incorrect albums persist in the Library, and can even be played, but they cannot be seen on the drive, and apparently are not subject to either dot_clear or .mpdignore (which worked on some).

For ease of understanding, the first instance is an Astrude Gilberto album, "A Certain Smile A Certain Sadness" that featured Walter Wanderley and I guess he was initially tagged as "album artist." This album is shown and sorts under "W" regardless of whether the corrected version is on the drive. Secondly, a Norah Jones album, "Feels Like Home," persists after deleting the album on the drive. I was trying to change the genre and it kept showing up under both genres. After deleting correct one, the old one is still there. In both cases these albums still play. 

I am not all that fluent using command line but as best I can tell neither is being found with the find command. Can anyone give me any insight into how to get rid of these?  ~Thanks!
Maybe you have .cue or .m3u files lying around? And don't forget to clear folders like .Trash-1000 if they exist in your music folders.
Reply
#3
Thanks Sehnsucht- no such items found, however, I am unsure if my find instruction is searching the root only or the entire drive. I'm trying to navigate but it's not working right for some reason- 'cd Norah Jones' returns no such directory when I know it's right there in the top level. I'm trying to do this over the network, not sure if that is making it not work.
Reply
#4
I plugged the USB into the Mac and I can access it, but I don't seem to be able to move through directory levels using terminal commands. This is a SanDisk Extreme SSD 500MB if it matters. Instead of the expected permissions I see "You have custom permissions." It is formatted as ExFAT with partition type Master Boot Record. Since I'm this deep already, I could reformat the drive for optimal compatibility. Is this the best format and partitioning for the RPI4/Moode 7 and Mac OS, or would something else work better?
Reply
#5
(07-24-2021, 06:03 PM)lascala_2a3 Wrote: Thanks Sehnsucht- no such items found, however, I am unsure if my find instruction is searching the root only or the entire drive. I'm trying to navigate but it's not working right for some reason-  'cd Norah Jones' returns no such directory when I know it's right there in the top level. I'm trying to do this over the network, not sure if that is making it not work.

Not sure what you mean by over the network.  You are SSH-ing onto the pi?

Maybe:
cd "Norah Jones" 
or
cd Norah\ Jones
or 
cd Nor
then hit tab and it might auto-complete.

Regarding find, I've only poked around a little here but I believe the music is:
cd /var/lib/mpd/music
And your music will either be in USB or SDCARD.  cd into whichever one.

Quickest way to use find is probably:
find | grep -i sadness

this will look in the current dir and below.  You can just type:
find
to see all the files.

I take it you refreshed the library after deleting the files?
Reply
#6
(07-24-2021, 07:26 PM)lascala_2a3 Wrote: I plugged the USB into the Mac and I can access it, but I don't seem to be able to move through directory levels using terminal commands. This is a SanDisk Extreme SSD 500MB if it matters. Instead of the expected permissions I see "You have custom permissions."  It is formatted as ExFAT with partition type Master Boot Record. Since I'm this deep already, I could reformat the drive for optimal compatibility. Is this the best format and partitioning for the RPI4/Moode 7 and Mac OS, or would something else work better?

I don't know much about Macs.  Possibly the fact you have ExFat might make the Mac sad.  But it possibly isn't a problem given that you say you successfully deleted the files.  I'd stick to doing this on the pi.  My drive is ntfs and I can't manipulate files on the disk without first doing:
sudo bash
then you can do what you want.
Reply
#7
I have  found albums that I removed still appear and this may be due to having duplicate copies in different folders or with different names so they are often not where I'm looking for them.

As you say that you can play the albums then do that...start one playing and then from the MoOde menu select Audio Info and this will show you the path to the currently playing item. You should be able to then navigate to that on the drive and delete it.
----------
bob
Reply
#8
(07-24-2021, 07:26 PM)lascala_2a3 Wrote: I plugged the USB into the Mac and I can access it, but I don't seem to be able to move through directory levels using terminal commands. This is a SanDisk Extreme SSD 500MB if it matters. Instead of the expected permissions I see "You have custom permissions."  It is formatted as ExFAT with partition type Master Boot Record. Since I'm this deep already, I could reformat the drive for optimal compatibility. Is this the best format and partitioning for the RPI4/Moode 7 and Mac OS, or would something else work better?

I use FAT32 (MS-DOS FAT or VFAT) for drives that I swap between Pi and Mac.

Below are bunch of commands to clean out the annoying OS X dot files and directories from drives plugged into a Pi.

First you need to change to the root of the drive that you want to clean for example.
Code:
cd /media/VFAT128

Then paste the commands into the command prompt.
Code:
sudo find . -name "._*" -exec rm -rf {} \;
sudo find . -name ".Trashes" -exec rm -rf {} \;
sudo find . -name "._.Trashes" -exec rm -rf {} \;
sudo find . -name ".Spotlight*" -exec rm -rf {} \;
sudo find . -name ".DS_Store" -exec rm -rf {} \;
sudo find . -name "._.DS_Store" -exec rm -rf {} \;
sudo find . -name ".fseventsd*" -exec rm -rf {} \;
sudo find . -name "._.com.apple.timemachine.donotpresent" -exec rm -rf {} \;
sudo find . -name ".com.apple.timemachine.donotpresent" -exec rm -rf {} \;
sudo find . -name ".TemporaryItems" -exec rm -rf {} \;
sudo find . -name "._.TemporaryItems" -exec rm -rf {} \;
sudo find . -name "._moodecfg.txt" -exec rm -rf {} \;
sudo find . -name "__MACOSX" -exec rm -rf {} \;
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#9
Thank you all for the help. Tim, those commands are golden! I am now free of the annoying effects of the hidden files. I think it was .fseventsd was the nasty one. I got the terminal working right too, so should be able to deal with any that try to sneak back in. I used to use the terminal on remote servers and websites years ago, so this little exercise was like, oh yea, now I remember. My Moode library is looking really good now- happy listening y'all.
Reply
#10
Update:

I'd like to add a hint that will make this easier for anyone experiencing this in the future. Connect the USB drive to your Mac, open it in the finder, and hit Shift + Command + . (period). This will reveal hidden files. There will be a folder called .Trashes that contains supposedly deleted files, but they weren't actually deleted, just moved to this hidden .Trash folder. Apparently Moode will read these files and treat them as normal music files. So select the .Trashes folder and hit Shift + Command + Delete. Problem solved. This may be related to the ExFAT drive format because my APFS drive does not seem to collect copies of deleted files.
Reply


Forum Jump: