瀏覽代碼

Fix jellyfin scrobbling

Colin Powell 2 年之前
父節點
當前提交
04b7214795
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      vrobbler/settings.py

+ 2 - 0
vrobbler/settings.py

@@ -173,12 +173,14 @@ AUTHENTICATION_BACKENDS = [
     "allauth.account.auth_backends.AuthenticationBackend",
 ]
 
+# We have to ignore content negotiation because Jellyfin is a bad actor
 REST_FRAMEWORK = {
     "DEFAULT_PERMISSION_CLASSES": ("rest_framework.permissions.AllowAny",),
     'DEFAULT_AUTHENTICATION_CLASSES': [
         'rest_framework.authentication.TokenAuthentication',
         'rest_framework.authentication.SessionAuthentication',
     ],
+    'DEFAULT_CONTENT_NEGOTIATION_CLASS': 'vrobbler.negotiation.IgnoreClientContentNegotiation',
     "DEFAULT_FILTER_BACKENDS": [
         "django_filters.rest_framework.DjangoFilterBackend"
     ],