projects
/
oweals
/
peertube.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Litte SQL optimzation in videos list
[oweals/peertube.git]
/
server
/
lib
/
videos.ts
1
import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo } from '@server/typings/models'
2
3
function extractVideo (videoOrPlaylist: MVideo | MStreamingPlaylistVideo) {
4
return isStreamingPlaylist(videoOrPlaylist)
5
? videoOrPlaylist.Video
6
: videoOrPlaylist
7
}
8
9
export {
10
extractVideo
11
}