|
@@ -244,9 +244,12 @@ CacheModule.runJob("SUB", {
|
|
const newPlaylist = {
|
|
const newPlaylist = {
|
|
...playlist._doc,
|
|
...playlist._doc,
|
|
songsCount: playlist.songs.length,
|
|
songsCount: playlist.songs.length,
|
|
- songsLength: playlist.songs.reduce((previous, current) => ({
|
|
|
|
- duration: previous.duration + current.duration
|
|
|
|
- })).duration
|
|
|
|
|
|
+ songsLength: playlist.songs.reduce(
|
|
|
|
+ (previous, current) => ({
|
|
|
|
+ duration: previous.duration + current.duration
|
|
|
|
+ }),
|
|
|
|
+ { duration: 0 }
|
|
|
|
+ ).duration
|
|
};
|
|
};
|
|
delete newPlaylist.songs;
|
|
delete newPlaylist.songs;
|
|
WSModule.runJob("EMIT_TO_ROOMS", {
|
|
WSModule.runJob("EMIT_TO_ROOMS", {
|