mediacms-io / mediacms

MediaCMS is a modern, fully featured open source video and media CMS, written in Python/Django and React, featuring a REST API.
https://mediacms.io
GNU Affero General Public License v3.0
2.86k stars 533 forks source link

feat: provide slideshow media for images #1108

Closed mgogoulos closed 1 week ago

mgogoulos commented 2 weeks ago

Description

This is required for https://github.com/mediacms-io/mediacms/issues/1106

provides the following structure in the API for media, if media_type is image

"slideshow_items": [
        {
            "poster_url": "/media/original/thumbnails/user/admin/5033538082024d149e72df9bfe89e995.DSC07897.JPG_yvDV18F.jpg",
            "url": "/view?m=RFMfIrCEp",
            "thumbnail_url": "/media/original/thumbnails/user/admin/5033538082024d149e72df9bfe89e995.DSC07897.JPG.jpg",
            "title": "title x "
        },
        {
            "poster_url": "/media/original/thumbnails/user/admin/35d1d110f3f246c28c5c61c8fa4192be.DSC07896.JPG_GvqGmSY.jpg",
            "url": "/view?m=iuOtTFJNx",
            "thumbnail_url": "/media/original/thumbnails/user/admin/35d1d110f3f246c28c5c61c8fa4192be.DSC07896.JPG.jpg",
            "title": "title xy"
        },
    ],

If media_type is not "image", then this is []