Merge branch '1175-embed' into 'master'
Fix #1175: Fix embedded player not working on channel serie/album See merge request funkwhale/funkwhale!1170
This commit is contained in:
commit
c32283659a
|
@ -136,6 +136,7 @@ test_api:
|
|||
- branches
|
||||
before_script:
|
||||
- apk add make git gcc python3-dev musl-dev
|
||||
- apk add postgresql-dev py3-psycopg2 libldap libffi-dev make zlib-dev jpeg-dev openldap-dev
|
||||
- cd api
|
||||
- pip3 install -r requirements/base.txt
|
||||
- pip3 install -r requirements/local.txt
|
||||
|
|
|
@ -177,6 +177,8 @@ def serialize_artist_simple(artist):
|
|||
if artist.attachment_cover
|
||||
else None
|
||||
)
|
||||
if "channel" in artist._state.fields_cache and artist.get_channel():
|
||||
data["channel"] = str(artist.channel.uuid)
|
||||
|
||||
if getattr(artist, "_tracks_count", None) is not None:
|
||||
data["tracks_count"] = artist._tracks_count
|
||||
|
@ -857,4 +859,5 @@ class AlbumCreateSerializer(serializers.Serializer):
|
|||
instance, "description", validated_data.get("description")
|
||||
)
|
||||
tag_models.set_tags(instance, *(validated_data.get("tags", []) or []))
|
||||
instance.artist.get_channel()
|
||||
return instance
|
||||
|
|
|
@ -180,7 +180,7 @@ class AlbumViewSet(
|
|||
queryset = (
|
||||
models.Album.objects.all()
|
||||
.order_by("-creation_date")
|
||||
.prefetch_related("artist", "attributed_to", "attachment_cover")
|
||||
.prefetch_related("artist__channel", "attributed_to", "attachment_cover")
|
||||
)
|
||||
serializer_class = serializers.AlbumSerializer
|
||||
permission_classes = [oauth_permissions.ScopePermission]
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Fix embedded player not working on channel serie/album (#1175)
|
|
@ -30,9 +30,9 @@ FUNKWHALE_CONFIG = {
|
|||
"FUNKWHALE_URL": "mypod.funkwhale",
|
||||
"FUNKWHAL_PROTOCOL": "https",
|
||||
"DATABASE_URL": "postgres://localhost:5432/db",
|
||||
"AWS_ACCESS_KEY_ID": 'my_access_key',
|
||||
"AWS_SECRET_ACCESS_KEY": 'my_secret_key',
|
||||
"AWS_STORAGE_BUCKET_NAME": 'my_bucket',
|
||||
"AWS_ACCESS_KEY_ID": "my_access_key",
|
||||
"AWS_SECRET_ACCESS_KEY": "my_secret_key",
|
||||
"AWS_STORAGE_BUCKET_NAME": "my_bucket",
|
||||
}
|
||||
for key, value in FUNKWHALE_CONFIG.items():
|
||||
os.environ[key] = value
|
||||
|
|
|
@ -280,6 +280,7 @@ export default {
|
|||
},
|
||||
fetchTracks (filters, path) {
|
||||
path = path || "/api/v1/tracks/"
|
||||
filters.include_channels = "true"
|
||||
let self = this
|
||||
let url = `${this.baseUrl}${path}`
|
||||
axios.get(url, {params: filters}).then(response => {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<div class="header">
|
||||
<translate translate-context="Popup/Album/Title/Verb">Embed this album on your website</translate>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="scrolling content">
|
||||
<div class="description">
|
||||
<embed-wizard type="album" :id="object.id" />
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<div class="header">
|
||||
<translate translate-context="Popup/Artist/Title/Verb">Embed this artist work on your website</translate>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="scrolling content">
|
||||
<div class="description">
|
||||
<embed-wizard type="artist" :id="object.id" />
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<div class="header">
|
||||
<translate translate-context="Popup/Track/Title">Embed this track on your website</translate>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="scrolling content">
|
||||
<div class="description">
|
||||
<embed-wizard type="track" :id="track.id" />
|
||||
</div>
|
||||
|
|
|
@ -159,7 +159,7 @@
|
|||
<div class="header">
|
||||
<translate translate-context="Popup/Artist/Title/Verb">Embed this artist work on your website</translate>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="scrolling content">
|
||||
<div class="description">
|
||||
<embed-wizard type="artist" :id="object.artist.id" />
|
||||
</div>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<div class="header">
|
||||
<translate translate-context="Popup/Album/Title/Verb">Embed this playlist on your website</translate>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="scrolling content">
|
||||
<div class="description">
|
||||
<embed-wizard type="playlist" :id="playlist.id" />
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue