1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Basic video redundancy implementation

This commit is contained in:
Chocobozzz 2018-09-11 16:27:07 +02:00
parent a651038487
commit c48e82b5e0
77 changed files with 1667 additions and 287 deletions

View file

@ -76,7 +76,13 @@ export const unusedActorAttributesForAPI = [
},
{
model: () => VideoChannelModel.unscoped(),
required: false
required: false,
include: [
{
model: () => AccountModel,
required: true
}
]
},
{
model: () => ServerModel,
@ -337,6 +343,7 @@ export class ActorModel extends Model<ActorModel> {
uuid: this.uuid,
name: this.preferredUsername,
host: this.getHost(),
hostRedundancyAllowed: this.getRedundancyAllowed(),
followingCount: this.followingCount,
followersCount: this.followersCount,
avatar,
@ -440,6 +447,10 @@ export class ActorModel extends Model<ActorModel> {
return this.Server ? this.Server.host : CONFIG.WEBSERVER.HOST
}
getRedundancyAllowed () {
return this.Server ? this.Server.redundancyAllowed : false
}
getAvatarUrl () {
if (!this.avatarId) return undefined