Commit a8ab4eed authored by petitminion's avatar petitminion Committed by Georg Krause
Browse files

Add recently added radio, part of #1390

parent 96fe772d
......@@ -5,11 +5,12 @@ from django.db import connection
from django.db.models import Q
from rest_framework import serializers
from funkwhale_api.federation import models as federation_models
from funkwhale_api.federation import fields as federation_fields
from funkwhale_api.federation import models as federation_models
from funkwhale_api.moderation import filters as moderation_filters
from import Artist, Library, Track, Upload
from funkwhale_api.tags.models import Tag
from . import filters, models
from .registries import registry
......@@ -320,3 +321,10 @@ class LibraryRadio(RelatedObjectRadio):
def get_related_object_id_repr(self, obj):
return obj.uuid
class RecentlyAdded(SessionRadio):
def get_queryset(self, **kwargs):
qs = super().get_queryset(**kwargs)
return qs.filter(artist__content_category="music").order_by("-creation_date")
Implemented awesome recently added radio (part of #1390)
......@@ -13,6 +13,7 @@
<radio-card v-if="isAuthenticated" :type="'actor-content'" :object-id="$store.state.auth.fullUsername"></radio-card>
<radio-card v-if="isAuthenticated && hasFavorites" :type="'favorites'"></radio-card>
<radio-card :type="'random'"></radio-card>
<radio-card :type="'recently-added'"></radio-card>
<radio-card v-if="$store.state.auth.authenticated" :type="'less-listened'"></radio-card>
......@@ -27,6 +27,10 @@ export default {
'less-listened': {
name: 'Less listened',
description: "Listen to tracks you usually don't. It's time to restore some balance."
'recently-added': {
name: 'Recently Added',
description: "Newest content on the network. Get some fresh air."
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment