Foobar2000:Components/Playlist Organizer (foo plorg)

From Hydrogenaudio Knowledgebase
Foobar2000_Logo.png
Playlist Organizer Main view

General

foo_plorg is a simple component that will let your organize your playlists in a treeview fashion. It is available as either a Column UI panel or an UI element for the default UI. It enables your to create folders, hierarchies and move around folders and playlists by dragging and dropping them wherever you want in the panel.

Download link

The component is available from here

Discussion

Please use this thread to provide feedback or report any bug.

Requirements

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

Getting started

Install the toolbar as an UI element (Default UI) or a column UI panel. The commands are available with a right click on the panel. Folders and Playlists be can selected by a left click, then moved and dropped around.

Usage

Basic Usage

The component implements a treeview control, basically made of playlist and folders. When the component is used for the first time, a "Default" folder will be created and all playlists placed in this folder.

The basic usage is to create folders (right click anywhere on the panel to access this function) and move your playlists within those newly created folders. Folders can be nested. Playlists and folders can be moved (e.g. Drag & Dropped) to their desired location within the hierarchy.

Playlist Organizer Visual status of playlists

Visual Indication for playlists

Based on the general or customized color scheme, foo_playlist_organizer will give an indication of Selected, Active and Playing playlists, as well as the source of Drag & Drop operations.

Please note that Selected and Active playlists will be kept equal (except for instance when selecting folders) when the "Activate on single click" option is chosen.

Windows Management

Using foo_plorg as a standalone (popup) window may lead to loosing part of your playlists organization if some changes (addition, deletion, reordering, ...) are applied with other playlist managers while the window is closed. The window startup is more or less intelligent to recognize such situations but it is by nature limited. It is recommended that you use it as a "permanent" panel or UI element rather.

The last known tree configuration is howered memorized and will be recalled when a new panel or UI element instance is created, so that the structure of the tree can be recovered.

Drag & Drop

Basic Drag & Drop

Basic drag & drop is triggered by selecting an item and keeping the left button presssed. A visual indication (dotted line around the item, small square below the mouse pointer) will be given that dragging has taken place. The selected item can be moved to the desired location and a visual indication (Colored insertion mark or rectangle for folders) of the drop target. Releasing the mouse button will move the dragged item in the requested location.

Note:

  • During a Drag & Drop operation, folders will expand after a short delay to expand their contents
  • Automatic scrolling of the treeview is triggered when the mouse approaches the top or bottom of the treeview.
  • Folders cannot be dropped into their childrens
  • Drag & Drop can take place across foobar windows (for instance in the playlist view), and also to other applications or windows (See Exporting playlists or contents below)

Drag & Drop with Ctrl Key

Pressing the Ctrl key wile a playlist is selected for dragging enables to manipulate the contents of the playlist and triggers a different behavior. The contents can be copied and add to another playlist, but not to a folder. A + sign will appear under the mouse cursor to indicate that this mode is active.

Please note that when the target playlist is locked for some reason (e.g. autoplaylists), no content can be added. A visual indication (small circle) is provided in this case below the mouse cursor.

Exporting playlists or content

Playlists selected as the source of a drag & drop operations can be exported to windows folder (or potentially other applications). Export uses the .fpl format to create playlists in the dropped location. Playlist contents (i.e. tracks) can be exported as well (but only when the Ctrl key is pressed at the start of the dragging operation). In this case, the files will be copied to the target location.

Importing playlists or content

Similarly, foo_playlist_organizer can act as the target of a drag & drop operation initiated in other foobar windows, windows other applications. The behavior in this case is similar to the basic drag & drop and a visual indication of the target location will be given, together with an indication in the status bar that content is being imported.

Note

  • The .fpl format is recognized as a valid source and playlists names will be preserved in this case.For other sources (e.g. other playlists formats, tracks, ...) a new playlist will be generated with some intelligent name generation based on similar metadata found in the tracks being imported.
  • The Ctrl key can be activated as well when importing content and will enable to add the content to existing playlists insted of creating new ones.

Context Menu

Playlist Organizer Context Menu

A context menu is available from everywhere in the treeview, from a mouse right click or using the Alt+Keydown short cut. Options are the following :

Activate

Will activate the chosen playlist. Note that activation happens automatically when "Activate on single click" is chosen in the preferences page. This option is also available using the Enter key.

Rename

Will rename the selected playlist or folder. This option is also available using the F2 key.

Remove

Will remove (delete) the selected playlist or folder. This option is also available using the Del key. Note that folders cannot be removed while they still contain playlists or other folders.

Sort

Will sort the content of the selected folder alphabetically.

Autoplaylist (or lock) properties

Will give access to the properties of an autoplaylist (when selected) or whatever is provided for other playlist locks.

Contents

Will give access to the standard context menu for the selected playlist.

Options

Enables the customization of the Treeview appearance (Item count for playlists, Framestyle and Colors). A "Reset" option is available to revert to the standard colors, frame style and item count. Please note that customizable colors are limited to Text, Background, Background (selected) and Active playlist, in order to remain consistent with the standard DUI color scheme. For CUI, the Active playlist colors defaults to the custom item frame color (See CUI standard color preferences)

Preferences

Will link to the general preferences page.

Restore

This entry will present the list of previously deleted playlists and enable to restore them. A menu entry ("Clear History") is available at the bottom of the list and will permanently delete the playlists. Note that the history is not remembered across session and deleted playlists will be permanently lost if foobar is closed.

