|
@@ -1207,22 +1207,21 @@ export default {
|
|
|
`Successfully added song "${youtubeId}" to private playlist "${playlistId}" for user "${session.userId}".`
|
|
|
);
|
|
|
|
|
|
- if (!isSet && playlist.type !== "user-liked" && playlist.type !== "user-disliked") {
|
|
|
+ if (!isSet && playlist.type === "user" && playlist.privacy === "public") {
|
|
|
const songName = newSong.artists
|
|
|
? `${newSong.title} by ${newSong.artists.join(", ")}`
|
|
|
: newSong.title;
|
|
|
|
|
|
- if (playlist.privacy === "public")
|
|
|
- ActivitiesModule.runJob("ADD_ACTIVITY", {
|
|
|
- userId: session.userId,
|
|
|
- type: "playlist__add_song",
|
|
|
- payload: {
|
|
|
- message: `Added <youtubeId>${songName}</youtubeId> to playlist <playlistId>${playlist.displayName}</playlistId>`,
|
|
|
- thumbnail: newSong.thumbnail,
|
|
|
- playlistId,
|
|
|
- youtubeId
|
|
|
- }
|
|
|
- });
|
|
|
+ ActivitiesModule.runJob("ADD_ACTIVITY", {
|
|
|
+ userId: session.userId,
|
|
|
+ type: "playlist__add_song",
|
|
|
+ payload: {
|
|
|
+ message: `Added <youtubeId>${songName}</youtubeId> to playlist <playlistId>${playlist.displayName}</playlistId>`,
|
|
|
+ thumbnail: newSong.thumbnail,
|
|
|
+ playlistId,
|
|
|
+ youtubeId
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
StationsModule.runJob("GET_STATIONS_THAT_INCLUDE_OR_EXCLUDE_PLAYLIST", { playlistId })
|
|
@@ -1552,11 +1551,7 @@ export default {
|
|
|
const { _id, title, artists, thumbnail } = newSong;
|
|
|
const songName = artists ? `${title} by ${artists.join(", ")}` : title;
|
|
|
|
|
|
- if (
|
|
|
- playlist.type !== "user-liked" &&
|
|
|
- playlist.type !== "user-disliked" &&
|
|
|
- playlist.privacy === "public"
|
|
|
- ) {
|
|
|
+ if (playlist.type === "user" && playlist.privacy === "public") {
|
|
|
ActivitiesModule.runJob("ADD_ACTIVITY", {
|
|
|
userId: session.userId,
|
|
|
type: "playlist__remove_song",
|