Foobar2000:Components/Queue Contents Editor (foo queuecontents)

From Hydrogenaudio Knowledgebase
Foobar2000_Logo.png
Queue Contents Editor

General

foo_queuecontents enables the user to edit and view queue contents through an ui element. Both the Default User Interface (DUI) and Columns User Interface (CUI/uie) are supported. As a legacy option, queue contents can also be viewed and edited by a special queue playlist, which is updated automatically with queue contents.

The component started as a modification of foo_locktest (by foosion) but since then it has developed much further.

Download link

The component is available from here. Unzip foo_queuecontents.dll to foobar2000 components directory (typically c:\Program Files\foobar2000\components).

Source code for the component is available from [1]. The licence is inside the zip file.

Discussion

Please use this thread to provide feedback, or to report any bugs you might have found.

Requirements

foobar2000 1.x and Column UI 0.3.8.x (Optional). The component will not work with previous versions of foobar.

Getting started

TODO:Write something here

Features and Usage

As stated before the component supports two kind of interfaces: UI element (CUI/DUI) and a special playlist for displaying/editing queue contents.

UI Element

UI Element: Context menu for queue items
UI Element: Context menu for column header

UI element works with both popular user interfaces for foobar: Default UI and Columns UI. Following features are supported in each:

  • Views items currently in the queue using interface similar to foobar default playlist component.
  • Reorder queue items by drag & drop, and by using keyboard shortcuts similar to foobar default playlist component.
  • Delete queue items.
  • Add items to queue by drag & drop. Files can be dragged either outside or inside from foobar. Files that are dragged from a foobar playlist are queued in the same way they would have been if 'Add to Playback Queue' context menu option would have been used.
  • Fully user-customizable columns in the UI element. You can add, delete and reorder columns however you like.
  • Optionally auto-size of columns so that column width/element width ratio is kept constant.
  • Optionally show or hide column header.

Playlist (legacy)

Queue playlist functionality has been from the start. It is now considered obsolete/legacy option since reflecting queue contents in a separate playlist is confusing to say the least. It also has strange behaviour (due to inherent features of a playlist) that might confuse people. However, the functionality is preserved for compatibility reasons. UI element is recommended over the playlist functionality.

Features:

  • Queue contents are reflected to a special playlist. The items are ordered according to their queue position, i.e. items on the top of the playlist are played first.
  • All changes (deletions, insertions and reordering) to playlist is reflected also to queue.
  • Queue playlist name can be changed by just renaming the playlist. It can also be changed from the foobar preferences.
  • Queue playlist functionality is disabled by default but it can be enabled from the preferences.

Configuration

Queue Contents Editor Preferences

Configuration of the columns is very straight-forward and should be familiar to anyone with foobar DUI experience. Each column has the following properties:

  • Name, used for the column header in the UI element
  • Pattern, format string for displaying information about the queue item. Click Syntax Help for more information on format strings.
  • Alignment, alignment of the column.

In the pattern you can also use %queue_index% to reference item's position in the queue (first one has index 1), and %queue_total% to reference items currently in a queue.

For each queuecontents UI element you have, you can choose different columns by right-clicking the column header.


As a legacy option, foo_queuecontents supports reflecting of playlist contents to a special playlist. You can enable/disable the functionality from the preferences using the checkbox Enable Queue Playlist Feature.

Change Log

  • Upcoming version 0.3.2 / 2010-04-xx
    • Bug fixes:
      • Changes to column names are updated immediately in ui elements.
      • "Show Column Header" setting is now correctly preserved over different foobar2000 sessions.
      • ESC button works as expected in the preferences dialog: it closes it.
      • Fixed column size glitches when enabling/disabling auto-sizing of columns
    • Improvements:
      • Preferences dialog: When configuring columns, no need to press return key anymore, text is committed automatically. Also improved processing of ESC and other keys in the prerences.
      • Preferences dialog: Columns are sized reasonably by default
      • Preferences dialog: Syntax Help button for HA Syntax Help.
      • Drag from playlist to ui element now correctly queues the item preserving the "link" to the playlist (i.e. playlist items will have %queue_index%) for the dragged items in the playlist).
      • Preferences dialog: Help button brings to this wiki page.
        • Behaviour tested with DUI playlist and various playlist components for CUI.
        • NOTE: As far as I know there is no proper way to do this, and currently the program checks every drop against the active playlist selection. If they are the same (same items and in the same order), drop is interpreted as queuing from the playlist. In addition, I've implemented a check that matches the dropped items against currently selected items. Currently selected items are the selected items of the currently focused UI element. This is not 100% fool proof but it should work in 99.9 % of the regular cases. (And in the 0.01 % of the cases it still doesn't explode the universe).
    • Other:
      • Queue playlist functionality is now disabled by default for new installations.
  • 0.3.1 / 2010-04-13
    • Bug fixes:
      • Foobar2000 keyboard shortcuts now work even if the uie element has the focus
      • Fixed column autosizing logic when resizing or adding a column
  • 0.3 / 2010-04-13
    • Note that you will lose the format string you defined in version 0.2 when moving to a newer version. Please backup the format string before updating the component!
    • Bug fixes:
      • reordering of queue playlist might fail if the playlist corresponding to a queue item is removed.
      • Wrong colors with default ui element when using system colors
      • When disabling queue playlist functionality, the playlist lock wasn't removed
      • When drag & dropping items to queue playlist, they are added twice.
      • Different selection logic in ui element when compared to default ui playlist
    • Improvements:
      • Columns ui element support (CUI). Uses CUI font and color configuration facilities.
      • Added user-configurable columns support to ui elements. Columns can be configured from settings
      • Drag & Drop support for ui element outside and inside of foobar2000. Queue order can also be changed by drag & drop.
      • Added context menu to ui element with "Show Column Header", "Auto-Scale columns with Window Size", "Move To Top", "Move To Bottom" and "Delete" options.
      • selection of queue item(s) in the ui element is reflected in "Selection Properties" (and others like album art) UI element.
      • Focus and selection rectangle follows default ui playlist style (i.e. solid line)