noi-techpark / it.bz.opendatahub.databrowser

Explore and navigate through Open Data you need to build your next service.
https://databrowser.opendatahub.com
GNU Affero General Public License v3.0
9 stars 7 forks source link

Create Component for Inserting VideoItems #598

Closed RudiThoeni closed 1 month ago

RudiThoeni commented 2 months ago

We need a component for inserting VideoItems

Since Videos can be available only in one language instead of a List we have a Dictionary with the language key and a List of Videos for each Language.

The Datastructure is following

VideoItems": {
        "languagekey": [
            {
                "Name": "string",
                "Url": "string",
                "VideoSource": "string",
                "VideoType": "string",
                "StreamingSource": "string",
                "VideoTitle": "string",
                "VideoDesc": "string",
                "Active": boolean,
                "CopyRight": "string",
                "License": "SEE Dropdown ImageGallery",
                "LicenseHolder": "string",
            }
        ]
}

example

"VideoItems": {
        "de": [
            {
                "Name": "00527C33B94A42C2BABE4658EF211A15",
                "Url": "<iframe width=\"1280\" height=\"720\" src=\"//www.youtube.com/embed/blabla?list=UUqSmyuqVNwklKKlqqdMmV_A\" frameborder=\"0\" allowfullscreen=\"\"/>",
                "VideoSource": "Youtube",
                "VideoType": "Werbefilm",
                "StreamingSource": "http://www.youtube.com/embed/blabla",
                "VideoTitle": "",
                "VideoDesc": "Video Beschreibung DE",
                "Active": true,
                "CopyRight": "Corvara",
                "License": "LTS",
                "LicenseHolder": null,
                "Language": "de"
            }
        ],
        "it": [
            {
                "Name": "00527C33B94A42C2BABE4658EF211A15",
                "Url": "<iframe width=\"960\" height=\"720\" src=\"//www.youtube.com/embed/blabla\" frameborder=\"0\" allowfullscreen=\"\"/>",
                "VideoSource": "Youtube",
                "VideoType": "Film pubblicitario",
                "StreamingSource": "http://www.youtube.com/embed/zUUwX5LuyB0?list=blabla",
                "VideoTitle": "",
                "VideoDesc": "Video Beschreibung it",
                "Active": true,
                "CopyRight": "Corvara",
                "License": "LTS",
                "LicenseHolder": null,
                "Language": "it"
            }
        ],
        "en": [
            {
                "Name": "00527C33B94A42C2BABE4658EF211A15",
                "Url": "<iframe width=\"1280\" height=\"720\" src=\"//www.youtube.com/embed/blabla\" frameborder=\"0\" allowfullscreen=\"\"/>",
                "VideoSource": "Youtube",
                "VideoType": "Promotional",
                "StreamingSource": "http://www.youtube.com/embed/blabla",
                "VideoTitle": "",
                "VideoDesc": "Video Beschreibung EN",
                "Active": true,
                "CopyRight": "Corvara",
                "License": "LTS",
                "LicenseHolder": null,
                "Language": "en"
            }
        ]
    },

related issue https://github.com/noi-techpark/odh-api-core/issues/439

RudiThoeni commented 2 months ago

@gappc I think lets try to create this component without having a meeting. I think everything should be clear. if there are more questions we can always have a short meeting. thx and cheers

gappc commented 2 months ago

@RudiThoeni, @sseppi: I created PR #599 that implements a new component for VideoItems, you can test it here:

During the implementation, I saw that the VideoItems type contains a property Resolution and then the properties Width / Height. Whats the difference between Resolution and Width / Height?

RudiThoeni commented 2 months ago

@gappc thx, i will test it, For the Resolution/Width:Height good point i will check it ;)

RudiThoeni commented 2 months ago

@gappc Seems like some data has stored Values like 360 / 720 under Resolution, and other data has a width and height defined...... You are right it makes no sense to have this 3 fields, i think i will unify this fields into one string field, i will make this changes in the component when it is ready on api side....

I tested the component and all seems to work, great ;) will merge the PR

sseppi commented 1 month ago

I tested the component too, I close the issue.