Browse files

Music should get options, not just lastfm adapter

  • Loading branch information...
1 parent ae28be7 commit ceb15c9b16a85171776a1d4d5647d42569e73099 @despawnerer despawnerer committed Mar 11, 2012
Showing with 6 additions and 6 deletions.
  1. +3 −1 static/js/lrcs/main.js
  2. +3 −5 static/js/lrcs/music.js
View
4 static/js/lrcs/main.js
@@ -5,7 +5,9 @@ $(function() {
apiKey: $('meta[name=last-fm-api-key]').attr('content')
});
- lrcs.music = new lrcs.Music(lrcs.lastFm);
+ lrcs.music = new lrcs.Music({
+ lastFm: lrcs.lastFm
+ });
var app = new lrcs.models.App(),
appView = new lrcs.views.AppView({ model: app });
View
8 static/js/lrcs/music.js
@@ -3,12 +3,11 @@ var lrcs = lrcs || {};
(function(lrcs) {
-
lrcs.Music = function() { this.initialize.apply(this, arguments); }
lrcs.Music.prototype = {
- initialize: function(lastfm) {
- this.lastfm = lastfm;
+ initialize: function(options) {
+ this.lastfm = options.lastFm;
},
// query
@@ -63,7 +62,6 @@ var lrcs = lrcs || {};
return new lrcs.models.Track(data);
}
- }
-
+ };
})(lrcs);

0 comments on commit ceb15c9

Please sign in to comment.