Socket
Socket
Sign inDemoInstall

rdiojs

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rdiojs - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

31

lib/index.js
var pkg = require('../package.json'),
sh = require('shelljs'),
request = require('request'),
rdioNames = ['Rdio', 'Oi Rdio'],
rdioName,
appNames = ['Rdio', 'Oi Rdio', 'Spotify', 'iTunes'],
appName,
track;

@@ -10,7 +10,7 @@

rdioNames.every(function(name) {
appNames.every(function(name) {
track = sh.exec('osascript -e \'tell app "' + name + '" to get the name of the current track\'', {silent: true});
if (track.code === 0) {
rdioName = name;
return false
appName = name;
return false;
}

@@ -20,9 +20,14 @@ return true;

if (rdioName === undefined) {
console.log('Unable to find Rdio or Oi Rdio');
if (appName === undefined) {
console.log('Unable to find Rdio, Oi Rdio, Spotify or iTunes');
process.exit(1);
}
console.log('');
console.log('(' + appName + ' encontrado)');
console.log('');
console.log('---');
track = track.output;
var artist = sh.exec('osascript -e \'tell app "' + rdioName + '" to get the artist of the current track\'', {silent: true}).output;
var artist = sh.exec('osascript -e \'tell app "' + appName + '" to get the artist of the current track\'', {silent: true}).output;

@@ -39,10 +44,10 @@ track = track.replace('\n', '');

if(data.mus && data.mus.length > 0) {
console.log(data.mus[0].text)
console.log(data.mus[0].text);
if(data.mus[0].translate && data.mus[0].translate.length > 0) {
console.log('')
console.log('---')
console.log('')
console.log(data.mus[0].translate[0].text)
console.log('');
console.log('---');
console.log('');
console.log(data.mus[0].translate[0].text);
}
}
});
{
"name": "rdiojs",
"version": "0.0.5",
"description": "Rdio NodeJS Cli",
"version": "0.0.6",
"description": "Rdio/Spotify/iTunes NodeJS Cli",
"main": "app.js",

@@ -6,0 +6,0 @@ "scripts": {

@@ -1,2 +0,2 @@

#rdiojs -- Rdio NodeJS Cli
#rdiojs -- Rdio/Spotify/iTunes NodeJS Cli

@@ -3,0 +3,0 @@ [![NPM](https://nodei.co/npm/rdiojs.png?downloads=true&stars=true)](https://nodei.co/npm/rdiojs/)

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