vanilla-music / vanilla

Vanilla Music Player for Android
GNU General Public License v3.0
1.15k stars 290 forks source link

Adding a button to clear the cover cache #662

Open refi64 opened 7 years ago

refi64 commented 7 years ago

Description

Idea is to add a Clear cover art cache button to Settings -> Cover art.

e.g. I just had a weird issue where the cover art I changed wasn't get updated...so I just deleted covercache.db. However, there's a decent chance non-rooted users won't be able to do this...

Steps to reproduce the issue

Screenshot / Video (If applicable)

insert witty remark here

adrian-bl commented 7 years ago

We already clear the on-disk cache if any cover options change, but this is not visible as the LRU cache is not touched. While we could flush the LRU cache, this still wouldn't be visible as some views will continue to exist.

The only way to really flush the cache would therefore be to have such a flush-button also restart the application. Not sure if this is a great solution.

Kaned1as commented 7 years ago

@adrian-bl , can't we find all the views that show covers right now and send them notification through LocalBroadcastManager or smth similar?

adrian-bl commented 7 years ago

Some covers are external views, such as lockscreems, notifications and widgets. Also the coverview has its own cache where the next & previous covers are already drawn.

refi64 commented 7 years ago

TBH all I really want is some way of making my cover art changes visible without root requirements...

Maybe the button could say it doesn't affect the currently playing song without restarting Vanilla, since that would cover the holes I believe?

Or just label it clear cover cache and restart Vanilla...

Kaned1as commented 6 years ago

We don't need t oupdate lockscreen btw as cover change happens usually when the phone is unlocked (in cover fetch plugin or similar software).

@adrian-bl if there's something that has to be done to plugin subsystem (like, notify media scanner even if we didn't touch the file but folder.jpg) please ask. I too am waiting for this feature for a long time.

adrian-bl commented 6 years ago

Vanilla doesn't really know anything about lockscreen unlocks: The cover is something we actively send to the system if a song changed.

Talking about song changes: maybe we could get away by sending a song-change (internal) broadcast - still wouldn't help the library view.

andiandi13 commented 6 years ago

@adrian-bl Same issue.

I'm currently putting album art or changing them on my tags, and it's a pain to update them in Vanilla while it's there on other players.

Impatient as I am, I just delete the cover database into /data/data/ ch.blinkenlights.android.vanilla/

I think your idea of a 'clear cover' button (or update cover) is nice. Even if the app restarts its completely OK.