New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

spotify-to-ytmusic

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spotify-to-ytmusic - npm Package Compare versions

Comparing version 1.0.8 to 1.1.0

18

index.js

@@ -56,10 +56,24 @@ const YoutubeMusic = require('node-youtube-music')

// Replace Title
async function replaceTitle(title) {
let toCut = title.slice(title.indexOf(' ('), title.length)
if (title.indexOf(' (') < 0) toCut = ''
let title_ = title.replace(toCut, '')
toCut = title.slice(title.indexOf(' - '), title.length)
if (title.indexOf(' - ') < 0) toCut = ''
title_ = title_.replace(toCut, '')
return title_
}
// Search on YouTube Music
let track = tracks[i]
let content = await YoutubeMusic.searchMusics(`name: ${track.name}, artists: ${track.artists.map(artist => artist.name).join(', ')}`)
let content = await YoutubeMusic.searchMusics(`${await replaceTitle(track.name)} ${track.artists.map(artist => artist.name).join(' ')}`)
// Select Song
content.length < 1 ? ytList.push(null) : ytList.push(`https://www.youtube.com/watch?v=${content[0].youtubeId}`)
content = content.filter(async (song) => await replaceTitle(song.title) === await replaceTitle(track.name))
content = content.filter(song => song.artists.map(artist => artist.name).join(', ') === track.artists.map(artist => artist.name).join(', '))
content.length < 1 ? ytList.push(null) : ytList.push(content[0])
}

@@ -66,0 +80,0 @@

2

package.json
{
"name": "spotify-to-ytmusic",
"version": "1.0.8",
"version": "1.1.0",
"description": "Convert songs from Spotify to YouTube Music!",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -9,2 +9,3 @@ # Spotify to YouTube Music

> - **spotify-to-ytmusic** is now much faster.
> - The **YouTube Music** results are now much more accurate.

@@ -11,0 +12,0 @@ ## Installation

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc