From 937b4dde39403e95bc41f360a6f309345cb35663 Mon Sep 17 00:00:00 2001
From: Krisztian Papp <30371056+pehsa@users.noreply.github.com>
Date: Sat, 10 Aug 2019 21:07:28 +0200
Subject: [PATCH] Add ModDB and IndieDB video support (#849)
* Add ModDB and IndieDB video support
* Add ModDB and IndieDB videos to Readme
* Minor fix
---
README.md | 2 ++
schema/games.yaml | 4 ++++
templates/games.html | 2 ++
templates/video.html | 9 +++++++++
4 files changed, 17 insertions(+)
diff --git a/README.md b/README.md
index 66bf59cbe..9acced7a9 100644
--- a/README.md
+++ b/README.md
@@ -41,6 +41,8 @@ images: array # Link(s) to screenshot(s)
video:
youtube: string # YouTube video ID
vimeo: number # Vimeo video ID
+ moddb: number # ModDB video ID
+ indiedb: number # IndieDB video ID
# * free means no cost, open means liberally licensed
```
diff --git a/schema/games.yaml b/schema/games.yaml
index a3a2c764d..9e11bc6f9 100644
--- a/schema/games.yaml
+++ b/schema/games.yaml
@@ -65,6 +65,10 @@ schema;game:
max: 11
vimeo:
type: int
+ moddb:
+ type: int
+ indiedb:
+ type: int
# Based on SPDX license codes
diff --git a/templates/games.html b/templates/games.html
index a220cc659..c7ca88f4e 100644
--- a/templates/games.html
+++ b/templates/games.html
@@ -119,6 +119,8 @@
{% if 'video' in game %}
{% if 'youtube' in game['video'] %}{{ video.render_youtube(game['video']['youtube']) }}{% endif %}
{% if 'vimeo' in game['video'] %}{{ video.render_vimeo(game['video']['vimeo']) }}{% endif %}
+ {% if 'moddb' in game['video'] %}{{ video.render_moddb(game['video']['moddb']) }}{% endif %}
+ {% if 'indiedb' in game['video'] %}{{ video.render_indiedb(game['video']['indiedb']) }}{% endif %}
{%- endif %}
diff --git a/templates/video.html b/templates/video.html
index 324a7a9eb..d530a26f9 100644
--- a/templates/video.html
+++ b/templates/video.html
@@ -7,3 +7,12 @@
{%- endmacro %}
+
+{%- macro render_moddb(moddb_id) -%}
+
+{%- endmacro %}
+
+{%- macro render_indiedb(indiedb_id) -%}
+
+ {%- endmacro %}
+
\ No newline at end of file