aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/redundancy/video-redundancy.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-26 10:00:12 +0200
committerChocobozzz <me@florianbigard.com>2021-08-26 10:01:42 +0200
commit7b6cf83e33c1cf9719f77338288b9145b8cdcf60 (patch)
tree6c3b213aca2cc298f4dbd70d1fb87bbe37154e15 /server/models/redundancy/video-redundancy.ts
parent5a298a5a3d000f94c944d3711d4b0226a888df04 (diff)
downloadPeerTube-7b6cf83e33c1cf9719f77338288b9145b8cdcf60.tar.gz
PeerTube-7b6cf83e33c1cf9719f77338288b9145b8cdcf60.tar.zst
PeerTube-7b6cf83e33c1cf9719f77338288b9145b8cdcf60.zip
Fix redundancy remove on host redundancy update
Diffstat (limited to 'server/models/redundancy/video-redundancy.ts')
-rw-r--r--server/models/redundancy/video-redundancy.ts24
1 files changed, 21 insertions, 3 deletions
diff --git a/server/models/redundancy/video-redundancy.ts b/server/models/redundancy/video-redundancy.ts
index d645be248..44c17f8e5 100644
--- a/server/models/redundancy/video-redundancy.ts
+++ b/server/models/redundancy/video-redundancy.ts
@@ -470,16 +470,34 @@ export class VideoRedundancyModel extends Model<Partial<AttributesOnly<VideoRedu
470 470
471 const query = { 471 const query = {
472 where: { 472 where: {
473 actorId: actor.id 473 [Op.and]: [
474 {
475 actorId: actor.id
476 },
477 {
478 [Op.or]: [
479 {
480 '$VideoStreamingPlaylist.id$': {
481 [Op.ne]: null
482 }
483 },
484 {
485 '$VideoFile.id$': {
486 [Op.ne]: null
487 }
488 }
489 ]
490 }
491 ]
474 }, 492 },
475 include: [ 493 include: [
476 { 494 {
477 model: VideoFileModel, 495 model: VideoFileModel.unscoped(),
478 required: false, 496 required: false,
479 include: [ buildVideoInclude() ] 497 include: [ buildVideoInclude() ]
480 }, 498 },
481 { 499 {
482 model: VideoStreamingPlaylistModel, 500 model: VideoStreamingPlaylistModel.unscoped(),
483 required: false, 501 required: false,
484 include: [ buildVideoInclude() ] 502 include: [ buildVideoInclude() ]
485 } 503 }