]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+videos/+video-watch/video-watch-playlist.component.ts
Merge remote-tracking branch 'weblate/develop' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-watch / video-watch-playlist.component.ts
index a70167da519e8642b3eabb3ef7ae0a23f8800ef7..0a4d6bfd11c66d2dd6a9e0852a28a182b332e167 100644 (file)
@@ -118,6 +118,9 @@ export class VideoWatchPlaylistComponent {
   updatePlaylistIndex (position: number) {
     if (this.playlistElements.length === 0 || !position) return
 
+    // Handle the reverse index
+    if (position < 0) position = this.playlist.videosLength + position + 1
+
     for (const playlistElement of this.playlistElements) {
       // >= if the previous videos were not valid
       if (playlistElement.video && playlistElement.position >= position) {