Merge pull request #329 from TeamPiped/playlist-clone-duplicate

Playlist clone duplicate
This commit is contained in:
Kavin 2022-08-03 21:13:48 +05:30 committed by GitHub
commit d4537c4192
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1390,7 +1390,7 @@ public class ResponseHelper {
var channel = channelMap.get(channelId);
playlist.getVideos().add(videoMap.getOrDefault(videoId, new PlaylistVideo(videoId, video.getName(), video.getThumbnailUrl(), video.getDuration(), channel)));
playlist.getVideos().add(videoMap.computeIfAbsent(videoId, (key) -> new PlaylistVideo(videoId, video.getName(), video.getThumbnailUrl(), video.getDuration(), channel)));
});
var tr = s.beginTransaction();