aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-02-15 13:50:40 +0100
committerChocobozzz <me@florianbigard.com>2023-02-15 13:50:40 +0100
commit343d1395df2e07ea9eb3540724c9fd689e617cb8 (patch)
treeacd553f76c1daab05f4cf44c66234467c5ea9b36 /client/src/app/shared/shared-main
parent72c98d189ef7b18264a7f715d7a58910eba29a1c (diff)
downloadPeerTube-343d1395df2e07ea9eb3540724c9fd689e617cb8.tar.gz
PeerTube-343d1395df2e07ea9eb3540724c9fd689e617cb8.tar.zst
PeerTube-343d1395df2e07ea9eb3540724c9fd689e617cb8.zip
Prefer displaying channel for playlist element
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r--client/src/app/shared/shared-main/video/video.service.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-main/video/video.service.ts b/client/src/app/shared/shared-main/video/video.service.ts
index 8c8b1e08f..152149827 100644
--- a/client/src/app/shared/shared-main/video/video.service.ts
+++ b/client/src/app/shared/shared-main/video/video.service.ts
@@ -420,6 +420,24 @@ export class VideoService {
420 : 'both' 420 : 'both'
421 } 421 }
422 422
423 // Choose if we display by default the account or the channel
424 buildDefaultOwnerDisplayType (video: Video) {
425 const accountName = video.account.name
426
427 // If the video channel name is an UUID (not really displayable, we changed this behaviour in v1.0.0-beta.12)
428 // Or has not been customized (default created channel display name)
429 // -> Use the account name
430 if (
431 video.channel.displayName === `Default ${accountName} channel` ||
432 video.channel.displayName === `Main ${accountName} channel` ||
433 video.channel.name.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/)
434 ) {
435 return 'account' as 'account'
436 }
437
438 return 'videoChannel' as 'videoChannel'
439 }
440
423 buildCommonVideosParams (options: CommonVideoParams & { params: HttpParams }) { 441 buildCommonVideosParams (options: CommonVideoParams & { params: HttpParams }) {
424 const { 442 const {
425 params, 443 params,