mirror of
https://github.com/TeamPiped/Piped-Backend
synced 2025-09-05 21:11:05 +02:00
Fix cloning of playlist with duplicate videos.
This commit is contained in:
parent
5fd274bc87
commit
30a7b43c5e
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user