Browse Source

refactor: Station excludedPlaylists now blacklist

Owen Diffey 3 years ago
parent
commit
1344fadaa8

+ 2 - 2
backend/logic/actions/playlists.js

@@ -1224,7 +1224,7 @@ export default {
 					});
 				}
 
-				StationsModule.runJob("GET_STATIONS_THAT_INCLUDE_OR_EXCLUDE_PLAYLIST", { playlistId })
+				StationsModule.runJob("GET_STATIONS_THAT_INCLUDE_OR_BLACKLIST_PLAYLIST", { playlistId })
 					.then(response => {
 						response.stationIds.forEach(stationId => {
 							PlaylistsModule.runJob("AUTOFILL_STATION_PLAYLIST", { stationId }).then().catch();
@@ -1509,7 +1509,7 @@ export default {
 				},
 
 				(playlist, next) => {
-					StationsModule.runJob("GET_STATIONS_THAT_INCLUDE_OR_EXCLUDE_PLAYLIST", { playlistId })
+					StationsModule.runJob("GET_STATIONS_THAT_INCLUDE_OR_BLACKLIST_PLAYLIST", { playlistId })
 						.then(response => {
 							response.stationIds.forEach(stationId => {
 								PlaylistsModule.runJob("AUTOFILL_STATION_PLAYLIST", { stationId }).then().catch();

+ 65 - 59
backend/logic/actions/stations.js

@@ -160,14 +160,14 @@ CacheModule.runJob("SUB", {
 });
 
 CacheModule.runJob("SUB", {
-	channel: "station.excludedPlaylist",
+	channel: "station.blacklistedPlaylist",
 	cb: data => {
 		const { stationId, playlistId } = data;
 
 		PlaylistsModule.runJob("GET_PLAYLIST", { playlistId }).then(playlist =>
 			WSModule.runJob("EMIT_TO_ROOMS", {
 				rooms: [`station.${stationId}`, `manage-station.${stationId}`],
-				args: ["event:station.excludedPlaylist", { data: { stationId, playlist } }]
+				args: ["event:station.blacklistedPlaylist", { data: { stationId, playlist } }]
 			})
 		);
 	}
@@ -185,12 +185,12 @@ CacheModule.runJob("SUB", {
 });
 
 CacheModule.runJob("SUB", {
-	channel: "station.removedExcludedPlaylist",
+	channel: "station.removedBlacklistedPlaylist",
 	cb: data => {
 		const { stationId, playlistId } = data;
 		WSModule.runJob("EMIT_TO_ROOMS", {
 			rooms: [`station.${stationId}`, `manage-station.${stationId}`],
-			args: ["event:station.removedExcludedPlaylist", { data: { stationId, playlistId } }]
+			args: ["event:station.removedBlacklistedPlaylist", { data: { stationId, playlistId } }]
 		});
 	}
 });
@@ -1009,7 +1009,7 @@ export default {
 						playMode: station.playMode,
 						owner: station.owner,
 						includedPlaylists: station.includedPlaylists,
-						excludedPlaylists: station.excludedPlaylists,
+						blacklist: station.blacklist,
 						theme: station.theme
 					};
 
@@ -1227,7 +1227,7 @@ export default {
 		);
 	},
 
-	getStationExcludedPlaylistsById(session, stationId, cb) {
+	getStationBlacklistById(session, stationId, cb) {
 		async.waterfall(
 			[
 				next => {
@@ -1259,7 +1259,7 @@ export default {
 					const playlists = [];
 
 					async.eachLimit(
-						station.excludedPlaylists,
+						station.blacklist,
 						1,
 						(playlistId, next) => {
 							PlaylistsModule.runJob("GET_PLAYLIST", { playlistId }, this)
@@ -1283,15 +1283,15 @@ export default {
 					err = await UtilsModule.runJob("GET_ERROR", { error: err }, this);
 					this.log(
 						"ERROR",
-						"GET_STATION_EXCLUDED_PLAYLISTS_BY_ID",
-						`Getting station "${stationId}"'s excluded playlists failed. "${err}"`
+						"GET_STATION_BLACKLIST_BY_ID",
+						`Getting station "${stationId}"'s blacklist failed. "${err}"`
 					);
 					return cb({ status: "error", message: err });
 				}
 				this.log(
 					"SUCCESS",
-					"GET_STATION_EXCLUDED_PLAYLISTS_BY_ID",
-					`Got station "${stationId}"'s excluded playlists successfully.`
+					"GET_STATION_BLACKLIST_BY_ID",
+					`Got station "${stationId}"'s blacklist successfully.`
 				);
 				return cb({ status: "success", data: { playlists } });
 			}
@@ -1927,19 +1927,19 @@ export default {
 				},
 
 				(station, playlists, next) => {
-					const playlistsToRemoveFromExcluded = playlists.filter(
-						playlistId => station.excludedPlaylists.indexOf(playlistId) !== -1
+					const playlistsToRemoveFromBlacklist = playlists.filter(
+						playlistId => station.blacklist.indexOf(playlistId) !== -1
 					);
 					console.log(
-						`playlistsToRemoveFromExcluded: ${playlistsToRemoveFromExcluded.length}`,
-						playlistsToRemoveFromExcluded
+						`playlistsToRemoveFromBlacklist: ${playlistsToRemoveFromBlacklist.length}`,
+						playlistsToRemoveFromBlacklist
 					);
 
 					async.eachLimit(
-						playlistsToRemoveFromExcluded,
+						playlistsToRemoveFromBlacklist,
 						1,
 						(playlistId, next) => {
-							StationsModule.runJob("REMOVE_EXCLUDED_PLAYLIST", { stationId, playlistId }, this)
+							StationsModule.runJob("REMOVE_BLACKLISTED_PLAYLIST", { stationId, playlistId }, this)
 								.then(() => {
 									next();
 								})
@@ -2133,19 +2133,19 @@ export default {
 				},
 
 				(station, playlists, next) => {
-					const playlistsToRemoveFromExcluded = station.excludedPlaylists.filter(
+					const playlistsToRemoveFromBlacklist = station.blacklist.filter(
 						playlistId => playlists.indexOf(playlistId) === -1
 					);
 					console.log(
-						`playlistsToRemoveFromExcluded: ${playlistsToRemoveFromExcluded.length}`,
-						playlistsToRemoveFromExcluded
+						`playlistsToRemoveFromBlacklist: ${playlistsToRemoveFromBlacklist.length}`,
+						playlistsToRemoveFromBlacklist
 					);
 
 					async.eachLimit(
-						playlistsToRemoveFromExcluded,
+						playlistsToRemoveFromBlacklist,
 						1,
 						(playlistId, next) => {
-							StationsModule.runJob("REMOVE_EXCLUDED_PLAYLIST", { stationId, playlistId }, this)
+							StationsModule.runJob("REMOVE_BLACKLISTED_PLAYLIST", { stationId, playlistId }, this)
 								.then(() => {
 									next();
 								})
@@ -2158,19 +2158,19 @@ export default {
 				},
 
 				(station, playlists, next) => {
-					const playlistsToAddToExcluded = playlists.filter(
-						playlistId => station.excludedPlaylists.indexOf(playlistId) === -1
+					const playlistsToAddToBlacklist = playlists.filter(
+						playlistId => station.blacklist.indexOf(playlistId) === -1
 					);
 					console.log(
-						`playlistsToAddToExcluded: ${playlistsToAddToExcluded.length}`,
-						playlistsToAddToExcluded
+						`playlistsToAddToBlacklist: ${playlistsToAddToBlacklist.length}`,
+						playlistsToAddToBlacklist
 					);
 
 					async.eachLimit(
-						playlistsToAddToExcluded,
+						playlistsToAddToBlacklist,
 						1,
 						(playlistId, next) => {
-							StationsModule.runJob("EXCLUDE_PLAYLIST", { stationId, playlistId }, this)
+							StationsModule.runJob("BLACKLIST_PLAYLIST", { stationId, playlistId }, this)
 								.then(() => {
 									next();
 								})
@@ -2987,35 +2987,37 @@ export default {
 				},
 
 				(song, station, next) => {
-					const excludedPlaylists = [];
+					const blacklist = [];
 					async.eachLimit(
-						station.excludedPlaylists,
+						station.blacklist,
 						1,
 						(playlistId, next) => {
 							PlaylistsModule.runJob("GET_PLAYLIST", { playlistId }, this)
 								.then(playlist => {
-									excludedPlaylists.push(playlist);
+									blacklist.push(playlist);
 									next();
 								})
 								.catch(next);
 						},
 						err => {
-							next(err, song, station, excludedPlaylists);
+							next(err, song, station, blacklist);
 						}
 					);
 				},
 
-				(song, station, excludedPlaylists, next) => {
-					const excludedSongs = excludedPlaylists
-						.flatMap(excludedPlaylist => excludedPlaylist.songs)
+				(song, station, blacklist, next) => {
+					const blacklistedSongs = blacklist
+						.flatMap(blacklistedPlaylist => blacklistedPlaylist.songs)
 						.reduce(
 							(items, item) =>
 								items.find(x => x.youtubeId === item.youtubeId) ? [...items] : [...items, item],
 							[]
 						);
 
-					if (excludedSongs.find(excludedSong => excludedSong._id.toString() === song._id.toString()))
-						next("That song is in an excluded playlist and cannot be played.");
+					if (
+						blacklistedSongs.find(blacklistedSong => blacklistedSong._id.toString() === song._id.toString())
+					)
+						next("That song is in an blacklisted playlist and cannot be played.");
 					else next(null, song, station);
 				},
 
@@ -3467,14 +3469,14 @@ export default {
 	}),
 
 	/**
-	 * Excludes a playlist in a station
+	 * Blacklist a playlist in a station
 	 *
 	 * @param session
 	 * @param stationId - the station id
 	 * @param playlistId - the playlist id
 	 * @param cb
 	 */
-	excludePlaylist: isOwnerRequired(async function excludePlaylist(session, stationId, playlistId, cb) {
+	blacklistPlaylist: isOwnerRequired(async function blacklistPlaylist(session, stationId, playlistId, cb) {
 		async.waterfall(
 			[
 				next => {
@@ -3485,13 +3487,13 @@ export default {
 
 				(station, next) => {
 					if (!station) return next("Station not found.");
-					if (station.excludedPlaylists.indexOf(playlistId) !== -1)
-						return next("That playlist is already excluded.");
+					if (station.blacklist.indexOf(playlistId) !== -1)
+						return next("That playlist is already blacklisted.");
 					return next();
 				},
 
 				next => {
-					StationsModule.runJob("EXCLUDE_PLAYLIST", { stationId, playlistId }, this)
+					StationsModule.runJob("BLACKLIST_PLAYLIST", { stationId, playlistId }, this)
 						.then(() => {
 							next();
 						})
@@ -3503,22 +3505,22 @@ export default {
 					err = await UtilsModule.runJob("GET_ERROR", { error: err }, this);
 					this.log(
 						"ERROR",
-						"STATIONS_EXCLUDE_PLAYLIST",
-						`Excluding playlist "${playlistId}" for station "${stationId}" failed. "${err}"`
+						"STATIONS_BLACKLIST_PLAYLIST",
+						`Blacklisting playlist "${playlistId}" for station "${stationId}" failed. "${err}"`
 					);
 					return cb({ status: "error", message: err });
 				}
 
 				this.log(
 					"SUCCESS",
-					"STATIONS_EXCLUDE_PLAYLIST",
-					`Excluding playlist "${playlistId}" for station "${stationId}" successfully.`
+					"STATIONS_BLACKLIST_PLAYLIST",
+					`Blacklisting playlist "${playlistId}" for station "${stationId}" successfully.`
 				);
 
 				PlaylistsModule.runJob("AUTOFILL_STATION_PLAYLIST", { stationId }).then().catch();
 
 				CacheModule.runJob("PUB", {
-					channel: "station.excludedPlaylist",
+					channel: "station.blacklistedPlaylist",
 					value: {
 						playlistId,
 						stationId
@@ -3527,21 +3529,26 @@ export default {
 
 				return cb({
 					status: "success",
-					message: "Successfully excluded playlist."
+					message: "Successfully blacklisted playlist."
 				});
 			}
 		);
 	}),
 
 	/**
-	 * Remove excluded a playlist from a station
+	 * Remove blacklisted a playlist from a station
 	 *
 	 * @param session
 	 * @param stationId - the station id
 	 * @param playlistId - the playlist id
 	 * @param cb
 	 */
-	removeExcludedPlaylist: isOwnerRequired(async function removeExcludedPlaylist(session, stationId, playlistId, cb) {
+	removeBlacklistedPlaylist: isOwnerRequired(async function removeBlacklistedPlaylist(
+		session,
+		stationId,
+		playlistId,
+		cb
+	) {
 		async.waterfall(
 			[
 				next => {
@@ -3552,13 +3559,12 @@ export default {
 
 				(station, next) => {
 					if (!station) return next("Station not found.");
-					if (station.excludedPlaylists.indexOf(playlistId) === -1)
-						return next("That playlist is not excluded.");
+					if (station.blacklist.indexOf(playlistId) === -1) return next("That playlist is not blacklisted.");
 					return next();
 				},
 
 				next => {
-					StationsModule.runJob("REMOVE_EXCLUDED_PLAYLIST", { stationId, playlistId }, this)
+					StationsModule.runJob("REMOVE_BLACKLISTED_PLAYLIST", { stationId, playlistId }, this)
 						.then(() => {
 							next();
 						})
@@ -3570,22 +3576,22 @@ export default {
 					err = await UtilsModule.runJob("GET_ERROR", { error: err }, this);
 					this.log(
 						"ERROR",
-						"STATIONS_REMOVE_EXCLUDED_PLAYLIST",
-						`Removing excluded playlist "${playlistId}" for station "${stationId}" failed. "${err}"`
+						"STATIONS_REMOVE_BLACKLISTED_PLAYLIST",
+						`Removing blacklisted playlist "${playlistId}" for station "${stationId}" failed. "${err}"`
 					);
 					return cb({ status: "error", message: err });
 				}
 
 				this.log(
 					"SUCCESS",
-					"STATIONS_REMOVE_EXCLUDED_PLAYLIST",
-					`Removing excluded playlist "${playlistId}" for station "${stationId}" successfully.`
+					"STATIONS_REMOVE_BLACKLISTED_PLAYLIST",
+					`Removing blacklisted playlist "${playlistId}" for station "${stationId}" successfully.`
 				);
 
 				PlaylistsModule.runJob("AUTOFILL_STATION_PLAYLIST", { stationId }).then().catch();
 
 				CacheModule.runJob("PUB", {
-					channel: "station.removedExcludedPlaylist",
+					channel: "station.removedBlacklistedPlaylist",
 					value: {
 						playlistId,
 						stationId
@@ -3594,7 +3600,7 @@ export default {
 
 				return cb({
 					status: "success",
-					message: "Successfully removed excluded playlist."
+					message: "Successfully removed blacklisted playlist."
 				});
 			}
 		);

+ 1 - 1
backend/logic/db/schemas/station.js

@@ -45,6 +45,6 @@ export default {
 	playMode: { type: String, enum: ["random", "sequential"], default: "random" },
 	theme: { type: String, enum: ["blue", "purple", "teal", "orange", "red"], default: "blue" },
 	includedPlaylists: [{ type: String }],
-	excludedPlaylists: [{ type: String }],
+	blacklist: [{ type: mongoose.Schema.Types.ObjectId, ref: "playlists" }],
 	documentVersion: { type: Number, default: 7, required: true }
 };

+ 56 - 0
backend/logic/migration/migrations/migration20.js

@@ -0,0 +1,56 @@
+import async from "async";
+import mongoose from "mongoose";
+
+/**
+ * Migration 20
+ *
+ * Migration for station overhaul (WIP)
+ *
+ * @param {object} MigrationModule - the MigrationModule
+ * @returns {Promise} - returns promise
+ */
+export default async function migrate(MigrationModule) {
+	const stationModel = await MigrationModule.runJob("GET_MODEL", { modelName: "station" }, this);
+
+	return new Promise((resolve, reject) => {
+		async.waterfall(
+			[
+				next => {
+					this.log("INFO", `Migration 20. Finding stations with document version 7.`);
+					stationModel.find({ documentVersion: 7, excludedPlaylists: { $exists: true } }, (err, stations) => {
+						if (err) next(err);
+						else {
+							async.eachLimit(
+								stations.map(station => station._doc),
+								1,
+								(station, next) => {
+									stationModel.updateOne(
+										{ _id: station._id },
+										{
+											$unset: { excludedPlaylists: "" },
+											$set: {
+												blacklist: station.excludedPlaylists.map(playlist =>
+													mongoose.Types.ObjectId(playlist)
+												) /* ,
+												documentVersion: 8 */
+											}
+										},
+										next
+									);
+								},
+								err => {
+									this.log("INFO", `Migration 20. Stations found: ${stations.length}.`);
+									next(err);
+								}
+							);
+						}
+					});
+				}
+			],
+			err => {
+				if (err) reject(new Error(err));
+				else resolve();
+			}
+		);
+	});
+}

+ 11 - 11
backend/logic/playlists.js

@@ -486,7 +486,7 @@ class _PlaylistsModule extends CoreClass {
 					},
 
 					(playlistId, next) => {
-						StationsModule.runJob("GET_STATIONS_THAT_INCLUDE_OR_EXCLUDE_PLAYLIST", { playlistId }, this)
+						StationsModule.runJob("GET_STATIONS_THAT_INCLUDE_OR_BLACKLIST_PLAYLIST", { playlistId }, this)
 							.then(response => {
 								async.eachLimit(
 									response.stationIds,
@@ -538,7 +538,7 @@ class _PlaylistsModule extends CoreClass {
 								.then(response => {
 									if (response.songs.length === 0) {
 										StationsModule.runJob(
-											"GET_STATIONS_THAT_INCLUDE_OR_EXCLUDE_PLAYLIST",
+											"GET_STATIONS_THAT_INCLUDE_OR_BLACKLIST_PLAYLIST",
 											{ playlistId: playlist._id },
 											this
 										)
@@ -724,27 +724,27 @@ class _PlaylistsModule extends CoreClass {
 					},
 
 					(station, includedPlaylists, next) => {
-						const excludedPlaylists = [];
+						const blacklist = [];
 						async.eachLimit(
-							station.excludedPlaylists,
+							station.blacklist,
 							1,
 							(playlistId, next) => {
 								PlaylistsModule.runJob("GET_PLAYLIST", { playlistId }, this)
 									.then(playlist => {
-										excludedPlaylists.push(playlist);
+										blacklist.push(playlist);
 										next();
 									})
 									.catch(next);
 							},
 							err => {
-								next(err, station, includedPlaylists, excludedPlaylists);
+								next(err, station, includedPlaylists, blacklist);
 							}
 						);
 					},
 
-					(station, includedPlaylists, excludedPlaylists, next) => {
-						const excludedSongs = excludedPlaylists
-							.flatMap(excludedPlaylist => excludedPlaylist.songs)
+					(station, includedPlaylists, blacklist, next) => {
+						const blacklistedSongs = blacklist
+							.flatMap(blacklistedPlaylist => blacklistedPlaylist.songs)
 							.reduce(
 								(items, item) =>
 									items.find(x => x.youtubeId === item.youtubeId) ? [...items] : [...items, item],
@@ -757,7 +757,7 @@ class _PlaylistsModule extends CoreClass {
 									songs.find(x => x.youtubeId === song.youtubeId) ? [...songs] : [...songs, song],
 								[]
 							)
-							.filter(song => !excludedSongs.find(x => x.youtubeId === song.youtubeId));
+							.filter(song => !blacklistedSongs.find(x => x.youtubeId === song.youtubeId));
 
 						next(null, station, includedSongs);
 					},
@@ -943,7 +943,7 @@ class _PlaylistsModule extends CoreClass {
 
 					next => {
 						StationsModule.runJob(
-							"REMOVE_INCLUDED_OR_EXCLUDED_PLAYLIST_FROM_STATIONS",
+							"REMOVE_INCLUDED_OR_BLACKLISTED_PLAYLIST_FROM_STATIONS",
 							{ playlistId: payload.playlistId },
 							this
 						)

+ 21 - 24
backend/logic/stations.js

@@ -1169,9 +1169,9 @@ class _StationsModule extends CoreClass {
 						if (station.playlist === payload.playlistId) next("You cannot include the station playlist");
 						else if (station.includedPlaylists.indexOf(payload.playlistId) !== -1)
 							next("This playlist is already included");
-						else if (station.excludedPlaylists.indexOf(payload.playlistId) !== -1)
+						else if (station.blacklist.indexOf(payload.playlistId) !== -1)
 							next(
-								"This playlist is currently excluded, please remove it from there before including it"
+								"This playlist is currently blacklisted, please remove it from there before including it"
 							);
 						else
 							PlaylistsModule.runJob("GET_PLAYLIST", { playlistId: payload.playlistId }, this)
@@ -1298,14 +1298,14 @@ class _StationsModule extends CoreClass {
 	}
 
 	/**
-	 * Adds a playlist to be excluded in a station
+	 * Add a playlist to station blacklist
 	 *
 	 * @param {object} payload - object that contains the payload
 	 * @param {object} payload.stationId - the id of the station
 	 * @param {object} payload.playlistId - the id of the playlist
 	 * @returns {Promise} - returns a promise (resolve, reject)
 	 */
-	EXCLUDE_PLAYLIST(payload) {
+	BLACKLIST_PLAYLIST(payload) {
 		return new Promise((resolve, reject) => {
 			async.waterfall(
 				[
@@ -1324,12 +1324,12 @@ class _StationsModule extends CoreClass {
 					},
 
 					(station, next) => {
-						if (station.playlist === payload.playlistId) next("You cannot exclude the station playlist");
-						else if (station.excludedPlaylists.indexOf(payload.playlistId) !== -1)
-							next("This playlist is already excluded");
+						if (station.playlist === payload.playlistId) next("You cannot blacklist the station playlist");
+						else if (station.blacklist.indexOf(payload.playlistId) !== -1)
+							next("This playlist is already blacklisted");
 						else if (station.includedPlaylists.indexOf(payload.playlistId) !== -1)
 							next(
-								"This playlist is currently included, please remove it from there before excluding it"
+								"This playlist is currently included, please remove it from there before blacklisting it"
 							);
 						else
 							PlaylistsModule.runJob("GET_PLAYLIST", { playlistId: payload.playlistId }, this)
@@ -1349,7 +1349,7 @@ class _StationsModule extends CoreClass {
 						).then(stationModel => {
 							stationModel.updateOne(
 								{ _id: payload.stationId },
-								{ $push: { excludedPlaylists: payload.playlistId } },
+								{ $push: { blacklist: payload.playlistId } },
 								next
 							);
 						});
@@ -1382,14 +1382,14 @@ class _StationsModule extends CoreClass {
 	}
 
 	/**
-	 * Removes a playlist that is excluded in a station
+	 * Remove a playlist from station blacklist
 	 *
 	 * @param {object} payload - object that contains the payload
 	 * @param {object} payload.stationId - the id of the station
 	 * @param {object} payload.playlistId - the id of the playlist
 	 * @returns {Promise} - returns a promise (resolve, reject)
 	 */
-	REMOVE_EXCLUDED_PLAYLIST(payload) {
+	REMOVE_BLACKLISTED_PLAYLIST(payload) {
 		return new Promise((resolve, reject) => {
 			async.waterfall(
 				[
@@ -1408,8 +1408,8 @@ class _StationsModule extends CoreClass {
 					},
 
 					(station, next) => {
-						if (station.excludedPlaylists.indexOf(payload.playlistId) === -1)
-							next("This playlist isn't excluded");
+						if (station.blacklist.indexOf(payload.playlistId) === -1)
+							next("This playlist isn't blacklisted");
 						else next();
 					},
 
@@ -1423,7 +1423,7 @@ class _StationsModule extends CoreClass {
 						).then(stationModel => {
 							stationModel.updateOne(
 								{ _id: payload.stationId },
-								{ $pull: { excludedPlaylists: payload.playlistId } },
+								{ $pull: { blacklist: payload.playlistId } },
 								next
 							);
 						});
@@ -1456,13 +1456,13 @@ class _StationsModule extends CoreClass {
 	}
 
 	/**
-	 * Removes included or excluded playlist from a station
+	 * Removes included or blacklisted playlist from a station
 	 *
 	 * @param {object} payload - object that contains the payload
 	 * @param {string} payload.playlistId - the playlist id
 	 * @returns {Promise} - returns promise (reject, resolve)
 	 */
-	REMOVE_INCLUDED_OR_EXCLUDED_PLAYLIST_FROM_STATIONS(payload) {
+	REMOVE_INCLUDED_OR_BLACKLISTED_PLAYLIST_FROM_STATIONS(payload) {
 		return new Promise((resolve, reject) => {
 			async.waterfall(
 				[
@@ -1474,15 +1474,12 @@ class _StationsModule extends CoreClass {
 					next => {
 						StationsModule.stationModel.updateMany(
 							{
-								$or: [
-									{ includedPlaylists: payload.playlistId },
-									{ excludedPlaylists: payload.playlistId }
-								]
+								$or: [{ includedPlaylists: payload.playlistId }, { blacklist: payload.playlistId }]
 							},
 							{
 								$pull: {
 									includedPlaylists: payload.playlistId,
-									excludedPlaylists: payload.playlistId
+									blacklist: payload.playlistId
 								}
 							},
 							err => {
@@ -1505,13 +1502,13 @@ class _StationsModule extends CoreClass {
 	}
 
 	/**
-	 * Gets stations that include or exclude a specific playlist
+	 * Gets stations that include or blacklist a specific playlist
 	 *
 	 * @param {object} payload - object that contains the payload
 	 * @param {string} payload.playlistId - the playlist id
 	 * @returns {Promise} - returns promise (reject, resolve)
 	 */
-	GET_STATIONS_THAT_INCLUDE_OR_EXCLUDE_PLAYLIST(payload) {
+	GET_STATIONS_THAT_INCLUDE_OR_BLACKLIST_PLAYLIST(payload) {
 		return new Promise((resolve, reject) => {
 			DBModule.runJob(
 				"GET_MODEL",
@@ -1522,7 +1519,7 @@ class _StationsModule extends CoreClass {
 			).then(stationModel => {
 				stationModel.find(
 					{
-						$or: [{ includedPlaylists: payload.playlistId }, { excludedPlaylists: payload.playlistId }]
+						$or: [{ includedPlaylists: payload.playlistId }, { blacklist: payload.playlistId }]
 					},
 					(err, stations) => {
 						if (err) reject(err);

+ 41 - 36
frontend/src/components/modals/ManageStation/Tabs/Autofill.vue

@@ -47,9 +47,9 @@
 								play_arrow
 							</i>
 							<i
-								class="material-icons excluded-icon"
-								v-else-if="isExcluded(featuredPlaylist._id)"
-								content="This playlist is currently excluded"
+								class="material-icons blacklisted-icon"
+								v-else-if="isBlacklisted(featuredPlaylist._id)"
+								content="This playlist is currently blacklisted"
 								v-tippy
 							>
 								block
@@ -57,7 +57,7 @@
 							<i
 								class="material-icons"
 								v-else
-								content="This playlist is currently not included or excluded"
+								content="This playlist is currently not included or blacklisted"
 								v-tippy
 							>
 								play_disabled
@@ -66,7 +66,7 @@
 
 						<template #actions>
 							<i
-								v-if="isExcluded(featuredPlaylist._id)"
+								v-if="isBlacklisted(featuredPlaylist._id)"
 								class="material-icons stop-icon"
 								content="This playlist is blacklisted in this station"
 								v-tippy="{ theme: 'info' }"
@@ -89,7 +89,7 @@
 							<i
 								v-if="
 									!isIncluded(featuredPlaylist._id) &&
-									!isExcluded(featuredPlaylist._id)
+									!isBlacklisted(featuredPlaylist._id)
 								"
 								@click="includePlaylist(featuredPlaylist)"
 								class="material-icons play-icon"
@@ -98,7 +98,7 @@
 								>play_arrow</i
 							>
 							<quick-confirm
-								v-if="!isExcluded(featuredPlaylist._id)"
+								v-if="!isBlacklisted(featuredPlaylist._id)"
 								@confirm="
 									blacklistPlaylist(featuredPlaylist._id)
 								"
@@ -111,9 +111,11 @@
 								>
 							</quick-confirm>
 							<quick-confirm
-								v-if="isExcluded(featuredPlaylist._id)"
+								v-if="isBlacklisted(featuredPlaylist._id)"
 								@confirm="
-									removeExcludedPlaylist(featuredPlaylist._id)
+									removeBlacklistedPlaylist(
+										featuredPlaylist._id
+									)
 								"
 							>
 								<i
@@ -184,9 +186,9 @@
 								play_arrow
 							</i>
 							<i
-								class="material-icons excluded-icon"
-								v-else-if="isExcluded(playlist._id)"
-								content="This playlist is currently excluded"
+								class="material-icons blacklisted-icon"
+								v-else-if="isBlacklisted(playlist._id)"
+								content="This playlist is currently blacklisted"
 								v-tippy
 							>
 								block
@@ -194,7 +196,7 @@
 							<i
 								class="material-icons"
 								v-else
-								content="This playlist is currently not included or excluded"
+								content="This playlist is currently not included or blacklisted"
 								v-tippy
 							>
 								play_disabled
@@ -203,7 +205,7 @@
 
 						<template #actions>
 							<i
-								v-if="isExcluded(playlist._id)"
+								v-if="isBlacklisted(playlist._id)"
 								class="material-icons stop-icon"
 								content="This playlist is blacklisted in this station"
 								v-tippy="{ theme: 'info' }"
@@ -224,7 +226,7 @@
 							<i
 								v-if="
 									!isIncluded(playlist._id) &&
-									!isExcluded(playlist._id)
+									!isBlacklisted(playlist._id)
 								"
 								@click="includePlaylist(playlist)"
 								class="material-icons play-icon"
@@ -233,7 +235,7 @@
 								>play_arrow</i
 							>
 							<quick-confirm
-								v-if="!isExcluded(playlist._id)"
+								v-if="!isBlacklisted(playlist._id)"
 								@confirm="blacklistPlaylist(playlist._id)"
 							>
 								<i
@@ -244,8 +246,10 @@
 								>
 							</quick-confirm>
 							<quick-confirm
-								v-if="isExcluded(playlist._id)"
-								@confirm="removeExcludedPlaylist(playlist._id)"
+								v-if="isBlacklisted(playlist._id)"
+								@confirm="
+									removeBlacklistedPlaylist(playlist._id)
+								"
 							>
 								<i
 									class="material-icons stop-icon"
@@ -328,9 +332,9 @@
 										play_arrow
 									</i>
 									<i
-										class="material-icons excluded-icon"
-										v-else-if="isExcluded(element._id)"
-										content="This playlist is currently excluded"
+										class="material-icons blacklisted-icon"
+										v-else-if="isBlacklisted(element._id)"
+										content="This playlist is currently blacklisted"
 										v-tippy
 									>
 										block
@@ -338,7 +342,7 @@
 									<i
 										class="material-icons"
 										v-else
-										content="This playlist is currently not included or excluded"
+										content="This playlist is currently not included or blacklisted"
 										v-tippy
 									>
 										play_disabled
@@ -376,7 +380,7 @@
 									<quick-confirm
 										v-if="
 											isOwnerOrAdmin() &&
-											!isExcluded(element._id)
+											!isBlacklisted(element._id)
 										"
 										@confirm="
 											blacklistPlaylist(element._id)
@@ -392,10 +396,12 @@
 									<quick-confirm
 										v-if="
 											isOwnerOrAdmin() &&
-											isExcluded(element._id)
+											isBlacklisted(element._id)
 										"
 										@confirm="
-											removeExcludedPlaylist(element._id)
+											removeBlacklistedPlaylist(
+												element._id
+											)
 										"
 									>
 										<i
@@ -542,7 +548,7 @@ export default {
 			originalStation: state => state.originalStation,
 			station: state => state.station,
 			includedPlaylists: state => state.includedPlaylists,
-			excludedPlaylists: state => state.excludedPlaylists,
+			blacklist: state => state.blacklist,
 			songsList: state => state.songsList
 		}),
 		...mapGetters({
@@ -592,13 +598,12 @@ export default {
 			);
 
 			this.socket.dispatch(
-				`stations.getStationExcludedPlaylistsById`,
+				`stations.getStationBlacklistById`,
 				this.station._id,
 				res => {
 					if (res.status === "success") {
-						this.station.excludedPlaylists = res.data.playlists;
-						this.originalStation.excludedPlaylists =
-							res.data.playlists;
+						this.station.blacklist = res.data.playlists;
+						this.originalStation.blacklist = res.data.playlists;
 					}
 				}
 			);
@@ -694,10 +699,10 @@ export default {
 				);
 			});
 		},
-		removeExcludedPlaylist(id) {
+		removeBlacklistedPlaylist(id) {
 			return new Promise(resolve => {
 				this.socket.dispatch(
-					"stations.removeExcludedPlaylist",
+					"stations.removeBlacklistedPlaylist",
 					this.station._id,
 					id,
 					res => {
@@ -721,9 +726,9 @@ export default {
 			});
 			return included;
 		},
-		isExcluded(id) {
+		isBlacklisted(id) {
 			let selected = false;
-			this.excludedPlaylists.forEach(playlist => {
+			this.blacklist.forEach(playlist => {
 				if (playlist._id === id) selected = true;
 			});
 			return selected;
@@ -774,7 +779,7 @@ export default {
 			if (this.isIncluded(id)) await this.removeIncludedPlaylist(id);
 
 			this.socket.dispatch(
-				"stations.excludePlaylist",
+				"stations.blacklistPlaylist",
 				this.station._id,
 				id,
 				res => {
@@ -832,7 +837,7 @@ export default {
 	}
 }
 
-.excluded-icon {
+.blacklisted-icon {
 	color: var(--dark-red);
 }
 

+ 18 - 17
frontend/src/components/modals/ManageStation/Tabs/Blacklist.vue

@@ -2,16 +2,16 @@
 	<div class="station-blacklist">
 		<div class="tabs-container">
 			<div class="tab" v-if="isOwnerOrAdmin()">
-				<div v-if="excludedPlaylists.length > 0">
+				<div v-if="blacklist.length > 0">
 					<playlist-item
 						:playlist="playlist"
-						v-for="playlist in excludedPlaylists"
+						v-for="playlist in blacklist"
 						:key="`key-${playlist._id}`"
 					>
 						<template #item-icon>
 							<i
-								class="material-icons excluded-icon"
-								content="This playlist is currently excluded"
+								class="material-icons blacklisted-icon"
+								content="This playlist is currently blacklisted"
 								v-tippy
 							>
 								block
@@ -20,7 +20,9 @@
 
 						<template #actions>
 							<quick-confirm
-								@confirm="removeExcludedPlaylist(playlist._id)"
+								@confirm="
+									removeBlacklistedPlaylist(playlist._id)
+								"
 							>
 								<i
 									class="material-icons stop-icon"
@@ -50,7 +52,7 @@
 					</playlist-item>
 				</div>
 				<p v-else class="has-text-centered scrollable-list">
-					No playlists currently excluded.
+					No playlists currently blacklisted.
 				</p>
 			</div>
 		</div>
@@ -83,7 +85,7 @@ export default {
 			originalStation: state => state.originalStation,
 			station: state => state.station,
 			includedPlaylists: state => state.includedPlaylists,
-			excludedPlaylists: state => state.excludedPlaylists
+			blacklist: state => state.blacklist
 		}),
 		...mapGetters({
 			socket: "websockets/getSocket"
@@ -95,13 +97,12 @@ export default {
 	methods: {
 		init() {
 			this.socket.dispatch(
-				`stations.getStationExcludedPlaylistsById`,
+				`stations.getStationBlacklistById`,
 				this.station._id,
 				res => {
 					if (res.status === "success") {
-						this.station.excludedPlaylists = res.data.playlists;
-						this.originalStation.excludedPlaylists =
-							res.data.playlists;
+						this.station.blacklist = res.data.playlists;
+						this.originalStation.blacklist = res.data.playlists;
 					}
 				}
 			);
@@ -136,10 +137,10 @@ export default {
 				);
 			});
 		},
-		removeExcludedPlaylist(id) {
+		removeBlacklistedPlaylist(id) {
 			return new Promise(resolve => {
 				this.socket.dispatch(
-					"stations.removeExcludedPlaylist",
+					"stations.removeBlacklistedPlaylist",
 					this.station._id,
 					id,
 					res => {
@@ -156,9 +157,9 @@ export default {
 			});
 			return included;
 		},
-		isExcluded(id) {
+		isBlacklisted(id) {
 			let selected = false;
-			this.excludedPlaylists.forEach(playlist => {
+			this.blacklist.forEach(playlist => {
 				if (playlist._id === id) selected = true;
 			});
 			return selected;
@@ -167,7 +168,7 @@ export default {
 			if (this.isIncluded(id)) await this.removeIncludedPlaylist(id);
 
 			this.socket.dispatch(
-				"stations.excludePlaylist",
+				"stations.blacklistPlaylist",
 				this.station._id,
 				id,
 				res => {
@@ -182,7 +183,7 @@ export default {
 </script>
 
 <style lang="less" scoped>
-.excluded-icon {
+.blacklisted-icon {
 	color: var(--dark-red);
 }
 

+ 39 - 36
frontend/src/components/modals/ManageStation/Tabs/Request.vue

@@ -209,9 +209,11 @@
 									radio
 								</i>
 								<i
-									class="material-icons excluded-icon"
-									v-else-if="isExcluded(featuredPlaylist._id)"
-									content="This playlist is currently excluded"
+									class="material-icons blacklisted-icon"
+									v-else-if="
+										isBlacklisted(featuredPlaylist._id)
+									"
+									content="This playlist is currently blacklisted"
 									v-tippy
 								>
 									block
@@ -219,7 +221,7 @@
 								<i
 									class="material-icons"
 									v-else
-									content="This playlist is currently not selected or excluded"
+									content="This playlist is currently not selected or blacklisted"
 									v-tippy
 								>
 									play_disabled
@@ -228,7 +230,7 @@
 
 							<template #actions>
 								<i
-									v-if="isExcluded(featuredPlaylist._id)"
+									v-if="isBlacklisted(featuredPlaylist._id)"
 									class="material-icons stop-icon"
 									content="This playlist is blacklisted in this station"
 									v-tippy="{ theme: 'info' }"
@@ -253,7 +255,7 @@
 								<i
 									v-if="
 										!isSelected(featuredPlaylist._id) &&
-										!isExcluded(featuredPlaylist._id)
+										!isBlacklisted(featuredPlaylist._id)
 									"
 									@click="
 										selectPartyPlaylist(featuredPlaylist)
@@ -266,7 +268,7 @@
 								<quick-confirm
 									v-if="
 										isOwnerOrAdmin() &&
-										!isExcluded(featuredPlaylist._id)
+										!isBlacklisted(featuredPlaylist._id)
 									"
 									@confirm="
 										blacklistPlaylist(featuredPlaylist._id)
@@ -282,10 +284,10 @@
 								<quick-confirm
 									v-if="
 										isOwnerOrAdmin() &&
-										isExcluded(featuredPlaylist._id)
+										isBlacklisted(featuredPlaylist._id)
 									"
 									@confirm="
-										removeExcludedPlaylist(
+										removeBlacklistedPlaylist(
 											featuredPlaylist._id
 										)
 									"
@@ -364,9 +366,9 @@
 									radio
 								</i>
 								<i
-									class="material-icons excluded-icon"
-									v-else-if="isExcluded(playlist._id)"
-									content="This playlist is currently excluded"
+									class="material-icons blacklisted-icon"
+									v-else-if="isBlacklisted(playlist._id)"
+									content="This playlist is currently blacklisted"
 									v-tippy
 								>
 									block
@@ -374,7 +376,7 @@
 								<i
 									class="material-icons"
 									v-else
-									content="This playlist is currently not selected or excluded"
+									content="This playlist is currently not selected or blacklisted"
 									v-tippy
 								>
 									play_disabled
@@ -383,7 +385,7 @@
 
 							<template #actions>
 								<i
-									v-if="isExcluded(playlist._id)"
+									v-if="isBlacklisted(playlist._id)"
 									class="material-icons stop-icon"
 									content="This playlist is blacklisted in this station"
 									v-tippy="{ theme: 'info' }"
@@ -406,7 +408,7 @@
 								<i
 									v-if="
 										!isSelected(playlist._id) &&
-										!isExcluded(playlist._id)
+										!isBlacklisted(playlist._id)
 									"
 									@click="selectPartyPlaylist(playlist)"
 									class="material-icons play-icon"
@@ -417,7 +419,7 @@
 								<quick-confirm
 									v-if="
 										isOwnerOrAdmin() &&
-										!isExcluded(playlist._id)
+										!isBlacklisted(playlist._id)
 									"
 									@confirm="blacklistPlaylist(playlist._id)"
 								>
@@ -431,10 +433,10 @@
 								<quick-confirm
 									v-if="
 										isOwnerOrAdmin() &&
-										isExcluded(playlist._id)
+										isBlacklisted(playlist._id)
 									"
 									@confirm="
-										removeExcludedPlaylist(playlist._id)
+										removeBlacklistedPlaylist(playlist._id)
 									"
 								>
 									<i
@@ -520,9 +522,11 @@
 											radio
 										</i>
 										<i
-											class="material-icons excluded-icon"
-											v-else-if="isExcluded(element._id)"
-											content="This playlist is currently excluded"
+											class="material-icons blacklisted-icon"
+											v-else-if="
+												isBlacklisted(element._id)
+											"
+											content="This playlist is currently blacklisted"
 											v-tippy
 										>
 											block
@@ -530,7 +534,7 @@
 										<i
 											class="material-icons"
 											v-else
-											content="This playlist is currently not selected or excluded"
+											content="This playlist is currently not selected or blacklisted"
 											v-tippy
 										>
 											play_disabled
@@ -566,7 +570,7 @@
 										<quick-confirm
 											v-if="
 												isOwnerOrAdmin() &&
-												!isExcluded(element._id)
+												!isBlacklisted(element._id)
 											"
 											@confirm="
 												blacklistPlaylist(element._id)
@@ -582,10 +586,10 @@
 										<quick-confirm
 											v-if="
 												isOwnerOrAdmin() &&
-												isExcluded(element._id)
+												isBlacklisted(element._id)
 											"
 											@confirm="
-												removeExcludedPlaylist(
+												removeBlacklistedPlaylist(
 													element._id
 												)
 											"
@@ -758,7 +762,7 @@ export default {
 			originalStation: state => state.originalStation,
 			station: state => state.station,
 			includedPlaylists: state => state.includedPlaylists,
-			excludedPlaylists: state => state.excludedPlaylists,
+			blacklist: state => state.blacklist,
 			songsList: state => state.songsList
 		}),
 		...mapGetters({
@@ -796,13 +800,12 @@ export default {
 			);
 
 			this.socket.dispatch(
-				`stations.getStationExcludedPlaylistsById`,
+				`stations.getStationBlacklistById`,
 				this.station._id,
 				res => {
 					if (res.status === "success") {
-						this.station.excludedPlaylists = res.data.playlists;
-						this.originalStation.excludedPlaylists =
-							res.data.playlists;
+						this.station.blacklist = res.data.playlists;
+						this.originalStation.blacklist = res.data.playlists;
 					}
 				}
 			);
@@ -861,10 +864,10 @@ export default {
 				}
 			});
 		},
-		removeExcludedPlaylist(id) {
+		removeBlacklistedPlaylist(id) {
 			return new Promise(resolve => {
 				this.socket.dispatch(
-					"stations.removeExcludedPlaylist",
+					"stations.removeBlacklistedPlaylist",
 					this.station._id,
 					id,
 					res => {
@@ -881,9 +884,9 @@ export default {
 			});
 			return selected;
 		},
-		isExcluded(id) {
+		isBlacklisted(id) {
 			let selected = false;
-			this.excludedPlaylists.forEach(playlist => {
+			this.blacklist.forEach(playlist => {
 				if (playlist._id === id) selected = true;
 			});
 			return selected;
@@ -934,7 +937,7 @@ export default {
 			// if (this.isIncluded(id)) await this.removeIncludedPlaylist(id);
 
 			this.socket.dispatch(
-				"stations.excludePlaylist",
+				"stations.blacklistPlaylist",
 				this.station._id,
 				id,
 				res => {
@@ -1009,7 +1012,7 @@ export default {
 	}
 }
 
-.excluded-icon {
+.blacklisted-icon {
 	color: var(--dark-red);
 }
 

+ 11 - 12
frontend/src/components/modals/ManageStation/index.vue

@@ -230,7 +230,7 @@ export default {
 			songsList: state => state.songsList,
 			stationPlaylist: state => state.stationPlaylist,
 			includedPlaylists: state => state.includedPlaylists,
-			excludedPlaylists: state => state.excludedPlaylists,
+			blacklist: state => state.blacklist,
 			stationPaused: state => state.stationPaused,
 			currentSong: state => state.currentSong
 		}),
@@ -265,11 +265,11 @@ export default {
 				);
 
 				this.socket.dispatch(
-					"stations.getStationExcludedPlaylistsById",
+					"stations.getStationBlacklistById",
 					this.stationId,
 					res => {
 						if (res.status === "success")
-							this.setExcludedPlaylists(res.data.playlists);
+							this.setBlacklist(res.data.playlists);
 					}
 				);
 
@@ -380,14 +380,13 @@ export default {
 				);
 
 				this.socket.on(
-					"event:station.excludedPlaylist",
+					"event:station.blacklistedPlaylist",
 					res => {
 						const { playlist } = res.data;
-						const playlistIndex = this.excludedPlaylists
-							.map(excludedPlaylist => excludedPlaylist._id)
+						const playlistIndex = this.blacklist
+							.map(blacklistedPlaylist => blacklistedPlaylist._id)
 							.indexOf(playlist._id);
-						if (playlistIndex === -1)
-							this.excludedPlaylists.push(playlist);
+						if (playlistIndex === -1) this.blacklist.push(playlist);
 					},
 					{ modal: "manageStation" }
 				);
@@ -406,14 +405,14 @@ export default {
 				);
 
 				this.socket.on(
-					"event:station.removedExcludedPlaylist",
+					"event:station.removedBlacklistedPlaylist",
 					res => {
 						const { playlistId } = res.data;
-						const playlistIndex = this.excludedPlaylists
+						const playlistIndex = this.blacklist
 							.map(playlist => playlist._id)
 							.indexOf(playlistId);
 						if (playlistIndex >= 0)
-							this.excludedPlaylists.splice(playlistIndex, 1);
+							this.blacklist.splice(playlistIndex, 1);
 					},
 					{ modal: "manageStation" }
 				);
@@ -636,7 +635,7 @@ export default {
 		...mapActions("modals/manageStation", [
 			"editStation",
 			"setIncludedPlaylists",
-			"setExcludedPlaylists",
+			"setBlacklist",
 			"clearStation",
 			"updateSongsList",
 			"updateStationPlaylist",

+ 14 - 15
frontend/src/pages/Station/Sidebar/Playlists.vue

@@ -17,7 +17,7 @@
 					<playlist-item :playlist="element" class="item-draggable">
 						<template #actions>
 							<i
-								v-if="isExcluded(element._id)"
+								v-if="isBlacklisted(element._id)"
 								class="material-icons stop-icon"
 								content="This playlist is blacklisted in this station"
 								v-tippy="{ theme: 'info' }"
@@ -28,7 +28,7 @@
 									station.type === 'community' &&
 									(isOwnerOrAdmin() || station.partyMode) &&
 									!isSelected(element._id) &&
-									!isExcluded(element._id)
+									!isBlacklisted(element._id)
 								"
 								@click="selectPlaylist(element)"
 								class="material-icons play-icon"
@@ -63,7 +63,7 @@
 								v-if="
 									station.type === 'community' &&
 									isOwnerOrAdmin() &&
-									!isExcluded(element._id)
+									!isBlacklisted(element._id)
 								"
 								@confirm="blacklistPlaylist(element._id)"
 							>
@@ -127,7 +127,7 @@ export default {
 		...mapState("station", {
 			partyPlaylists: state => state.partyPlaylists,
 			includedPlaylists: state => state.includedPlaylists,
-			excludedPlaylists: state => state.excludedPlaylists,
+			blacklist: state => state.blacklist,
 			songsList: state => state.songsList
 		}),
 		...mapGetters({
@@ -145,12 +145,12 @@ export default {
 			if (playlistIndex === -1) this.includedPlaylists.push(playlist);
 		});
 
-		this.socket.on("event:station.excludedPlaylist", res => {
+		this.socket.on("event:station.blacklistedPlaylist", res => {
 			const { playlist } = res.data;
-			const playlistIndex = this.excludedPlaylists
-				.map(excludedPlaylist => excludedPlaylist._id)
+			const playlistIndex = this.blacklist
+				.map(blacklistedPlaylist => blacklistedPlaylist._id)
 				.indexOf(playlist._id);
-			if (playlistIndex === -1) this.excludedPlaylists.push(playlist);
+			if (playlistIndex === -1) this.blacklist.push(playlist);
 		});
 
 		this.socket.on("event:station.removedIncludedPlaylist", res => {
@@ -162,13 +162,12 @@ export default {
 				this.includedPlaylists.splice(playlistIndex, 1);
 		});
 
-		this.socket.on("event:station.removedExcludedPlaylist", res => {
+		this.socket.on("event:station.removedBlacklistedPlaylist", res => {
 			const { playlistId } = res.data;
-			const playlistIndex = this.excludedPlaylists
+			const playlistIndex = this.blacklist
 				.map(playlist => playlist._id)
 				.indexOf(playlistId);
-			if (playlistIndex >= 0)
-				this.excludedPlaylists.splice(playlistIndex, 1);
+			if (playlistIndex >= 0) this.blacklist.splice(playlistIndex, 1);
 		});
 	},
 	methods: {
@@ -255,9 +254,9 @@ export default {
 			});
 			return selected;
 		},
-		isExcluded(id) {
+		isBlacklisted(id) {
 			let selected = false;
-			this.excludedPlaylists.forEach(playlist => {
+			this.blacklist.forEach(playlist => {
 				if (playlist._id === id) selected = true;
 			});
 			return selected;
@@ -266,7 +265,7 @@ export default {
 			if (this.isSelected(id)) await this.deselectPlaylist(id);
 
 			this.socket.dispatch(
-				"stations.excludePlaylist",
+				"stations.blacklistPlaylist",
 				this.station._id,
 				id,
 				res => {

+ 6 - 8
frontend/src/pages/Station/index.vue

@@ -899,7 +899,7 @@ export default {
 			noSong: state => state.noSong,
 			partyPlaylists: state => state.partyPlaylists,
 			includedPlaylists: state => state.includedPlaylists,
-			excludedPlaylists: state => state.excludedPlaylists
+			blacklist: state => state.blacklist
 		}),
 		...mapState({
 			loggedIn: state => state.user.auth.loggedIn,
@@ -1948,7 +1948,7 @@ export default {
 							owner,
 							privatePlaylist,
 							includedPlaylists,
-							excludedPlaylists,
+							blacklist,
 							type,
 							genres,
 							blacklistedGenres,
@@ -1973,7 +1973,7 @@ export default {
 							owner,
 							privatePlaylist,
 							includedPlaylists,
-							excludedPlaylists,
+							blacklist,
 							type,
 							genres,
 							blacklistedGenres,
@@ -2009,13 +2009,11 @@ export default {
 						);
 
 						this.socket.dispatch(
-							"stations.getStationExcludedPlaylistsById",
+							"stations.getStationBlacklistById",
 							this.station._id,
 							res => {
 								if (res.status === "success") {
-									this.setExcludedPlaylists(
-										res.data.playlists
-									);
+									this.setBlacklist(res.data.playlists);
 								}
 							}
 						);
@@ -2277,7 +2275,7 @@ export default {
 			"updateNoSong",
 			"updateIfStationIsFavorited",
 			"setIncludedPlaylists",
-			"setExcludedPlaylists",
+			"setBlacklist",
 			"updateCurrentSongRatings",
 			"updateOwnCurrentSongRatings",
 			"updateCurrentSongSkipVotes"

+ 6 - 8
frontend/src/store/modules/modals/manageStation.js

@@ -8,7 +8,7 @@ export default {
 		station: {},
 		stationPlaylist: { songs: [] },
 		includedPlaylists: [],
-		excludedPlaylists: [],
+		blacklist: [],
 		songsList: [],
 		stationPaused: true,
 		currentSong: {}
@@ -19,8 +19,8 @@ export default {
 		editStation: ({ commit }, station) => commit("editStation", station),
 		setIncludedPlaylists: ({ commit }, includedPlaylists) =>
 			commit("setIncludedPlaylists", includedPlaylists),
-		setExcludedPlaylists: ({ commit }, excludedPlaylists) =>
-			commit("setExcludedPlaylists", excludedPlaylists),
+		setBlacklist: ({ commit }, blacklist) =>
+			commit("setBlacklist", blacklist),
 		clearStation: ({ commit }) => commit("clearStation"),
 		updateSongsList: ({ commit }, songsList) =>
 			commit("updateSongsList", songsList),
@@ -46,17 +46,15 @@ export default {
 				JSON.stringify(includedPlaylists)
 			);
 		},
-		setExcludedPlaylists(state, excludedPlaylists) {
-			state.excludedPlaylists = JSON.parse(
-				JSON.stringify(excludedPlaylists)
-			);
+		setBlacklist(state, blacklist) {
+			state.blacklist = JSON.parse(JSON.stringify(blacklist));
 		},
 		clearStation(state) {
 			state.originalStation = {};
 			state.station = {};
 			state.stationPlaylist = { songs: [] };
 			state.includedPlaylists = [];
-			state.excludedPlaylists = [];
+			state.blacklist = [];
 			state.songsList = [];
 			state.stationPaused = true;
 			state.currentSong = {};

+ 6 - 6
frontend/src/store/modules/station.js

@@ -16,7 +16,7 @@ const state = {
 	localPaused: false,
 	noSong: true,
 	includedPlaylists: [],
-	excludedPlaylists: []
+	blacklist: []
 };
 
 const getters = {};
@@ -67,8 +67,8 @@ const actions = {
 	setIncludedPlaylists: ({ commit }, includedPlaylists) => {
 		commit("setIncludedPlaylists", includedPlaylists);
 	},
-	setExcludedPlaylists: ({ commit }, excludedPlaylists) => {
-		commit("setExcludedPlaylists", excludedPlaylists);
+	setBlacklist: ({ commit }, blacklist) => {
+		commit("setBlacklist", blacklist);
 	},
 	updateCurrentSongRatings: ({ commit }, songRatings) => {
 		commit("updateCurrentSongRatings", songRatings);
@@ -104,7 +104,7 @@ const mutations = {
 		state.localPaused = false;
 		state.noSong = true;
 		state.includedPlaylists = [];
-		state.excludedPlaylists = [];
+		state.blacklist = [];
 	},
 	editStation(state, station) {
 		state.editing = { ...station };
@@ -159,8 +159,8 @@ const mutations = {
 	setIncludedPlaylists(state, includedPlaylists) {
 		state.includedPlaylists = JSON.parse(JSON.stringify(includedPlaylists));
 	},
-	setExcludedPlaylists(state, excludedPlaylists) {
-		state.excludedPlaylists = JSON.parse(JSON.stringify(excludedPlaylists));
+	setBlacklist(state, blacklist) {
+		state.blacklist = JSON.parse(JSON.stringify(blacklist));
 	},
 	updateCurrentSongRatings(state, songRatings) {
 		state.currentSong.likes = songRatings.likes;