diff options
| author | Teddy Wing | 2013-04-28 13:17:41 -0400 | 
|---|---|---|
| committer | Teddy Wing | 2013-04-28 13:17:41 -0400 | 
| commit | 21a4f1acb0141867e43db955b97c50aab3e8cb52 (patch) | |
| tree | cc2fd5cbcdbb7b9d9355b362dd4cb9c05a552af6 /routes | |
| parent | d45be8d67a423d0bc101850c3ac30fbd0d668a65 (diff) | |
| download | Who-am-I-21a4f1acb0141867e43db955b97c50aab3e8cb52.tar.bz2 | |
Don't filter characters with role=Actor
Because there was a mysterious error when I was getting results for
role=Voice. Shoot. Spent too much time on that.
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/character-images.js | 27 | 
1 files changed, 14 insertions, 13 deletions
| diff --git a/routes/character-images.js b/routes/character-images.js index 581f5b6..f506fdd 100644 --- a/routes/character-images.js +++ b/routes/character-images.js @@ -20,20 +20,22 @@ module.exports = function(req, res) {  				var actor_count = r.cast.length;  				var the_other = that;  				for (var i = 0; i < r.cast.length; i++) { -					if (r.cast[i].role === 'Actor') { -						that.person_request(r.cast[i].personId, {character_name: r.cast[i].characterName}, function(success) { -							if (request_count == (r.cast.length - 1)) { -								the_other.render(); -							} -							 -							if (!success) { -								actor_count--; -							} -							request_count++; -						}); -					} +					that.person_request(r.cast[i].personId, {character_name: r.cast[i].characterName}, function(success) { +						if (request_count == (actor_count - 1)) { +							the_other.render(); +						} +						 +						if (!success) { +							actor_count--; +						} +						request_count++; +					});  				}  			} +			else { +				console.log('ERROR:'+error); +				console.log('STATUS-CODE:'+response.statusCode); +			}  		});  	}; @@ -52,7 +54,6 @@ module.exports = function(req, res) {  					name: params.character_name,  					tms_personId: r.personId  				}); -				console.log(r);  				callback(true);  			} | 
