Skip to content

Commit

Permalink
feat(Video): Group videos into year folder
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Previously all videos were in the videos folder, now per year
  • Loading branch information
danactive committed Feb 20, 2021
1 parent 2e837bc commit 292d2f8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/app/containers/InfiniteThumbs/saga.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const argsPhotoXmlPath = ({ gallery, filename }) => {
};

export const argsVideoXmlPath = ({ gallery, filename }) => ({
path: `/galleries/${gallery}/media/videos/${filename}`,
path: `/galleries/${gallery}/media/videos/${getYear(filename)}/${filename}`,
});

// saga WORKER for CHOOSE_MEMORY for Dropbox gallery
Expand Down Expand Up @@ -118,8 +118,8 @@ export function* getPhotoPathsOnCdn({
);

const paths = memory.thumbLink.replace('thumbs', 'videos').split('/');
paths.splice(7, 2); // delete year folder and JPG
const videoLink = `${paths.join('/')}/${memory.filename}`;
const pathsWithoutThumb = paths.slice(0, 8); // delete thumb JPG path
const videoLink = `${pathsWithoutThumb.join('/')}/${memory.filename}`;
yield put(
loadVideoSuccess({
id,
Expand Down

0 comments on commit 292d2f8

Please sign in to comment.