mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 11:49:24 +02:00
Fix #564: Added a script to prune pre 0.17 federated tracks
This commit is contained in:
parent
b453769a32
commit
6aaa51e8e7
5 changed files with 56 additions and 1 deletions
|
@ -2,6 +2,7 @@ from . import create_actors
|
|||
from . import create_image_variations
|
||||
from . import django_permissions_to_user_permissions
|
||||
from . import migrate_to_user_libraries
|
||||
from . import delete_pre_017_federated_uploads
|
||||
from . import test
|
||||
|
||||
|
||||
|
@ -10,5 +11,6 @@ __all__ = [
|
|||
"create_image_variations",
|
||||
"django_permissions_to_user_permissions",
|
||||
"migrate_to_user_libraries",
|
||||
"delete_pre_017_federated_uploads",
|
||||
"test",
|
||||
]
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
"""
|
||||
Compute different sizes of image used for Album covers and User avatars
|
||||
"""
|
||||
|
||||
from funkwhale_api.music.models import Upload
|
||||
|
||||
|
||||
def main(command, **kwargs):
|
||||
queryset = Upload.objects.filter(
|
||||
source__startswith="http", source__contains="/federation/music/file/"
|
||||
).exclude(source__contains="youtube")
|
||||
total = queryset.count()
|
||||
command.stdout.write("{} uploads found".format(total))
|
||||
queryset.delete()
|
Loading…
Add table
Add a link
Reference in a new issue