       start = Math.max 0, end - displayLength
     visibleIndexes = @visible[start...end]
     for index in visibleIndexes
-      title = @songInfo.title @data[index]
-      album = @songInfo.album @data[index]
-      artist = @songInfo.artist @data[index]
-      resultData.push [index, title, album, artist]
+      resultData.push getDisplayData @songInfo, @data[index]
     result =
       totalRecords: @data.length
       totalDisplayRecords: @visible.length

  queueWrapper.hide()

  queue.on "add", (song) ->
    table.fnAddData song

  queue.on "next", (song) ->
    data = table.fnGetData()

    iPos = table.fnGetPosition @
    song = queue.remove iPos
    player.play song


getDisplayData = (songInfo, song) ->
  index = songInfo.index song
  title = songInfo.title song
  album = songInfo.album song
  artist = songInfo.artist song
  return [index, title, album, artist]


class DataFilteringView
