Log scrobblings

This commit is contained in:
magnolia-fan
2011-11-29 23:42:21 +04:00
parent 74b5619748
commit 41e9165ff4
12 changed files with 116 additions and 77 deletions
+1 -2
View File
@@ -183,8 +183,7 @@ class window.Player
false
scrobble: (track) ->
if _session.getUser().lastfm_username
_session.query '/lastfm/scrobble?r=' +Math.random(), track
_session.query '/lastfm/scrobble?r=' +Math.random(), track
false
emptyPlaylist: ->
+2 -2
View File
@@ -9,8 +9,8 @@ class window.Settings
false
updateLastfmLogin: ->
log "Updating Last.fm info ..."
if window.lastfm_popup.closed
log "Updating Last.fm info ..."
_session.query '/user/auth', {}, (ar) ->
_session.setUser ar.user
if _session.user.lastfm_username not in ["", null]
@@ -68,7 +68,7 @@ $('.lastfm-disconnect').live 'click', ->
_settings.saveAccountInfo {
params:
lastfm_username: ""
lastfm_token: ""
lastfm_key: ""
}, (ar) ->
_session.setUser ar.user
$('#settings .lastfm-on').hide()