diff options
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/users/my-video-playlists.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/controllers/api/users/my-video-playlists.ts b/server/controllers/api/users/my-video-playlists.ts index f55ea2ec4..715717610 100644 --- a/server/controllers/api/users/my-video-playlists.ts +++ b/server/controllers/api/users/my-video-playlists.ts | |||
@@ -1,3 +1,4 @@ | |||
1 | import { uuidToShort } from '@shared/extra-utils' | ||
1 | import express from 'express' | 2 | import express from 'express' |
2 | import { VideosExistInPlaylists } from '../../../../shared/models/videos/playlist/video-exist-in-playlist.model' | 3 | import { VideosExistInPlaylists } from '../../../../shared/models/videos/playlist/video-exist-in-playlist.model' |
3 | import { asyncMiddleware, authenticate } from '../../../middlewares' | 4 | import { asyncMiddleware, authenticate } from '../../../middlewares' |
@@ -24,7 +25,7 @@ async function doVideosInPlaylistExist (req: express.Request, res: express.Respo | |||
24 | const videoIds = req.query.videoIds.map(i => parseInt(i + '', 10)) | 25 | const videoIds = req.query.videoIds.map(i => parseInt(i + '', 10)) |
25 | const user = res.locals.oauth.token.User | 26 | const user = res.locals.oauth.token.User |
26 | 27 | ||
27 | const results = await VideoPlaylistModel.listPlaylistIdsOf(user.Account.id, videoIds) | 28 | const results = await VideoPlaylistModel.listPlaylistSummariesOf(user.Account.id, videoIds) |
28 | 29 | ||
29 | const existObject: VideosExistInPlaylists = {} | 30 | const existObject: VideosExistInPlaylists = {} |
30 | 31 | ||
@@ -37,6 +38,8 @@ async function doVideosInPlaylistExist (req: express.Request, res: express.Respo | |||
37 | existObject[element.videoId].push({ | 38 | existObject[element.videoId].push({ |
38 | playlistElementId: element.id, | 39 | playlistElementId: element.id, |
39 | playlistId: result.id, | 40 | playlistId: result.id, |
41 | playlistDisplayName: result.name, | ||
42 | playlistShortUUID: uuidToShort(result.uuid), | ||
40 | startTimestamp: element.startTimestamp, | 43 | startTimestamp: element.startTimestamp, |
41 | stopTimestamp: element.stopTimestamp | 44 | stopTimestamp: element.stopTimestamp |
42 | }) | 45 | }) |