Skip to content
This repository was archived by the owner on Oct 16, 2019. It is now read-only.

Commit 6adcfd0

Browse files
committed
fix(transforms): add slash to the URL creation for videos
Closes #101
1 parent e96a3cc commit 6adcfd0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/api/__tests__/data/catalog_service_response.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@
5757
},
5858
{
5959
"type": "VIDEO_THUMBNAIL",
60-
"path": "/comet/LE/22/1N/02/PK/11/VIDEO/PREVIEW_IMG/1479494993512.jpg",
60+
"path": "comet/LE/22/1N/02/PK/11/VIDEO/PREVIEW_IMG/1479494993512.jpg",
6161
"media_character": "UNKNOWN"
6262
}, {
6363
"type": "VIDEO_HD",
64-
"path": "/comet/LE/22/1N/02/PK/11/VIDEO/HD/1479494993512.mp4",
64+
"path": "comet/LE/22/1N/02/PK/11/VIDEO/HD/1479494993512.mp4",
6565
"media_character": "UNKNOWN"
6666
}
6767
]
@@ -94,4 +94,4 @@
9494
}
9595
]
9696
}
97-
}
97+
}

src/api/transforms/__tests__/media_transform_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ test('media_transform: check if media type is video', t => {
3030
test('media_transform: check createVideoItem', t => {
3131
const item = {
3232
type: 'VIDEO_HD',
33-
path: '/comet/LE/22/1N/02/PK/11/VIDEO/LOW_QUALITY/1479494994821.mp4',
33+
path: 'comet/LE/22/1N/02/PK/11/VIDEO/LOW_QUALITY/1479494994821.mp4',
3434
media_character: 'UNKNOWN'
3535
};
3636
const videoItem = createVideoItem(item, 'mosaic02');

src/api/transforms/media_trasform.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const createVideoItem = (item, cdn) => {
3333
return {
3434
type: item.type,
3535
mediaCharacter: item.media_character,
36-
url: `https://${cdn}.ztat.net/vgs${item.path}`
36+
url: `https://${cdn}.ztat.net/vgs/${item.path}`
3737
};
3838
};
3939

0 commit comments

Comments
 (0)