Resolve "Subsonic API scrobble call not triggering scrobble plugin"
This commit is contained in:
parent
ad80ddfce4
commit
34b5eb7830
|
@ -14,6 +14,7 @@ from rest_framework import permissions as rest_permissions
|
||||||
from rest_framework import renderers, response, viewsets
|
from rest_framework import renderers, response, viewsets
|
||||||
from rest_framework.decorators import action
|
from rest_framework.decorators import action
|
||||||
from rest_framework.serializers import ValidationError
|
from rest_framework.serializers import ValidationError
|
||||||
|
from config import plugins
|
||||||
|
|
||||||
import funkwhale_api
|
import funkwhale_api
|
||||||
from funkwhale_api.activity import record
|
from funkwhale_api.activity import record
|
||||||
|
@ -810,6 +811,11 @@ class SubsonicViewSet(viewsets.GenericViewSet):
|
||||||
)
|
)
|
||||||
if serializer.validated_data["submission"]:
|
if serializer.validated_data["submission"]:
|
||||||
listening = serializer.save()
|
listening = serializer.save()
|
||||||
|
plugins.trigger_hook(
|
||||||
|
plugins.LISTENING_CREATED,
|
||||||
|
listening=listening,
|
||||||
|
confs=plugins.get_confs(request.user),
|
||||||
|
)
|
||||||
record.send(listening)
|
record.send(listening)
|
||||||
return response.Response({})
|
return response.Response({})
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Fixes subsonic scrobble not triggering plugin hook (#1416)
|
Loading…
Reference in New Issue