aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/video-watch
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-08-25 11:36:23 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-08-25 11:36:23 +0200
commit93e1258c7cbc0d1235ca6d2a1f7c1875985328b8 (patch)
treeb0a1f77af7ab54dc5f58f569fcd1e9d84b04c533 /client/src/app/videos/video-watch
parent69f224587e99d56008e1fa129d0641840a486620 (diff)
downloadPeerTube-93e1258c7cbc0d1235ca6d2a1f7c1875985328b8.tar.gz
PeerTube-93e1258c7cbc0d1235ca6d2a1f7c1875985328b8.tar.zst
PeerTube-93e1258c7cbc0d1235ca6d2a1f7c1875985328b8.zip
Move video file metadata in their own table
Will be used for user video quotas and multiple video resolutions
Diffstat (limited to 'client/src/app/videos/video-watch')
-rw-r--r--client/src/app/videos/video-watch/video-magnet.component.html2
-rw-r--r--client/src/app/videos/video-watch/video-watch.component.ts10
2 files changed, 6 insertions, 6 deletions
diff --git a/client/src/app/videos/video-watch/video-magnet.component.html b/client/src/app/videos/video-watch/video-magnet.component.html
index 3fa82f1be..5b0324e37 100644
--- a/client/src/app/videos/video-watch/video-magnet.component.html
+++ b/client/src/app/videos/video-watch/video-magnet.component.html
@@ -10,7 +10,7 @@
10 </div> 10 </div>
11 11
12 <div class="modal-body"> 12 <div class="modal-body">
13 <input #magnetUriInput (click)="magnetUriInput.select()" type="text" class="form-control input-sm readonly" readonly [value]="video.magnetUri" /> 13 <input #magnetUriInput (click)="magnetUriInput.select()" type="text" class="form-control input-sm readonly" readonly [value]="video.getDefaultMagnetUri()" />
14 </div> 14 </div>
15 </div> 15 </div>
16 </div> 16 </div>
diff --git a/client/src/app/videos/video-watch/video-watch.component.ts b/client/src/app/videos/video-watch/video-watch.component.ts
index cd11aa33c..255757692 100644
--- a/client/src/app/videos/video-watch/video-watch.component.ts
+++ b/client/src/app/videos/video-watch/video-watch.component.ts
@@ -90,8 +90,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
90 window.clearInterval(this.torrentInfosInterval) 90 window.clearInterval(this.torrentInfosInterval)
91 window.clearTimeout(this.errorTimer) 91 window.clearTimeout(this.errorTimer)
92 92
93 if (this.video !== null && this.webTorrentService.has(this.video.magnetUri)) { 93 if (this.video !== null && this.webTorrentService.has(this.video.getDefaultMagnetUri())) {
94 this.webTorrentService.remove(this.video.magnetUri) 94 this.webTorrentService.remove(this.video.getDefaultMagnetUri())
95 } 95 }
96 96
97 // Remove player 97 // Remove player
@@ -108,13 +108,13 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
108 // We are loading the video 108 // We are loading the video
109 this.loading = true 109 this.loading = true
110 110
111 console.log('Adding ' + this.video.magnetUri + '.') 111 console.log('Adding ' + this.video.getDefaultMagnetUri() + '.')
112 112
113 // The callback might never return if there are network issues 113 // The callback might never return if there are network issues
114 // So we create a timer to inform the user the load is abnormally long 114 // So we create a timer to inform the user the load is abnormally long
115 this.errorTimer = window.setTimeout(() => this.loadTooLong(), VideoWatchComponent.LOADTIME_TOO_LONG) 115 this.errorTimer = window.setTimeout(() => this.loadTooLong(), VideoWatchComponent.LOADTIME_TOO_LONG)
116 116
117 const torrent = this.webTorrentService.add(this.video.magnetUri, torrent => { 117 const torrent = this.webTorrentService.add(this.video.getDefaultMagnetUri(), torrent => {
118 // Clear the error timer 118 // Clear the error timer
119 window.clearTimeout(this.errorTimer) 119 window.clearTimeout(this.errorTimer)
120 // Maybe the error was fired by the timer, so reset it 120 // Maybe the error was fired by the timer, so reset it
@@ -123,7 +123,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
123 // We are not loading the video anymore 123 // We are not loading the video anymore
124 this.loading = false 124 this.loading = false
125 125
126 console.log('Added ' + this.video.magnetUri + '.') 126 console.log('Added ' + this.video.getDefaultMagnetUri() + '.')
127 torrent.files[0].renderTo(this.playerElement, (err) => { 127 torrent.files[0].renderTo(this.playerElement, (err) => {
128 if (err) { 128 if (err) {
129 this.notificationsService.error('Error', 'Cannot append the file in the video element.') 129 this.notificationsService.error('Error', 'Cannot append the file in the video element.')