Create Playlist, Create Folder

These options will create new playlist and folders. Note that the newly created playlist or folder will be positioned after a currently selected playlist or as the last child of a currently selected folder.

Note

  • When activated with the the Alt+Keydown shortcut, regular shortcuts are available for each of the menu entries (underlined letter, see picture for details).

Preferences

Playlist Organizer Context Menu

The preferences page is available from the preferences dialog (General->Playlist Organizer) and provides with the following options.

Behavior

  • Activate on single click will activate (e.g. make visible on the playlist renderer) the selected playlist on a single click. Please note that when this option is selected and a playlist is activated by other means (for example the standard playlist switcher), it will be automatically selected and thus made visible as a result of the standard treeview behavior.
  • Play on double click will play the next item (according to the currently selected playback order) in the selected playlist.
  • Make playing playlist visible on activation will ensure that the playing playlist is visible when activated (for instance when double clicking on the status bar). This option only make sense when "Activate on single click" is unchecked.

Nodes

  • Title formatting enables the customization of how playlists and folders are displayed in the treeview. The formatting of nodes uses foobar formatting language and the following variables are available :
  • %node_name% is the name of the node, either a playlist or a folder.
  • %is_folder% is a boolean value for use in $if( ...) expressions and is true when the node is a folder.
  • %children_count% will provide the number of children for each node (0 for playlists).


The default formatting string is %node_name%$if(%is_folder%,' ['%children_count%']',) and will give an indication of the number of children (folders or playlists) for each folder in the tree.

Another popular string is %node_name%$if($and(%is_folder%,$strcmp(%children_count%,0)),' []') which will not show the children count but just provide an indication of empty folders.

Change Log

  • V1.0
    • 1.0.1 Fixed minor bug in colors of active playlist after activation when clicking on the status bar.
    • Reworked Drag & drop and introduce content copy from one playlist to another (with Ctrl Key), or copy inside a playlist when Drag & Drop is from "external" source
    • Introduced titleformatting script for nodes (See Preferences page)
    • Memorized last known tree configuration for recall when new instance is initialized
    • Eliminated flickering during single click and resize (to be confirmed on Vista/Seven)
    • Implemented options to restore deleted playlists
    • Fixed Reset function not working in preferences
    • Forced playlist activation (after double click) when "Play on double click" option is selected and "Playback follow cursor" is not selected
    • Added indication of external drop operations in status bar
    • Autonamed newly created playlists and folders
    • Ensured active playlist is selected at initialization
    • Fixed dialog not getting focus when using Tab key
    • Reworked tree display (rectangles mgt.)
    • Fixed bug in framestyle setting
    • Fixed bug (with potential crash) in accented characters display
    • Miscellaneous bug fixes and improvements
  • V0.9
    • Implemented external drag & drop support (Thanks kerpondile !)
    • Fixed preferences page activated from 1st item of standard context menu
    • Fixed improper colors on selection (drop highlight) rectangle
  • V0.8
    • 0.8.3 Fixed glitch in active item display. Applied theme. Introduced a new option to make playing playlist visible upon activation. Fixed background color of preferences page.
    • 0.8.2 Fixed crash in debug mode due to resize called before window activation (OnInit).
    • 0.8.1 CUI colors when not restored properly after unselecting custom background color
    • Fixed playback continuation (after double click) happening in same playlist when "Play on double click" option is selected and "Playback follow cursor" is not selected
    • Fixed improper display of playlists or folders containing "&"
    • Improved look for Vista/seven (Custom Draw for all items, No lines)
    • Added visual indication of playing playlist
  • V0.6
    • Fixed DUI context menu not appearing in edit mode
    • Neutralized selection of first playlist if clicking on an empty region
    • Double click now jumps to next track when "Play on double click" option is selected
  • V0.5
    • Fixed unwanted column ui context menu
    • Neutralized keyboard shortcuts while editing an item
    • Various changes on click/double click handling
  • V0.4
    • Added options to hide item count (Context Menu-> Options)
    • Tentatively introduced Vista / Seven style (to be confirmed)
    • Implemented "Preferences" entry in context menu
    • Implemented "Activate on single click" option (Preferences)
    • Implemented "Play on double click" option (Preferences)
    • Fix glitch with drophightlight rectangle (dotted rectangle sometimes breaks and takes on strange colors)
    • Re engineered visual appearance + drag & drop operations, fixed some glitches
    • Implemented minimum width/height
    • Fixed active playlist not appearing at startup
    • Fixed "active playlist" status/color lost after move
    • Fixed glitch during window scrolling (drag& drop)
    • New border drawing to integrate nicely with DUI
  • V0.3
    • Fixed item count not refreshing instantaneously
    • Fixed double click not working outside of playlist name
  • V0.2
    • Link to this page from the preferences page (Help button)
    • Fixed bug in managing (Enter/Delete) keys for label editing
    • Make the matching (at startup) of tree content vs. actual playlists more intelligent (usefull for utilization of the popup window)
    • Fixed panel appearing twice in column UI layout
  • V0.1
    • Initial release
  • To do (in no particular order) :
    • Implement Cut, copy & paste capability (maybe)
    • Implement re-sorting of standard playlist view (maybe)
    • Generate superset of contained playlists when activating a folder (maybe)
    • Make the matching (at startup) even more intelligent (maybe)
    • Prevent the panel from appearing in the toolbar menu (CUI)