Soft deleted tracks come back after Mac restart

I use Audirvana every day for listening and I also have an upgraded iPod (256gb) which I maintain through Apples Music app (iTunes replacement). In Audirvana I keep the FLAC, DSF, etc files and in Music I keep the AAC, ALAC, MP3 files. So, for many albums I have a lossless version and a version for the iPod (usually 16bit. 48Hz ALAC).

In Music the lossless files don’t show up because these file types are not recognised by Music - this is fine and means I just since everything to the iPod - easy!

In Audirvana I can see all the files in my Music folder (I don’t sync to Apple Music, I ‘watch’ the Music folder instead so that I get all the lossless files). This means I see every version of a track in Audirvana.

Using the delete function in Audirvana I can select the lower resolution files and delete (hide) them from Audirvana - this not a hard delete and works great until…

When I restart the Mac and reopen Audirvana all of the previously deleted tracks (hidden) now reappear. When Audirvana starts it immediately does a sync and brings them all back. Interestingly when I check the Recycle Bin I can see the tracks still listed there as deleted. If I then delete them again they will reappear following a restart…

I am on a MacBook Pro using OS Big Sur v 11.0.1 and Audirvana 3.5.42

I did try saving the .sqlite file and replacing it but this didn’t seem to work either.

Any suggestions how to keep the deleted files deleted?

I am a photographer and as part of my work flow I clear up the Mac and restart several times a week to keep it working smoothly for my business!

Consider moving the “low res” files to another folder outside the monitored path.

That is an idea but then I would have to change Apple Music to point too a new library I presume. The idea was to keep everything in one place with different views.

Hmmm, I don’t think you can do that.

Well, it all works fine, so long as I never restart the Mac! Seems like the Audirvana sqlite file is not correctly picking up which files are deleted.

It looks like it reverts back the situation on the next re-sync. You can test that by manually triggering re-sync.

Yes, just tried it again and after a Mac restart and then open Audirvana it immediately does a complete resync - this then overrides any ‘soft delete’ changes I have made and make a duplicate entry in the deleted files. I have the ‘Rescan network. folders at start’ button off.

Just for fun here is the debug from before and after a Mac restart:

Audirvana Mac Version 3.5.42 (3572)
macOS 10.16.0 with 32768MB RAM

Registered to Ewan Mathers

SIGNAL PROCESSING:

Polarity Inversion:
	Globally: OFF
	Per track: ON
Effects plugins ACTIVE in offline mode
	AU plugin #0: Effect - Waves Q10 (s) ()
	AU plugin #1: Effect - Airwindows Monitoring ()
	AU plugin #2: Effect - Airwindows Monitoring ()
	AU plugin #3: Effect - LGG Crossfeed ()

UPSAMPLING:
SoX with Power Of Two upsampling
SoX filter parameters
Bandwidth at 0dB = 88.0286
Filter max length = 30000
Anti-aliasing = 100
Phase = 0

AUDIO VOLUME:
Max allowed volume: 100
Replay Gain: by album
SW volume control: OFF

LIBRARY SETTINGS:
Sync list: 1 folders
AUTO: /Users/ewanmathers/Music/iTunes/iTunes Media/Music
iTunes/Music library synchronization: not synchronized
Library database path: /Users/ewanmathers/Library/Application Support/Audirvana/AudirvanaPlusDatabaseV2.sqlite

ACTIVE STREAMING SERVICES

=================== AUDIO DEVICE ========================

CoreAudio audio path, buffer I/O frame size: 512

Max. memory for audio buffers: 31744MB

Local Audio Engine:
Exclusive access: Enabled
Integer mode: Enabled

Preferred device:
Steinberg UR22mkII
Model UID:Steinberg UR22mkII :0499:170F
UID:AppleUSBAudioEngine:Yamaha Corporation:Steinberg UR22mkII :14410000:1,2

Active Sample Rate: 44.1kHz
Hog Mode is off

Bridge settings:
Sample rate limitation: none
Sample rate switching latency: none
Limit bitdepth to 24bit: ON
Mute during sample rate change: ON

Selected device:
Local audio device
ID 0x5b Steinberg UR22mkII Manufacturer:Yamaha Corporation
Model UID:Steinberg UR22mkII :0499:170F UID:AppleUSBAudioEngine:Yamaha Corporation:Steinberg UR22mkII :14410000:1,2

6 available sample rates up to 192000Hz
44100
48000
88200
96000
176400
192000
Audio buffer frame size : 14 to 4096 frames
Current I/O buffer frame size : 512
Volume Control
Physical: No
Virtual: No
MQA capability
Auto-detect MQA devices: No
Not a MQA device, user set to not MQA
DSD capability: Unhandled
Device audio channels
Preferred stereo channels L:1 R:2
Channel bitmap: Ox3, layout:
Channel 0 mapped to 0
Channel 1 mapped to 1

