浏览代码

Merge tag 'v3.9.0'

Owen Diffey 2 年之前
父节点
当前提交
3370909178

+ 13 - 0
CHANGELOG.md

@@ -1,5 +1,18 @@
 # Changelog
 
+## [v3.9.0] - 2023-01-01
+
+This release includes all changes from v3.9.0-rc1, in addition to the following.
+Upgrade instructions can be found at [.wiki/Upgrading](.wiki/Upgrading.md).
+
+### Fixed
+
+- fix: Draggable list items sometimes had wrong key
+- fix: Downgraded axios to 1.1.3 to fix Discogs API requests
+- fix: YouTube API_CALL job would improperly pause the current job
+whilst not waiting for child jobs
+- fix: Add/remove song to/from playlist could throw error if not an official song
+
 ## [v3.9.0-rc1] - 2022-12-10
 
 Upgrade instructions can be found at [.wiki/Upgrading](.wiki/Upgrading.md).

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

@@ -1244,7 +1244,7 @@ export default {
 					const { _id, youtubeId, title, artists, thumbnail } = newSong;
 					const { likes, dislikes } = ratings;
 
-					SongsModule.runJob("UPDATE_SONG", { songId: _id });
+					if (_id) SongsModule.runJob("UPDATE_SONG", { songId: _id });
 
 					if (playlist.type === "user-liked") {
 						CacheModule.runJob("PUB", {
@@ -1904,7 +1904,7 @@ export default {
 					if (ratings && (playlist.type === "user-liked" || playlist.type === "user-disliked")) {
 						const { likes, dislikes } = ratings;
 
-						SongsModule.runJob("UPDATE_SONG", { songId: _id });
+						if (_id) SongsModule.runJob("UPDATE_SONG", { songId: _id });
 
 						if (playlist.type === "user-liked") {
 							CacheModule.runJob("PUB", {

+ 10 - 18
backend/logic/youtube.js

@@ -1069,15 +1069,11 @@ class _YouTubeModule extends CoreClass {
 				youtubeApiRequest.save();
 
 				const { ...keylessParams } = payload.params;
-				CacheModule.runJob(
-					"HSET",
-					{
-						table: "youtubeApiRequestParams",
-						key: youtubeApiRequest._id.toString(),
-						value: JSON.stringify(keylessParams)
-					},
-					this
-				).then();
+				CacheModule.runJob("HSET", {
+					table: "youtubeApiRequestParams",
+					key: youtubeApiRequest._id.toString(),
+					value: JSON.stringify(keylessParams)
+				}).then();
 
 				YouTubeModule.apiCalls.push({ date: youtubeApiRequest.date, quotaCost });
 
@@ -1090,15 +1086,11 @@ class _YouTubeModule extends CoreClass {
 						if (response.data.error) {
 							reject(new Error(response.data.error));
 						} else {
-							CacheModule.runJob(
-								"HSET",
-								{
-									table: "youtubeApiRequestResults",
-									key: youtubeApiRequest._id.toString(),
-									value: JSON.stringify(response.data)
-								},
-								this
-							).then();
+							CacheModule.runJob("HSET", {
+								table: "youtubeApiRequestResults",
+								key: youtubeApiRequest._id.toString(),
+								value: JSON.stringify(response.data)
+							}).then();
 
 							resolve({ response });
 						}

+ 9 - 9
backend/package-lock.json

@@ -1,16 +1,16 @@
 {
   "name": "musare-backend",
-  "version": "3.9.0-rc1",
+  "version": "3.9.0",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
       "name": "musare-backend",
-      "version": "3.9.0-rc1",
+      "version": "3.9.0",
       "license": "GPL-3.0",
       "dependencies": {
         "async": "^3.2.4",
-        "axios": "^1.2.1",
+        "axios": "^1.1.3",
         "bcrypt": "^5.1.0",
         "bluebird": "^3.7.2",
         "body-parser": "^1.20.1",
@@ -676,9 +676,9 @@
       "license": "MIT"
     },
     "node_modules/axios": {
-      "version": "1.2.1",
-      "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.1.tgz",
-      "integrity": "sha512-I88cFiGu9ryt/tfVEi4kX2SITsvDddTajXTOFmt2uK1ZVA8LytjtdeyefdQWEf5PU8w+4SSJDoYnggflB5tW4A==",
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/axios/-/axios-1.1.3.tgz",
+      "integrity": "sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA==",
       "dependencies": {
         "follow-redirects": "^1.15.0",
         "form-data": "^4.0.0",
@@ -4531,9 +4531,9 @@
       "version": "0.4.0"
     },
     "axios": {
-      "version": "1.2.1",
-      "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.1.tgz",
-      "integrity": "sha512-I88cFiGu9ryt/tfVEi4kX2SITsvDddTajXTOFmt2uK1ZVA8LytjtdeyefdQWEf5PU8w+4SSJDoYnggflB5tW4A==",
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/axios/-/axios-1.1.3.tgz",
+      "integrity": "sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA==",
       "requires": {
         "follow-redirects": "^1.15.0",
         "form-data": "^4.0.0",

+ 2 - 2
backend/package.json

@@ -1,7 +1,7 @@
 {
   "name": "musare-backend",
   "private": true,
-  "version": "3.9.0-rc1",
+  "version": "3.9.0",
   "type": "module",
   "description": "An open-source collaborative music listening and catalogue curation application. Currently supporting YouTube based content.",
   "main": "index.js",
@@ -17,7 +17,7 @@
   },
   "dependencies": {
     "async": "^3.2.4",
-    "axios": "^1.2.1",
+    "axios": "^1.1.3",
     "bcrypt": "^5.1.0",
     "bluebird": "^3.7.2",
     "body-parser": "^1.20.1",

+ 2 - 2
frontend/package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "musare-frontend",
-  "version": "3.9.0-rc1",
+  "version": "3.9.0",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
       "name": "musare-frontend",
-      "version": "3.9.0-rc1",
+      "version": "3.9.0",
       "license": "GPL-3.0",
       "dependencies": {
         "@intlify/vite-plugin-vue-i18n": "^6.0.3",

+ 1 - 1
frontend/package.json

@@ -5,7 +5,7 @@
     "*.vue"
   ],
   "private": true,
-  "version": "3.9.0-rc1",
+  "version": "3.9.0",
   "description": "An open-source collaborative music listening and catalogue curation application. Currently supporting YouTube based content.",
   "main": "main.js",
   "author": "Musare Team",

+ 1 - 1
frontend/src/components/MainFooter.vue

@@ -46,7 +46,7 @@ onMounted(async () => {
 		<div class="container">
 			<div class="footer-content">
 				<div id="footer-copyright">
-					<p>© Copyright Musare 2015 - 2022</p>
+					<p>© Copyright Musare 2015 - 2023</p>
 				</div>
 				<router-link id="footer-logo" to="/">
 					<img

+ 2 - 1
frontend/src/components/Queue.vue

@@ -141,7 +141,7 @@ onUpdated(() => {
 		>
 			<draggable-list
 				v-model:list="queue"
-				item-key="_id"
+				item-key="youtubeId"
 				@start="drag = true"
 				@end="drag = false"
 				@update="repositionSongInQueue"
@@ -153,6 +153,7 @@ onUpdated(() => {
 						:requested-by="true"
 						:disabled-actions="[]"
 						:ref="el => (songItems[`song-item-${index}`] = el)"
+						:key="`queue-song-item-${element.youtubeId}`"
 					>
 						<template
 							v-if="hasPermission('stations.queue.reposition')"

+ 1 - 1
frontend/src/components/RunJobDropdown.vue

@@ -75,7 +75,7 @@ const runJob = job => {
 			<div class="nav-dropdown-items" v-if="jobs.length > 0">
 				<quick-confirm
 					v-for="(job, index) in jobs"
-					:key="`job-${index}`"
+					:key="`job-${index}-${job.name}-${job.id}`"
 					placement="top"
 					@confirm="runJob(job)"
 				>

+ 1 - 1
frontend/src/components/SongItem.vue

@@ -172,7 +172,7 @@ onUnmounted(() => {
 					<strong>
 						<user-link
 							v-if="song.requestedBy"
-							:key="song._id"
+							:key="song.youtubeId"
 							:user-id="song.requestedBy"
 						/>
 						<span v-else>station</span>

+ 2 - 1
frontend/src/components/modals/EditPlaylist/index.vue

@@ -419,7 +419,7 @@ onBeforeUnmount(() => {
 						<draggable-list
 							v-if="playlistSongs.length > 0"
 							v-model:list="playlistSongs"
-							item-key="_id"
+							item-key="youtubeId"
 							@start="drag = true"
 							@end="drag = false"
 							@update="repositionSong"
@@ -435,6 +435,7 @@ onBeforeUnmount(() => {
 											(songItems[`song-item-${index}`] =
 												el)
 									"
+									:key="`playlist-song-${element.youtubeId}`"
 								>
 									<template #tippyActions>
 										<i

+ 4 - 4
frontend/src/components/modals/ImportAlbum.vue

@@ -628,12 +628,12 @@ onBeforeUnmount(() => {
 					<draggable-list
 						v-if="playlistSongs.length > 0"
 						v-model:list="playlistSongs"
-						item-key="_id"
+						item-key="youtubeId"
 						:group="`import-album-${modalUuid}-songs`"
 					>
 						<template #item="{ element }">
 							<song-item
-								:key="`playlist-song-${element._id}`"
+								:key="`playlist-song-${element.youtubeId}`"
 								:song="element"
 							>
 							</song-item>
@@ -657,12 +657,12 @@ onBeforeUnmount(() => {
 						<div class="track-box-songs-drag-area">
 							<draggable-list
 								v-model:list="trackSongs[index]"
-								item-key="_id"
+								item-key="youtubeId"
 								:group="`import-album-${modalUuid}-songs`"
 							>
 								<template #item="{ element }">
 									<song-item
-										:key="`track-song-${element._id}`"
+										:key="`track-song-${element.youtubeId}`"
 										:song="element"
 									>
 									</song-item>

+ 1 - 1
frontend/src/index.html

@@ -19,7 +19,7 @@
 		/>
 		<meta
 			name="copyright"
-			content="© Copyright Musare 2015-2022 All Right Reserved"
+			content="© Copyright Musare 2015-2023 All Right Reserved"
 		/>
 
 		<link

+ 2 - 2
frontend/src/pages/Station/index.vue

@@ -2341,7 +2341,7 @@ onBeforeUnmount(() => {
 								:class="{ 'no-currently-playing': noSong }"
 							>
 								<song-item
-									:key="`songItem-currentSong-${currentSong._id}`"
+									:key="`songItem-currentSong-${currentSong.youtubeId}`"
 									:song="currentSong"
 									:duration="false"
 									:requested-by="true"
@@ -2354,7 +2354,7 @@ onBeforeUnmount(() => {
 								class="quadrant"
 							>
 								<song-item
-									:key="`songItem-nextSong-${nextSong._id}`"
+									:key="`songItem-nextSong-${nextSong.youtubeId}`"
 									:song="nextSong"
 									:duration="false"
 									:requested-by="true"