]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-video-playlist/video-playlist.model.ts
Merge remote-tracking branch 'weblate/develop' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-video-playlist / video-playlist.model.ts
index 8f63d2abd283381b1e8041cf94ee1dc8d986e0c3..5b6ba9dbf2bc1d089f94d71b2f2c871a2b9ee1e8 100644 (file)
@@ -1,8 +1,8 @@
-import { getAbsoluteAPIUrl } from '@app/helpers'
-import { Actor } from '@app/shared/shared-main'
+import { getAbsoluteAPIUrl, getAbsoluteEmbedUrl } from '@app/helpers'
+import { Account, Actor, VideoChannel } from '@app/shared/shared-main'
+import { peertubeTranslate } from '@shared/core-utils/i18n'
 import {
   AccountSummary,
-  peertubeTranslate,
   VideoChannelSummary,
   VideoConstant,
   VideoPlaylist as ServerVideoPlaylist,
@@ -33,11 +33,12 @@ export class VideoPlaylist implements ServerVideoPlaylist {
 
   thumbnailUrl: string
 
+  embedPath: string
+  embedUrl: string
+
   ownerBy: string
-  ownerAvatarUrl: string
 
   videoChannelBy?: string
-  videoChannelAvatarUrl?: string
 
   private thumbnailVersion: number
   private originThumbnailUrl: string
@@ -63,6 +64,9 @@ export class VideoPlaylist implements ServerVideoPlaylist {
       this.thumbnailUrl = window.location.origin + '/client/assets/images/default-playlist.jpg'
     }
 
+    this.embedPath = hash.embedPath
+    this.embedUrl = getAbsoluteEmbedUrl() + hash.embedPath
+
     this.videosLength = hash.videosLength
 
     this.type = hash.type
@@ -72,12 +76,10 @@ export class VideoPlaylist implements ServerVideoPlaylist {
 
     this.ownerAccount = hash.ownerAccount
     this.ownerBy = Actor.CREATE_BY_STRING(hash.ownerAccount.name, hash.ownerAccount.host)
-    this.ownerAvatarUrl = Actor.GET_ACTOR_AVATAR_URL(this.ownerAccount)
 
     if (hash.videoChannel) {
       this.videoChannel = hash.videoChannel
       this.videoChannelBy = Actor.CREATE_BY_STRING(hash.videoChannel.name, hash.videoChannel.host)
-      this.videoChannelAvatarUrl = Actor.GET_ACTOR_AVATAR_URL(this.videoChannel)
     }
 
     this.privacy.label = peertubeTranslate(this.privacy.label, translations)