Page MenuHomeGitPull.it

Allow multiple video sources (parent sharables?)
Closed, ResolvedPublic3 Points

Description

Currently the sharable table is defined as follow:

$ mysql suckless_conference <<< 'EXPLAIN sharable`
+--------------------+--------------------------------------------+------+-----+---------+----------------+
| Field              | Type                                       | Null | Key | Default | Extra          |
+--------------------+--------------------------------------------+------+-----+---------+----------------+
| sharable_ID        | int(10) unsigned                           | NO   | PRI | NULL    | auto_increment |
| sharable_title     | varchar(64)                                | YES  |     | NULL    |                |
| sharable_path      | varchar(256)                               | NO   |     | NULL    |                |
| sharable_type      | enum('video','image','document','youtube') | NO   |     | NULL    |                |
| sharable_mimetype  | varchar(16)                                | YES  |     | NULL    |                |
| sharable_license   | varchar(16)                                | NO   |     | NULL    |                |
| event_ID           | int(10) unsigned                           | NO   | MUL | NULL    |                |
+--------------------+--------------------------------------------+------+-----+---------+----------------+

Actually there is not any possibility to related a sharable with another one. This could be useful to say alternative sources of a video or something like that.

So we can create a row for a video in mime type video/mp4 and a children with video/webm.

The thing I don't like about this quick and dirty solution is that the event_ID is somehow unuseful because it could be inherited from the parent of the current sharable. Also, the license is surely always NULL but, maybe, not necessarily. Maybe someone generates a CC BY webm version and someone else a CC BY-SA mp4.

In short, this is not that bad and cover lot of cases just adding a column.

Note that this may make you want to add an order of preference. This should be not covered by this Task.

Currently this is needed by the itWikiCon 2020 website to provide both webm and mp4.