Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Remove unused code

Chocobozzz28541daa1345
diff --git a/client/src/app/shared/shared-main/video/video.model.ts b/client/src/app/shared/shared-main/video/video.model.ts
index 8379a13cea..87ebe9f765 100644
--- a/client/src/app/shared/shared-main/video/video.model.ts
+++ b/client/src/app/shared/shared-main/video/video.model.ts
@@ -51,10 +51,11 @@ export class Video implements VideoServerModel {
name: string
serverHost: string
- thumbnailPath: string
- thumbnailUrl: string
- previewPath: string
- previewUrl: string
+ thumbnailPath: never
+ thumbnailUrl: never
+ previewPath: never
+ previewUrl: never
+
thumbnails: Thumbnail[]
aspectRatio: number
@@ -158,8 +159,6 @@ export class Video implements VideoServerModel {
? hash.liveSchedules.map(schedule => ({ startAt: new Date(schedule.startAt.toString()) }))
: null
- // Required for search index backward compatibility, as `thumbnails` was introduced in peertube 8.1
- this.thumbnailUrl = hash.thumbnailUrl
this.thumbnails = hash.thumbnails
this.duration = hash.duration
diff --git a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts
index 66f74f7c93..a1c632d2ee 100644
--- a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts
+++ b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts
@@ -19,7 +19,6 @@ export type VideoThumbnailInput = Pick<
| 'userHistory'
| 'originallyPublishedAt'
| 'liveSchedules'
- | 'thumbnailUrl'
>
@Component({
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist.model.ts b/client/src/app/shared/shared-video-playlist/video-playlist.model.ts
index 383bcca515..37099acb7e 100644
--- a/client/src/app/shared/shared-video-playlist/video-playlist.model.ts
+++ b/client/src/app/shared/shared-video-playlist/video-playlist.model.ts
@@ -40,8 +40,8 @@ export class VideoPlaylist implements ServerVideoPlaylist {
thumbnails: Thumbnail[]
- thumbnailPath: string
- thumbnailUrl: string
+ thumbnailPath: never
+ thumbnailUrl: never
embedPath: string
embedUrl: string
@@ -74,8 +74,6 @@ export class VideoPlaylist implements ServerVideoPlaylist {
this.type = hash.type
- // Required for search index backward compatibility, as `thumbnails` was introduced in peertube 8.1
- this.thumbnailUrl = hash.thumbnailUrl
this.thumbnails = hash.thumbnails
this.createdAt = new Date(hash.createdAt)
@@ -101,10 +99,6 @@ export class VideoPlaylist implements ServerVideoPlaylist {
getThumbnailUrl (width: number) {
const defaultUrl = getAPIUrl() + '/client/assets/images/default-playlist.jpg'
- if (!this.thumbnails) {
- return this.thumbnailUrl || defaultUrl
- }
-
return findAppropriateThumbnailFileUrl(this.thumbnails, width, '16:9') || defaultUrl
}
}