This commit is contained in:
Markos Gogoulos 2023-06-12 17:13:44 +03:00
parent 2f43cef8da
commit b7a70d92fa

View File

@ -154,6 +154,7 @@ class MediaSearchSerializer(serializers.ModelSerializer):
def get_url(self, obj):
return self.context["request"].build_absolute_uri(obj.get_absolute_url())
def get_api_url(self, obj):
return self.context["request"].build_absolute_uri(obj.get_absolute_url(api=True))
@ -170,7 +171,7 @@ class MediaSearchSerializer(serializers.ModelSerializer):
"friendly_token",
"duration",
"url",
"api_url"
"api_url",
"media_type",
"preview_url",
"categories_info",