Audio channels in use
Number of channels: 2
Use as stereo device only: No
Simple stereo device: Yes

1 output streams:
Number of active channels: 2, in 1 stream(s)
Channel #0 :Stream 0 channel 0
Channel #1 :Stream 0 channel 1

Stream ID 0x5c 2 channels starting at 1
12 virtual formats:
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 192kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 176.4kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 96kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 88.2kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 48kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 44.1kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 192kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 176.4kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 96kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 88.2kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 48kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 44.1kHz

12 physical formats
2 ch Mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 192kHz
2 ch Mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 176.4kHz
2 ch Mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 96kHz
2 ch Mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 88.2kHz
2 ch Mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 48kHz
2 ch Mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 44.1kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 192kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 176.4kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 96kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 88.2kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 48kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 44.1kHz

Local devices found : 2
Device #0: ID 0x5b Steinberg UR22mkII Manufacturer: Yamaha Corporation Model UID: Steinberg UR22mkII :0499:170F UID: AppleUSBAudioEngine:Yamaha Corporation:Steinberg UR22mkII :14410000:1,2
Device #1: ID 0x4f MacBook Pro Speakers Manufacturer: Apple Inc. Model UID: Speaker UID: BuiltInSpeakerDevice

UPnP devices found : 0

—————————————————————————————-

Audirvana Mac Version 3.5.42 (3572)
macOS 10.16.0 with 32768MB RAM

Registered to Ewan Mathers

SIGNAL PROCESSING:

Polarity Inversion:
	Globally: OFF
	Per track: ON
Effects plugins ACTIVE in offline mode
	AU plugin #0: Effect - Waves Q10 (s) ()
	AU plugin #1: Effect - Airwindows Monitoring ()
	AU plugin #2: Effect - Airwindows Monitoring ()
	AU plugin #3: Effect - LGG Crossfeed ()

UPSAMPLING:
SoX with Power Of Two upsampling
SoX filter parameters
Bandwidth at 0dB = 88.0286
Filter max length = 30000
Anti-aliasing = 100
Phase = 0

AUDIO VOLUME:
Max allowed volume: 100
Replay Gain: by album
SW volume control: OFF

LIBRARY SETTINGS:
Sync list: 1 folders
AUTO: /Users/ewanmathers/Music/iTunes/iTunes Media/Music
iTunes/Music library synchronization: not synchronized
Library database path: /Users/ewanmathers/Library/Application Support/Audirvana/AudirvanaPlusDatabaseV2.sqlite

ACTIVE STREAMING SERVICES

=================== AUDIO DEVICE ========================

CoreAudio audio path, buffer I/O frame size: 512

Max. memory for audio buffers: 31744MB

Local Audio Engine:
Exclusive access: Enabled
Integer mode: Enabled

Preferred device:
Steinberg UR22mkII
Model UID:Steinberg UR22mkII :0499:170F
UID:AppleUSBAudioEngine:Yamaha Corporation:Steinberg UR22mkII :14410000:1,2

Active Sample Rate: 44.1kHz
Hog Mode is off

Bridge settings:
Sample rate limitation: none
Sample rate switching latency: none
Limit bitdepth to 24bit: ON
Mute during sample rate change: ON

Selected device:
Local audio device
ID 0x5b Steinberg UR22mkII Manufacturer:Yamaha Corporation
Model UID:Steinberg UR22mkII :0499:170F UID:AppleUSBAudioEngine:Yamaha Corporation:Steinberg UR22mkII :14410000:1,2

6 available sample rates up to 192000Hz
44100
48000
88200
96000
176400
192000
Audio buffer frame size : 14 to 4096 frames
Current I/O buffer frame size : 512
Volume Control
Physical: No
Virtual: No
MQA capability
Auto-detect MQA devices: No
Not a MQA device, user set to not MQA
DSD capability: Unhandled
Device audio channels
Preferred stereo channels L:1 R:2
Channel bitmap: Ox3, layout:
Channel 0 mapped to 0
Channel 1 mapped to 1

Audio channels in use
Number of channels: 2
Use as stereo device only: No
Simple stereo device: Yes

1 output streams:
Number of active channels: 2, in 1 stream(s)
Channel #0 :Stream 0 channel 0
Channel #1 :Stream 0 channel 1

Stream ID 0x5c 2 channels starting at 1
12 virtual formats:
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 192kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 176.4kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 96kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 88.2kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 48kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 44.1kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 192kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 176.4kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 96kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 88.2kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 48kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 44.1kHz

