2bcab5d098
- moved all server related things into the folder `server`, so this configuration is parallel to the client. - All main "services" are now folders in the root directory - Added Dockerfiles to each service (currently server and client) - Added a docker compose configuration to start everything together. Currently there are heavy dependencies into https://github.com/OpenSlides/openslides-docker-compose - Resturctured the .gitignore. If someone needs something excluded, please add it to the right section. - Added initial build setup with Docker and docker-compose. - removed setup.py. We won't deliver OpenSlides via pip anymore.
30 lines
708 B
Python
30 lines
708 B
Python
from typing import Any, Dict
|
|
|
|
from ..utils.projector import (
|
|
ProjectorAllDataProvider,
|
|
get_model,
|
|
register_projector_slide,
|
|
)
|
|
|
|
|
|
async def mediafile_slide(
|
|
all_data_provider: ProjectorAllDataProvider,
|
|
element: Dict[str, Any],
|
|
projector_id: int,
|
|
) -> Dict[str, Any]:
|
|
"""
|
|
Slide for Mediafile.
|
|
"""
|
|
mediafile = await get_model(
|
|
all_data_provider, "mediafiles/mediafile", element.get("id")
|
|
)
|
|
return {
|
|
"path": mediafile["path"],
|
|
"mimetype": mediafile["mimetype"],
|
|
"media_url_prefix": mediafile["media_url_prefix"],
|
|
}
|
|
|
|
|
|
def register_projector_slides() -> None:
|
|
register_projector_slide("mediafiles/mediafile", mediafile_slide)
|