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. Install the .zip package in "Preferences > Components", or manually by unziping foo_queuecontents.dll to foobar2000 components directory.

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

The recommended way to use foo_queuecontents is to use the UI element. Just add the panel as you would any other UI element. The element can be found under Utility category in DUI, or under Panels category in CUI with the name Queue Contents Editor.

The component is ready to use :)

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 through the context menu, or pressing the delete key.
  • 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 with the Add to Playback Queue command.
  • Fully user-customizable columns in the UI element. You can add, delete and reorder columns however you like. User can define new columns with custom format strings from the preferences.
  • Optionally auto-size of columns so that column width/element width ratio is kept constant (Auto-scale Columns with Window Size).
  • Optionally show or hide the column header. You can always show the column header by clicking anywhere in the UI element and clicking Show 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 to display 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

  • 0.4.0 / 2010-02-24
    • Bug fixes:
      • Fixed bug with newest columns ui and foobar 1.1.3+. With autosize enabled, all the columns disappeared on foobar start.
      • Component about dialog now has correct wiki url (pointing to this page)
  • 0.3.9 / 2010-05-20
    • Bug fixes:
      • Finally fixed the bug which broke completely the queuecontents playlist behaviour.
    • Improvements:
      • More default columns. They will be visible only for new installations (or if you reset your settings).
      • Better component description.
  • 0.3.8 / 2010-05-19
    • Bug fixes:
      • Drag & Drop from queue playlist to UI element works now as expected (it will queue the items again to the specified position in the queue).
      • Removed warning related to configuration on first UI element startup since it is always expected.
    • Improvements:
      • Drag & Drop to UI element from a playlist queues items to correct position
  • 0.3.7 / 2010-05-18
    • Bug fixes:
      • Erratic queue playlist behaviour fixed.
    • Improvements:
      • Queue playlist supports drag & drop better.
  • 0.3.6 / 2010-05-15
    • Bug fixes:
      • Queue playlist item reorder problems solved.
      • Fixed crash when removing queuecontents panel when using Columns UI.
  • 0.3.5 / 2010-05-07
    • Bug fixes:
      • Column order is preserved correctly after drag & drop of columns.
  • 0.3.4 / 2010-05-07
    • Bug fixes:
      • Left and Right cursor keys works correctly in preferences when editing columns.
  • 0.3.3 / 2010-04-22
    • Bug fixes:
      • Alignment of columns is now correctly displayed in the settings.
  • 0.3.2 / 2010-04-20
    • 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:
      • %queue_total% supported in format strings.
      • UI element automatically refreshes items when one of the queue items has a metadata change.
      • UI element has the same border style than the DUI playlist view.
      • 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.
      • Preferences dialog: Help button brings to this wiki page.
      • 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).
        • 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)