Skip to content

Commit fe63164

Browse files
committed
added artists length check
1 parent 7e003db commit fe63164

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,11 @@ async function SpotifyToYouTubeMusic({ clientID, clientSecret, accessToken }) {
7373
// Select Song
7474

7575
content = content.filter(song => replaceTitle(song.title) === replaceTitle(track.name))
76+
content = content.filter(song => song.artists.length > 0)
7677
content = content.filter(song => song.artists[0].name === track.artists[0].name)
77-
78+
7879
// Filter Explicit
79-
80+
8081
let explicit = content.filter(song => song.isExplicit)
8182
content = explicit.length > 0 ? explicit : content
8283

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "spotify-to-ytmusic",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "Convert songs from Spotify to YouTube Music!",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)