diff --git a/TODO b/TODO index 8ad75d5..e4ec7ba 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,3 @@ -* when playlist is empty... - - alt right click broken - - arrow keys don't do anything in library - - dynamic mode doesn't work unless paused * if you select the last track in blink 182 enema of the state and press down, it goes to the wrong track next diff --git a/src/app.coffee b/src/app.coffee index 6c0e48e..9ece383 100644 --- a/src/app.coffee +++ b/src/app.coffee @@ -455,8 +455,6 @@ nextRepeatState = -> keyboard_handlers = do -> upDownHandler = (event) -> - return unless mpd.playlist.item_list.length - if event.keyCode == 38 # up default_index = mpd.playlist.item_list.length - 1 dir = -1 diff --git a/src/daemon.coffee b/src/daemon.coffee index 6b75986..e07e709 100644 --- a/src/daemon.coffee +++ b/src/daemon.coffee @@ -140,9 +140,10 @@ setDynamicMode = (value) -> previous_ids = {} checkDynamicMode = -> return unless stickers_enabled - return unless my_mpd.status?.current_item? + return unless my_mpd.library.artists.length + return unless got_stickers 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 = [] @@ -203,6 +204,7 @@ scrubStaleUserNames = -> sendStatus() sticker_name = "groovebasin.last-queued" +got_stickers = false updateStickers = -> my_mpd.sendCommand "sticker find song \"/\" \"#{sticker_name}\"", (msg) -> current_file = null @@ -217,6 +219,7 @@ updateStickers = -> track.last_queued = new Date(value) else log.error "#{current_file} has a last-queued sticker of #{value} but we don't have it in our library cache." + got_stickers = true getRandomSongFiles = (count) -> return [] if count == 0