-
Notifications
You must be signed in to change notification settings - Fork 50
Extend image proxy to work with cover art #171
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got it to work by manually adding an audioset, adding the audio_set_id
to the audio row, and visiting the thumb url.
INSERT INTO "public"."api_audioset" ("id", "created_on", "updated_on", "identifier", "foreign_identifier", "title", "foreign_landing_url", "creator", "creator_url", "url", "filesize") VALUES (4, '2021-08-13 03:21:57.193204+00', '2021-08-13 03:21:57.193204+00', '40e6215d-b5c6-4896-987c-f30f3678f608', '31', 'Pouce !', 'https://www.jamendo.com/album/31/pouce', 'fake', 'https://fake.com', 'https://usercontent.jamendo.com?type=album&id=31&width=200&trackid=217', 200);
Then added the resulting id
as the audio_set_id
for audio where identifier is 28c40835-f14d-4b81-8847-bbb091a64f35
.
http://localhost:8000/v1/audio/28c40835-f14d-4b81-8847-bbb091a64f35/thumb
My only real feedback is that I don't love the audio_set
column names url
for the thumbnail url.
I'm also wondering if it makes sense to store the thumbnail url on the individual audio rows as a backup if anything happens to the audio set, or maybe we just need some other protection to make sure audio sets aren't deleted/lost/disconnected in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thumbnail images work great.
Thank you for adding changes so quickly!
I was wondering how cache works with thumbnails. It seems that many audio files will have the same thumbnail (since the image is the same for all audios in the audio_set, at least on jamendo).
@obulat the image proxy we use has caching functionality built-in, although we have not configured it in the dev environment. The documentation covers most caching setups so it should not pose significant difficulty. |
Fixes
Closes #76
Description
This PR adds endpoints to generate thumbnails for album art associated with audio sets
Checklist
Update index.md
).main
ormaster
).Developer Certificate of Origin
Developer Certificate of Origin