trying to fix a restore dynamic mode state bug

This commit is contained in:
Josh Wolfe 2012-03-04 18:52:30 -07:00
parent 82024bf221
commit b7499e44eb
2 changed files with 4 additions and 1 deletions

View file

@ -126,8 +126,9 @@ setDynamicMode = (value) ->
previous_ids = {}
checkDynamicMode = ->
return unless stickers_enabled
return unless my_mpd.initialized
item_list = my_mpd.playlist.item_list
current_id = my_mpd.status?.current_item?.id
current_id = my_mpd.status.current_item?.id
current_index = -1
all_ids = {}
new_files = []

View file

@ -357,6 +357,7 @@ exports.Mpd = class Mpd
######################### public #####################
constructor: ->
@initialized = false
@buffer = ""
@msgHandlerQueue = []
# assign to console to enable message passing debugging
@ -434,6 +435,7 @@ exports.Mpd = class Mpd
@updateLibrary()
@updateStatus()
@updatePlaylist()
@initialized = true
sendCommand: (command, callback=noop) =>
@send "noidle\n" if @idling