aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos')
-rw-r--r--client/src/app/videos/shared/video.model.ts21
-rw-r--r--client/src/app/videos/video-watch/video-watch.component.html2
2 files changed, 7 insertions, 16 deletions
diff --git a/client/src/app/videos/shared/video.model.ts b/client/src/app/videos/shared/video.model.ts
index 873c83ff1..b51a0e9de 100644
--- a/client/src/app/videos/shared/video.model.ts
+++ b/client/src/app/videos/shared/video.model.ts
@@ -8,21 +8,12 @@ export class Video {
8 isLocal: boolean; 8 isLocal: boolean;
9 magnetUri: string; 9 magnetUri: string;
10 name: string; 10 name: string;
11 podUrl: string; 11 podHost: string;
12 tags: string[]; 12 tags: string[];
13 thumbnailPath: string; 13 thumbnailPath: string;
14 14
15 private static createByString(author: string, podUrl: string) { 15 private static createByString(author: string, podHost: string) {
16 let [ host, port ] = podUrl.replace(/^https?:\/\//, '').split(':'); 16 return author + '@' + podHost;
17
18 if (port === '80' || port === '443') {
19 port = '';
20 } else {
21 port = ':' + port;
22 }
23
24
25 return author + '@' + host + port;
26 } 17 }
27 18
28 private static createDurationString(duration: number) { 19 private static createDurationString(duration: number) {
@@ -43,7 +34,7 @@ export class Video {
43 isLocal: boolean, 34 isLocal: boolean,
44 magnetUri: string, 35 magnetUri: string,
45 name: string, 36 name: string,
46 podUrl: string, 37 podHost: string,
47 tags: string[], 38 tags: string[],
48 thumbnailPath: string 39 thumbnailPath: string
49 }) { 40 }) {
@@ -55,11 +46,11 @@ export class Video {
55 this.isLocal = hash.isLocal; 46 this.isLocal = hash.isLocal;
56 this.magnetUri = hash.magnetUri; 47 this.magnetUri = hash.magnetUri;
57 this.name = hash.name; 48 this.name = hash.name;
58 this.podUrl = hash.podUrl; 49 this.podHost = hash.podHost;
59 this.tags = hash.tags; 50 this.tags = hash.tags;
60 this.thumbnailPath = hash.thumbnailPath; 51 this.thumbnailPath = hash.thumbnailPath;
61 52
62 this.by = Video.createByString(hash.author, hash.podUrl); 53 this.by = Video.createByString(hash.author, hash.podHost);
63 } 54 }
64 55
65 isRemovableBy(user) { 56 isRemovableBy(user) {
diff --git a/client/src/app/videos/video-watch/video-watch.component.html b/client/src/app/videos/video-watch/video-watch.component.html
index f3a416367..cb91bae7e 100644
--- a/client/src/app/videos/video-watch/video-watch.component.html
+++ b/client/src/app/videos/video-watch/video-watch.component.html
@@ -2,7 +2,7 @@
2 <div class="alert alert-danger"> 2 <div class="alert alert-danger">
3 The video load seems to be abnormally long. 3 The video load seems to be abnormally long.
4 <ul> 4 <ul>
5 <li>Maybe the server {{ video.podUrl }} is down :(</li> 5 <li>Maybe the server {{ video.podHost }} is down :(</li>
6 <li> 6 <li>
7 If not, you can report an issue on 7 If not, you can report an issue on
8 <a href="https://github.com/Chocobozzz/PeerTube/issues" title="Report an issue"> 8 <a href="https://github.com/Chocobozzz/PeerTube/issues" title="Report an issue">