apognu / otter

Music player for Funkwhale
MIT License
214 stars 21 forks source link

Unable to play music from my library #101

Open breakdancingcat opened 3 years ago

breakdancingcat commented 3 years ago

I'm not sure if this is a bug with Funkwhale or Otter because I can play music through the Funkwhale web interface just fine.

How to reproduce

  1. Sign into funkwhale through otter. My account has its own library.
  2. I see songs that are not in my library, but part of the funkwhale instance owners library on the default page that otter opens.
  3. I click Radios
  4. I click "Your content" to play songs from my library.
  5. No music is played and an error pops up. The Radios page is now broken. The following buttons fail to work until I leave the page and come back. "Your content", "Random", "Favorites", and "Less listened.
  6. The instance owner can play their own library via otter and the web browser just fine.

Expected behavior

I expect to play music from my library. I can play my library through the web browser just fine.

Environment details

Funkwhale logs

2020-11-22 20:49:27,458 django.request ERROR    Internal Server Error: /api/v1/radios/sessions/
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/usr/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python3.7/contextlib.py", line 74, in inner
    return func(*args, **kwds)
  File "/usr/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/rest_framework/viewsets.py", line 114, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python3.7/site-packages/rest_framework/views.py", line 505, in dispatch
    response = self.handle_exception(exc)
  File "/usr/lib/python3.7/site-packages/rest_framework/views.py", line 465, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/usr/lib/python3.7/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception
    raise exc
  File "/usr/lib/python3.7/site-packages/rest_framework/views.py", line 502, in dispatch
    response = handler(request, *args, **kwargs)
  File "/usr/lib/python3.7/site-packages/rest_framework/mixins.py", line 18, in create
    serializer.is_valid(raise_exception=True)
  File "/usr/lib/python3.7/site-packages/rest_framework/serializers.py", line 234, in is_valid
    self._validated_data = self.run_validation(self.initial_data)
  File "/usr/lib/python3.7/site-packages/rest_framework/serializers.py", line 436, in run_validation
    value = self.validate(value)
  File "/app/api/funkwhale_api/radios/serializers.py", line 72, in validate
    radio_conf = registry[data["radio_type"]]()
KeyError: 'actor_content'