Don't be so dumb
This commit is contained in:
parent
49cf87d5c9
commit
e9a5f6713d
6 changed files with 6 additions and 6 deletions
|
@ -91,7 +91,7 @@ module.exports.search = function(data) {
|
|||
request.get(apiRoot + path, function(res) {
|
||||
if (!res.body.data[0]) {
|
||||
var matches = album.match(/^[^\(\[]+/);
|
||||
if (matches[0]) {
|
||||
if (matches[0] && matches[0] != album) {
|
||||
var cleanedData = JSON.parse(JSON.stringify(data));
|
||||
if (type == "album") {
|
||||
cleanedData.name = matches[0].trim();
|
||||
|
|
|
@ -79,7 +79,7 @@ module.exports.search = function(data, next) {
|
|||
request.get(apiRoot + path, function(res) {
|
||||
if (!res.body.data[0]) {
|
||||
var matches = album.match(/^[^\(\[]+/);
|
||||
if (matches[0]) {
|
||||
if (matches[0] && matches[0] != album) {
|
||||
var cleanedData = JSON.parse(JSON.stringify(data));
|
||||
if (type == "album") {
|
||||
cleanedData.name = matches[0].trim();
|
||||
|
|
|
@ -84,7 +84,7 @@ module.exports.search = function(data) {
|
|||
pm.search(query, 5, function(result) {
|
||||
if (!result.entries) {
|
||||
var matches = album.match(/^[^\(\[]+/);
|
||||
if (matches[0]) {
|
||||
if (matches[0] && matches[0] != album) {
|
||||
var cleanedData = JSON.parse(JSON.stringify(data));
|
||||
if (type == "album") {
|
||||
cleanedData.name = matches[0].trim();
|
||||
|
|
|
@ -72,7 +72,7 @@ module.exports.search = function(data) {
|
|||
|
||||
if (!result.results[0]) {
|
||||
var matches = album.match(/^[^\(\[]+/);
|
||||
if (matches[0]) {
|
||||
if (matches[0] && matches[0] != album) {
|
||||
var cleanedData = JSON.parse(JSON.stringify(data));
|
||||
if (type == "album") {
|
||||
cleanedData.name = matches[0].trim();
|
||||
|
|
|
@ -122,7 +122,7 @@ module.exports.search = function(data) {
|
|||
|
||||
if (!result) {
|
||||
var matches = albumClean.match(/^[^\(\[]+/);
|
||||
if (matches[0]) {
|
||||
if (matches[0] && matches[0] != album) {
|
||||
var cleanedData = JSON.parse(JSON.stringify(data));
|
||||
if (type == "album") {
|
||||
cleanedData.name = matches[0].trim();
|
||||
|
|
|
@ -77,7 +77,7 @@ module.exports.search = function(data) {
|
|||
|
||||
if (!data[type + "s"].items[0]) {
|
||||
var matches = album.match(/^[^\(\[]+/);
|
||||
if (matches[0]) {
|
||||
if (matches[0] && matches[0] != album) {
|
||||
var cleanedData = JSON.parse(JSON.stringify(data));
|
||||
if (type == "album") {
|
||||
cleanedData.name = matches[0].trim();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue