Skip to content
Snippets Groups Projects
Commit 34b5eb78 authored by Marcos Peña's avatar Marcos Peña Committed by Georg Krause
Browse files

Resolve "Subsonic API scrobble call not triggering scrobble plugin"

parent ad80ddfc
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@ from rest_framework import permissions as rest_permissions
from rest_framework import renderers, response, viewsets
from rest_framework.decorators import action
from rest_framework.serializers import ValidationError
from config import plugins
import funkwhale_api
from funkwhale_api.activity import record
......@@ -810,6 +811,11 @@ class SubsonicViewSet(viewsets.GenericViewSet):
)
if serializer.validated_data["submission"]:
listening = serializer.save()
plugins.trigger_hook(
plugins.LISTENING_CREATED,
listening=listening,
confs=plugins.get_confs(request.user),
)
record.send(listening)
return response.Response({})
......
Fixes subsonic scrobble not triggering plugin hook (#1416)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment