kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
Fix #1059: fixed some broken RSS feeds
rodzic
02f5e9f531
commit
133e2e4f07
|
@ -29,7 +29,11 @@ class ChannelFilterSet(filters.FilterSet):
|
|||
if not value:
|
||||
return queryset
|
||||
|
||||
channel = audio_models.Channel.objects.filter(uuid=value).first()
|
||||
channel = (
|
||||
audio_models.Channel.objects.filter(uuid=value)
|
||||
.select_related("library")
|
||||
.first()
|
||||
)
|
||||
|
||||
if not channel:
|
||||
return queryset.none()
|
||||
|
@ -38,7 +42,7 @@ class ChannelFilterSet(filters.FilterSet):
|
|||
actor = utils.get_actor_from_request(self.request)
|
||||
uploads = uploads.playable_by(actor)
|
||||
ids = uploads.values_list(self.Meta.channel_filter_field, flat=True)
|
||||
return queryset.filter(pk__in=ids)
|
||||
return queryset.filter(pk__in=ids).distinct()
|
||||
|
||||
|
||||
class LibraryFilterSet(filters.FilterSet):
|
||||
|
|
|
@ -38,6 +38,7 @@ def compute_status(jobs):
|
|||
|
||||
AUDIO_EXTENSIONS_AND_MIMETYPE = [
|
||||
# keep the most correct mimetype for each extension at the bottom
|
||||
("mp3", "audio/mp3"),
|
||||
("mp3", "audio/mpeg3"),
|
||||
("mp3", "audio/x-mp3"),
|
||||
("mp3", "audio/mpeg"),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<section>
|
||||
<channel-entries :limit="25" :filters="{channel: object.uuid, ordering: '-creation_date', playable: 'true'}">
|
||||
<channel-entries :limit="25" :filters="{channel: object.uuid, ordering: '-creation_date'}">
|
||||
</channel-entries>
|
||||
</section>
|
||||
</template>
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
:can-update="false"></rendered-description>
|
||||
<div class="ui hidden divider"></div>
|
||||
</div>
|
||||
<channel-entries :key="String(episodesKey) + 'entries'" :filters="{channel: object.uuid, ordering: '-creation_date', playable: 'true'}">
|
||||
<channel-entries :key="String(episodesKey) + 'entries'" :filters="{channel: object.uuid, ordering: '-creation_date'}">
|
||||
<h2 class="ui header">
|
||||
<translate translate-context="Content/Channel/Paragraph">Latest episodes</translate>
|
||||
</h2>
|
||||
|
|
Ładowanie…
Reference in New Issue