Fixed video request

pull/57/head v4.1.4
Jesús María 4 years ago
parent 033b35aee9
commit 6912a2eddd

@ -1,4 +1,4 @@
# **Aruppi API** (v4.1.3)
# **Aruppi API** (v4.1.4)
> This API has everything about Japan, from anime, music, radio, images, videos ... to japanese culture
>

@ -1,6 +1,6 @@
{
"name": "aruppi",
"version": "4.1.3",
"version": "4.1.4",
"description": "Aruppi is a custom API to obtain data from the Japanese culture for the mobile app",
"main": "./src/api/api.ts",
"scripts": {

@ -339,7 +339,7 @@ export default class UtilsController {
if (redisClient.connected) {
const resultQueryRedis: any = redisClient.get(
`playlist_videos_${hashStringMd5(playlistId)}`,
`videos_${hashStringMd5(playlistId)}`,
);
if (resultQueryRedis) {
@ -371,14 +371,14 @@ export default class UtilsController {
/!* Set the key in the redis cache. *!/
redisClient.set(
`playlist_videos_${hashStringMd5(playlistId)}`,
`videos_${hashStringMd5(playlistId)}`,
JSON.stringify({ videos: results }),
);
/!* After 24hrs expire the key. *!/
redisClient.expireat(
`playlist_videos_${hashStringMd5(playlistId)}`,
`videos_${hashStringMd5(playlistId)}`,
parseInt(`${+new Date() / 1000}`, 10) + 7200,
);
}

@ -26,7 +26,7 @@ routes.get('/api/v4/', (req: Request, res: Response) => {
res.json({
message: 'Aruppi /api - 🎏',
author: 'Jéluchu',
version: '4.1.2',
version: '4.1.4',
credits: 'The bitch loves /apis that offers data to Aruppi App',
entries: [
{

Loading…
Cancel
Save