X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Bmy-library%2Fmy-videos%2Fmy-videos.component.ts;h=b618b3f8823c3e1d79b82507459a38eec80d639b;hb=54909304287f3c04dcfb39660be8ead57dc95440;hp=f5262da86216296d31ac9413057f62740c6209d7;hpb=38a3ccc7f8ad0ea94362b58c732af7c387ab46be;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+my-library/my-videos/my-videos.component.ts b/client/src/app/+my-library/my-videos/my-videos.component.ts index f5262da86..b618b3f88 100644 --- a/client/src/app/+my-library/my-videos/my-videos.component.ts +++ b/client/src/app/+my-library/my-videos/my-videos.component.ts @@ -1,4 +1,4 @@ -import { uniqBy } from 'lodash' +import { uniqBy } from 'lodash-es' import { concat, Observable } from 'rxjs' import { tap, toArray } from 'rxjs/operators' import { Component, OnInit, ViewChild } from '@angular/core' @@ -108,7 +108,7 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook { const channelFilters = this.userChannels.map(c => { return { value: 'channel:' + c.name, - label: c.name + label: c.displayName } }) @@ -171,15 +171,15 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook { .subscribe(result => { this.videosContainedInPlaylists = Object.keys(result).reduce((acc, videoId) => ({ ...acc, - [videoId]: uniqBy(result[videoId], (p: VideoExistInPlaylist) => p.playlistId) + [videoId]: uniqBy(result[+videoId], (p: VideoExistInPlaylist) => p.playlistId) }), this.videosContainedInPlaylists) }) } async deleteSelectedVideos () { - const toDeleteVideosIds = Object.keys(this.selection) - .filter(k => this.selection[k] === true) - .map(k => parseInt(k, 10)) + const toDeleteVideosIds = Object.entries(this.selection) + .filter(([ _k, v ]) => v === true) + .map(([ k, _v ]) => parseInt(k, 10)) const res = await this.confirmService.confirm( prepareIcu($localize`Do you really want to delete {length, plural, =1 {this video} other {{length} videos}}?`)(