'use strict';

/**
 * Service to handle all scrobbling behaviour.
 */
define([], function () {
	var scrobblers = [];

	console.log('ScrobbleService: start ' + scrobblers.length);

	var hasScrobbler = function() {
		return scrobblers.length !== 0;
	};

	return {
		bindScrobbler: function (scrobbler) {
			if (!scrobblers.some(function(s) { return s.getLabel() === scrobbler.getLabel();})) {
				scrobblers.push(scrobbler);
				console.log('ScrobbleService: bindScrobbler() ' + scrobbler.getLabel() + ' total:' + scrobblers.length);
			}
		},

		unbindScrobbler: function (scrobbler) {
			console.log('ScrobbleService: unbindScrobbler() ' + scrobbler.getLabel() + ' total:' + scrobblers.length);
			scrobblers = scrobblers.filter(
				function (s) {
					if (s !== scrobbler) {
						return s;
					}
				}
			);
		},
		sendNowPlaying: function (song, cb) {
			console.log('ScrobbleService: sendNowPlaying() ' + scrobblers.length);
			scrobblers.forEach(function (scrobbler) {
				scrobbler.sendNowPlaying(song, cb);
			});
		},

		scrobble: function (song, cb) {
			console.log('ScrobbleService: scrobble() ' + scrobblers.length);
			scrobblers.forEach(function (scrobbler) {
				scrobbler.scrobble(song, cb);
			});
		},

		hasScrobblers: hasScrobbler,

		getFirstBound: function() {
			if (!hasScrobbler()) {
				throw 'No Scrobblers Bound';
			}

			return scrobblers[0];
		}
	};
});

@@ -146,13 +146,21 @@
 ce: 
-start
+init() total:
  ' +
@@ -182,19 +182,25 @@
 gth);%0A%0A%09
-var
+ function
  hasScro
@@ -208,19 +208,8 @@
 bler
- = function
 () %7B
@@ -245,17 +245,16 @@
 == 0;%0A%09%7D
-;
 %0A%0A%09retur

Rework a little