Skip to content

Commit

Permalink
fixed consumer key bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Wahlforss authored and Eric Wahlforss committed Nov 22, 2010
1 parent 44aa87f commit 1a9d03a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions scripts/player.js
Expand Up @@ -20,6 +20,8 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

var CONSUMER_KEY = "UdbhZcCSuxR9AxcfR3uvgg";

SC.Player = SC.Class();
SC.Player.prototype = {
isPlaying: false,
Expand Down Expand Up @@ -579,7 +581,7 @@ SC.Player.prototype = {
var self = this;
this.audioTracks[id] = soundManager.createSound({
id: id,
url: track.stream_url + "?consumer_key=UdbhZcCSuxR9AxcfR3uvgg",
url: track.stream_url + "?consumer_key=" + CONSUMER_KEY,
volume : this.volume,
whileloading : SC.throttle(200,function() {
self.loading.css('width',(self.audio.bytesLoaded/self.audio.bytesTotal)*100+"%");
Expand Down Expand Up @@ -683,7 +685,7 @@ SC.Player.prototype = {
},
loadArtistInfo: function(uri) {
var self = this;
$.getJSON(uri + ".js?callback=?",function(user) {
$.getJSON(uri + ".js?callback=?" + "&consumer_key=" + CONSUMER_KEY,function(user) {
if(!user.city) {
user.city = "";
};
Expand Down
2 changes: 1 addition & 1 deletion scripts/playlist.js
Expand Up @@ -182,7 +182,7 @@ SC.Playlist.prototype = {
baseUrl += "&callback=?"; // add JSONP callback param
}
// limit to tracks under 20 mins long
baseUrl += "&duration[to]=1200000&limit=" + this.limit + "&consumer_key=UdbhZcCSuxR9AxcfR3uvgg"; // increase limit to 100
baseUrl += "&duration[to]=1200000&limit=" + this.limit + "&consumer_key=" + CONSUMER_KEY; // increase limit to 100
return baseUrl;
},
load : function() {
Expand Down

0 comments on commit 1a9d03a

Please sign in to comment.