Fix live badge in videos list

This commit is contained in:
Chocobozzz 2020-12-16 14:19:43 +01:00
parent ddca257699
commit 1ab6024345
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 17 additions and 0 deletions

View File

@ -1602,6 +1602,7 @@ export class VideoModel extends Model {
'likes',
'dislikes',
'remote',
'isLive',
'url',
'commentsEnabled',
'downloadEnabled',

View File

@ -116,6 +116,8 @@ describe('Test live', function () {
expect(video.channel.name).to.equal(servers[0].videoChannel.name)
expect(video.channel.host).to.equal(servers[0].videoChannel.host)
expect(video.isLive).to.be.true
expect(video.nsfw).to.be.false
expect(video.waitTranscoding).to.be.false
expect(video.name).to.equal('my super live')
@ -269,6 +271,20 @@ describe('Test live', function () {
await testFfmpegStreamError(command, false)
})
it('Should list this live now someone stream into it', async function () {
for (const server of servers) {
const res = await getVideosList(server.url)
expect(res.body.total).to.equal(1)
expect(res.body.data).to.have.lengthOf(1)
const video: Video = res.body.data[0]
expect(video.name).to.equal('user live')
expect(video.isLive).to.be.true
}
})
it('Should not allow a stream on a live that was blacklisted', async function () {
this.timeout(30000)