Skip to content

Commit

Permalink
fix(API > Video): Video path with year
Browse files Browse the repository at this point in the history
  • Loading branch information
danactive committed May 15, 2021
1 parent a40b710 commit d567baa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/server/plugins/video/components/source.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const React = require('react');

function Source({ extension, gallery, source }) {
const src = `/galleries/${gallery}/media/videos/${source}`;
const getYear = (filename = '') => filename.substr(0, 4);
const src = `/galleries/${gallery}/media/videos/${getYear(source)}/${source}`;
let type = '';
if (extension === 'mp4') {
type = 'video/mp4; codecs="avc1.4D401E, mp4a.40.2"';
Expand Down

0 comments on commit d567baa

Please sign in to comment.