Aldaviva/WinampNowPlayingToFile

Plugin doesn't delete cover file in custom folder

SchlSE opened this issue · 3 comments

The plugin doesn't delete the cover art file when playback is stopped, and doesn't replace it with the mentioned square if no cover art is found.

I changed the files in the settings and tested the plugin. While everything else works, the placeholder feature and the removal from the files after playback doesn't work.

Thanks for reporting this. I'll try to reproduce it and figure out what's going on.

I wonder if the file is in use by another process, or folder permissions are preventing the deletion.

Not reproducing for me so far. I've tried looking through the code and removing file permissions from the album art file, but it still gets deleted without errors.

Any exceptions, including UnauthorizedAccessException for files in use or for insufficient permissions, thrown by File.WriteAllBytes or File.Delete will be caught by update() and shown to the user in a MessageBox by NowPlayingToFilePlugin.Initialize(). Example error dialog:
error message

If you're using version 1.0.3 or later of this plugin and not seeing those dialog boxes, that would indicate that the plugin isn't trying to write or delete the album art. The latest version is 1.1.0, which is the recommended version to use. Not attempting to write to or delete the album art file without an exception might mean that Winamp sometimes doesn't send window messages to our plugin (unlikely), the plugin encountered a condition that made it stop but not thrown an exception (not sure what that would be), or the filesystem is silently ignoring the operations (unlikely).

Writing the black placeholder album art in particular works the same way as writing the album art extracted from the media file metadata or sidecar image files, so I'm not sure why it would work for one but not the other without throwing an obvious error.

Using Process Monitor, I can see that winamp.exe is successfully deleting the album art file when I pause Winamp:
procmon

Ok, thanks for your time, I think I know what happened.
I forgot to uninstall tuna from my obs. For some reason, that resulted in this phenomenon without any thrown errors.
After I removed the tuna plugin, it started to work as intended.