Fix #1086: Added safeguard to ensure local uploads are never purged from cache

This commit is contained in:
Agate 2020-05-07 13:39:57 +02:00
parent 29c58d1ce5
commit 49a8b2babf
No known key found for this signature in database
GPG key ID: 6B501DFD73514E14
5 changed files with 30 additions and 3 deletions

View file

@ -50,6 +50,7 @@ def clean_music_cache():
)
.local(False)
.exclude(audio_file="")
.filter(Q(source__startswith="http://") | Q(source__startswith="https://"))
.only("audio_file", "id")
.order_by("id")
)