12 physical formats
2 ch Mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 192kHz
2 ch Mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 176.4kHz
2 ch Mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 96kHz
2 ch Mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 88.2kHz
2 ch Mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 48kHz
2 ch Mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 44.1kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 192kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 176.4kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 96kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 88.2kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 48kHz
2 ch Non-mixable linear PCM Interleaved 24 little endian Signed Integer aligned low in 32bit 44.1kHz

Local devices found : 2
Device #0: ID 0x5b Steinberg UR22mkII Manufacturer: Yamaha Corporation Model UID: Steinberg UR22mkII :0499:170F UID: AppleUSBAudioEngine:Yamaha Corporation:Steinberg UR22mkII :14410000:1,2
Device #1: ID 0x4f MacBook Pro Speakers Manufacturer: Apple Inc. Model UID: Speaker UID: BuiltInSpeakerDevice

UPnP devices found : 0

I have been doing some digging in the sqlite file and found that if I delete files in Audirvana then those files show in the TRASHED_TRACKS list and the TRACKS_ARTISTS list shows only the tracks I want. So this is all correct.

However, when Audirvana is opened after a restart it does a sync (which is fine, I guess, even though there has been no change to the ‘Music’ folder) and puts back into the TRACKS_ARTISTS everything from the watched folder.

Crucially it does not seem at that point to check if any of the tracks it is loading are already listed in the TRASHED_TRACKS list and then ignore those.

I would have expected this to be the behaviour of the sql when scanning the ‘Music’ folder - hence if the track is in the trash don’t include it in the rebuild of the database.

Does this make sense?

It sounds like a feature request.

I keep the lossy files in a completely separate folder which I sync to Music, for mobile/in car listening. The lossless files I sync only in Audirvana.

Have you consider using smartplayslits? It’s way more convenient as the update themselves according to the criteria you put in (file format for example) and you won’t get this issue while you delete the tracks.

Well, I can’t quite see how I would create a single Smart Playlist that would cover all of my required criteria. The mixture of file types within one art

I did try creating a manual playlist with everything in it and then deleting the duplicate low res tracks from it. That does kind of work but is a bit of a pain having to remember to use that whenever I make changes.

Can you confirm the behaviour I have been seeing is just the way Audirvana works - i.e. if I use the delete function from the Library within Audirvana there tracks will keep coming. back after every rest of the Mac? If so what is the design justification for this?

I think this is what it all boils down to - the ‘soft’ delete function is ignored after restarting the Mac and so makes it unusable for me. I can live with it but it is rather annoying as I have spent many days organising my whole music collection and this is one thing I have not been able to fix.

Do you. have any other ideas? Thanks

Your first criteria is to only display tracks that are not AAC, ALAC or MP3 right? What are your other criteria?

Ah, no, I wanted Audirvana to show all types of file but for some albums only show the high res versions and not the lower res ones that are used in Apple Music for sync with the iPod. This is why I started the process of using the delete function. This worked great until I restarted. the Mac and all the work goes following a re-sync and all the deleted tracks come back.

Don’t worry about playlists - I can sort out something there. But is this behaviour a bug or not…

Again - is this how you expect it to work?

Audirvana do a resync if there is a change in the file that were previously synchronized. Since your track are stored in Music, do you still make change in the tracks are are stored in this folder? /Users/ewanmathers/Music/iTunes/iTunes Media/Music

No change made in /Users/ewanmathers/Music/iTunes/iTunes Media/Music

Here it is again.

  1. Start the Mac
  2. Open only Audirvana
  3. Delete some tracks - and they appear in the Recycle Bin as expected
  4. Do not play anything or change anything in Audirvana
  5. Close Audirvana.
  6. Open Audirvana and check the the deleted tracks remain out of the library - which they do.
  7. Close Audirvana.
  8. Restart the Mac.
  9. Open only Audirvana - this triggers a SYNC (but nothing in the /Users/ewanmathers/Music/iTunes/iTunes Media/Music folder has knowingly been changed)
  10. Deleted tracks reappear.

If I repeat the above then the sqlite file (and the Audirvana Recycle Bin) will show multiple entries for the same deleted tracks if you choose to delete the same tracks as in part 3. above.

Are you going to be able to replicate this issue and debug a solution?

I have been able to replicate the issue, we will need to make more test about it before being able to identify where the issue might come from.

Great! I thought I might have got it wrong and that there was something wrong my end. I hope you find a fix - and thanks for taking the time to investigate - I love Audirvana!

Hello @ewanmathers,

Your issue should be fixed with the latest version of Audirvana 3.5.43. Can you update your Audirvana and try to reproduce tour issue?

Perfect! I have tried this a few times now, doing what I did before, and it’ll seems to be working!! Fabulous!!! I have over 67 days of music to go through so I will keep an eye on it. Thank you so much for fixing this issue so quickly. :slight_smile: