                 @storage.queue = JSON.stringify queue
                 @queuedSongs = queue
                 @trigger "remove", removed, index
+                @trigger "queueChange"
                 return removed
 
         show: =>
                 return @queuedSongs
+
+        playbackQueue: =>
+                return @playbackFiles
 
 
 class PlaybackType

                @storage.queue = JSON.stringify @fullQueue()
                @_removeRandom()
                @trigger "add", song
                return @queuedSongs.length

        remove: (index) =>

PRELOAD_COUNT = 20
# Even though all songs can not be converted in 10 seconds, this at least
# ensures that a long running song will not completely destroy the preload
# performance.
PRELOAD_WAIT_TIMEOUT = 10 * 1000

RESIZE_UPDATE_DELAY = 500
SEARCH_UPDATE_PRELOAD_DELAY = 2000
CONVERSION_WAIT_TIMEOUT = 180 * 1000

MINIMUM_PROGRESS_FILES = 10000
FILE_PROGRESS_UPDATE_INTERVAL = 2000
