diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.html b/client/src/app/shared/shared-video-miniature/video-miniature.component.html
index f51c298f2..b12495f90 100644
--- a/client/src/app/shared/shared-video-miniature/video-miniature.component.html
+++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.html
@@ -39,10 +39,10 @@
- {{ video.byAccount }}
+ {{ authorAccount }}
- {{ video.byVideoChannel }}
+ {{ authorChannel }}
diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
index cb81ba3bd..69f00fb10 100644
--- a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
+++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
@@ -100,6 +100,14 @@ export class VideoMiniatureComponent implements OnInit {
@Inject(LOCALE_ID) private localeId: string
) {}
+ get authorAccount () {
+ return this.serverConfig.client.videos.miniature.showAuthorDisplayName ? this.video.account.displayName : this.video.byAccount
+ }
+
+ get authorChannel () {
+ return this.serverConfig.client.videos.miniature.showAuthorDisplayName ? this.video.channel.displayName : this.video.byVideoChannel
+ }
+
get isVideoBlur () {
return this.video.isVideoNSFWForUser(this.user, this.serverConfig)
}
diff --git a/config/default.yaml b/config/default.yaml
index 707187b7c..dec34affd 100644
--- a/config/default.yaml
+++ b/config/default.yaml
@@ -75,6 +75,11 @@ email:
subject:
prefix: "[PeerTube]"
+client:
+ videos:
+ miniature:
+ show_author_display_name: false
+
# From the project root directory
storage:
tmp: 'storage/tmp/' # Use to download data (imports etc), store uploaded files before and during processing...
diff --git a/config/production.yaml.example b/config/production.yaml.example
index e405daa71..a55c99eaa 100644
--- a/config/production.yaml.example
+++ b/config/production.yaml.example
@@ -73,6 +73,11 @@ email:
subject:
prefix: "[PeerTube]"
+client:
+ videos:
+ miniature:
+ show_author_display_name: false
+
# From the project root directory
storage:
tmp: '/var/www/peertube/storage/tmp/' # Use to download data (imports etc), store uploaded files before and during processing...
diff --git a/server/initializers/config.ts b/server/initializers/config.ts
index b2a8e9e19..5ee08cf12 100644
--- a/server/initializers/config.ts
+++ b/server/initializers/config.ts
@@ -58,6 +58,15 @@ const CONFIG = {
PREFIX: config.get('email.subject.prefix') + ' '
}
},
+
+ CLIENT: {
+ VIDEOS: {
+ MINIATURE: {
+ get SHOW_AUTHOR_DISPLAY_NAME () { return config.get('client.videos.miniature.show_author_display_name') }
+ }
+ }
+ },
+
STORAGE: {
TMP_DIR: buildPath(config.get('storage.tmp')),
ACTOR_IMAGES: buildPath(config.get('storage.avatars')),
diff --git a/server/lib/server-config-manager.ts b/server/lib/server-config-manager.ts
index 358f47133..72fcf54cd 100644
--- a/server/lib/server-config-manager.ts
+++ b/server/lib/server-config-manager.ts
@@ -43,6 +43,13 @@ class ServerConfigManager {
return {
allowEdits: CONFIG.WEBADMIN.CONFIGURATION.EDITS.ALLOWED,
+ client: {
+ videos: {
+ miniature: {
+ showAuthorDisplayName: CONFIG.CLIENT.VIDEOS.MINIATURE.SHOW_AUTHOR_DISPLAY_NAME
+ }
+ }
+ },
instance: {
name: CONFIG.INSTANCE.NAME,
shortDescription: CONFIG.INSTANCE.SHORT_DESCRIPTION,
diff --git a/shared/models/server/server-config.model.ts b/shared/models/server/server-config.model.ts
index 3b026e3a5..df9380844 100644
--- a/shared/models/server/server-config.model.ts
+++ b/shared/models/server/server-config.model.ts
@@ -34,6 +34,14 @@ export interface ServerConfig {
serverVersion: string
serverCommit?: string
+ client: {
+ videos: {
+ miniature: {
+ showAuthorDisplayName: boolean
+ }
+ }
+ }
+
instance: {
name: string
shortDescription: string