foo. bar. baz. quux.

Foobar2000:Playlist Tree:Changelog

From WikiBazQuux

Jump to: navigation, search

Development Version

3.0.5

  • added context menu item: Send to library playlist (Selected)
  • fixed a bug in context menu items that caused a crash with 9.5.1 beta

Release 3.0.4

  • don't ask about the user map.
  • new scheme functions that allow interaction:
    • (prompt-user-string "foo") - prompts the user for input. Returns a string. "" for cancel.
    • (prompt-user-list "foo" ("option 1" "option 2" ... "option n")) - prompts the user to select from given options - returns zero-based index of selection. -1 for cancel.
(let ((tags (list "artist" "album" "title")))
  (let ((n (prompt-user-list "Tag:" tags)))
    (when (>= n 0)
	  (let ((criteria (prompt-user-string "Criteria:")))
	    (display criteria)
	    (when (> (string-length criteria) 0)
		  (for-each-db-entry
		   (lambda (handle) 
		     (add-node 
		      handle
		      (list (format-title handle "%artist%")
			    (format-title handle "%album%")
			    (format-title handle "%title%"))))
		   (string-append (list-ref tags n) " " criteria)))))))

Release 3.0beta 3

  • GUID's for queries
  • main menu command for refreshing @scheme queries: Library/Playlist Tree/Refresh/* (you can refresh a query, for its side effects such as creating a new playlist and playing it with the new playlist interaction commands below)
  • for-each-playlist-entry can now take an integer playlist index OR a playlist name to specify which playlist
  • (in-library? handle)
  • (handle-test handle filter-string) - e.g. (handle-test handle "rating GREATER 3")
  • (mainmenu mainmenu-fun-string)
  • (playlist-contextmenu contextmenu-fn-string [playlist-index])
  • (contextmenu contextmenu-fn-string handle-list)
  • (playing-playlist)
  • (active-playlist)
  • (find-or-create-playlist name) => returns a playlist-index
  • (add-to-playlist handle [playlist-index] [item-index]) => if no playlist-index is specified, active playlist is assumed.
  • (clear-playlist [playlist-index])
  • (activate-playlist playlist-index)
  • (play-from-playlist [playlist-index] [item-index])
;;; Fill *Scheme* playlist with an hours worth 
(let ((playlist-index (find-or-create-playlist "*Scheme*"))
      (total-time 0))
  (clear-playlist playlist-index)
  (for-each-db-entry
   (lambda (handle) 
     (let ((len (get-length handle)))
       (if (< (+ len total-time) (* 60 60))
	   (begin
	     (add-to-playlist handle playlist-index)
	     (set! total-time (+ total-time len))))))
   "rating GREATER 3"
   "$rand()")
  (activate-playlist playlist-index)
  (play-from-playlist playlist-index))
;;; Show properties of all playlist entries
(let ((the-list (list)))
  (for-each-playlist 
   (lambda (n) 
     (for-each-playlist-entry 
      n
      (lambda (handle) 
	(set! the-list 
	      (cons handle the-list))))))
  (contextmenu "Properties" the-list))

3.0.beta2

  • fixed a DestroyWindow problem - fixes? problem with panel ui interaction - thanks terrestrial
  • (handle-apply function path [subsong-index])
  • (file-creation filename) => retusn the file creation in seconds, same scale as the mzScheme (current-seconds) results.
  • (file-last-access filename) => see file-creation
  • (file-last-write filename) => see file-creation
  • To get the current time see the mzScheme manual
(handle-apply 
 (lambda (handle)
   (write (get-path handle))
   (add-node handle (list "Folder" "Stupid Girl")))
 "E:\\Music\\Library\\G\\Garbage\\1995 - Garbage\\08 - Stupid Girl.mp3" 0)

Release 3.0.BETA1

  • minor layout changes to query options dialog
  • scheme preferences page with a scheme startup option where you can put code that will be evaluated before any scheme functions are used... allows you to put in global define's and such.
  • new functions
    • (add-query-node label source criteria format [population-order] [sortp] [max-n] [max-type]) => returns a tree-node which can be used in refresh-query, max-type can be one of tree-max-tracks, tree-max-minutes, tree-max-megs, tree-max-subfolders
    • (refresh-query query-node)
;;; Example of a nested query
(let ((source "@database")
      (format "%artist% - %title% '('%rating%')'")
      (pop-sort "$rand()")
      (max 60)
      (max-type tree-max-minutes)
      (not-recent 
       "(\"$cwb_datediff(%last_played%,%cwb_systemdate%)\" GREATER 7 OR NOT %last_played% HAS 20)"))
  (for-each 
   (lambda (label criteria)
     (refresh-query 
      (add-query-node label source criteria format pop-sort #f max max-type)))
   (list "Great Stuff" "Good Stuff" "Decent Stuff")
   (map (lambda (c)
	  (string-append c " AND " not-recent))
	(list "rating GREATER 4" "rating GREATER 3" "rating GREATER 2"))))

Release 3.0.BETA0

  • better selection actions options -> fixed the interaction with foo_utils
  • mzscheme integration
    • the formatting will now be a real language with looping and other fancy features.
    • powerful scripting for power users.
    • (display ...) and (print ...) both output to foobar2000 console
    • Sample query:

Set the source to "@scheme" and the format to:

(for-each-db-entry
 (lambda (handle) 
   (add-node 
    handle
    (list (format-title handle "%artist%")
	  (format-title handle "%album%")
	  (format-title handle "%title%")))))
  • Playlist Tree specific Scheme Primitives
    • (for-each-db-entry fn [filter-string] [sort-string])
    • (add-node handle folder-list)
    • (now-playing)
    • (console-print [object1] [object2] ... [objectn])
    • (format-title handle title-format-string)
    • (meta-list handle tag)
    • (for-each-playlist fn)
    • (for-each-playlist-entry playlist-name fn)
    • (get-subsong-index handle)
    • (get-path handle)
    • (get-length handle) => returns time in seconds
    • (get-file-size handle) => returns size in bytes
    • (for-each-queue-entry fn)
    • (for-each-node-entry node-name fn)

Release 2.2.4

  • Added "Clear Query Results" menu items
  • Added notification callback so other plugins can be notified of tree selections.
  • added global title formatting for treenode info: $treenode(arg) function. Possible arguments:
    • name
    • displayname
    • size
    • duration
    • itemcount
    • foldercount
    • overallindex
    • isleaf
    • isfolder
    • isquery
  • auto refresh in a main thread callback
  • put system icons at the end of the list so when they change it doesnt mess everything up
  • set the background color in the icon selection box to the same color as your tree, so its easier to tell what will look good

Release 2.2.3

  • Allow @or,@and,@not in @drops
  • added ability to export query without its children (good for sharing queries)
  • disable main menu items that are not available

Release 2.2.beta2

New Features

  • reimplemented @fakelevel
  • If the title formatting for a folder node uses non-playlist tag, it will try to find them in the first entry in the node. eliminates the need for a $first or @first function
  • turn off window redrawing when doing a user requested refresh
  • on playback skip files with meta tag SKIP (will not make it to the final release)
  • turn off redrawing while a node is expanded. Less window flashing
  • when removing a file from a auto refresh @queue query, remove it from the queue as well
  • when removing a file from a auto refresh @playlist query, remove it from the playlist as well
  • automatically store to a file in the foobar2000 directory
    • This overrides previous settings, but you can re-load your previously saved file and it will handle the storage and retrieval on its own after that.
  • multiple panels can swap contents from the context menu
  • if you are changing the configuration in columns ui, some of the panel contents can get mixed up. if you remove a panel and a different panel seems to be affected, you can right click on the remaining panel and select which contents it has, including the contents of panels that have been removed.

Bug Fixes

  • fixed bug in dropping multiple files onto auto refreshed @playlist/@queue query
  • don't write the contents of @queue query, because queue is not saved between instances

Release 2.2.beta1

Bug fixes

  • Fixed bug that removed directory structure on dropped files
  • load info from dropped files

Release 2.2.beta0

  • faster query results using compiled titleformatter (1.15s vs .39s in one sample)
    • improvements only on queries not using the %<tag>% stuff

New Features

  • @queue source designator. allows you to view whats in the playback queue.
    • can be set to automatically update when files are added to queue or played
  • @playlist queries can be set to automatically update when the source playlist is changed
  • @playlists queries can be set to automatically update if a playlists is add, removed or renamed
  • new context menu item: play in library playlist - clears queue, sends selection to library playlists and plays it
  • dropping items to a auto refreshed @queue query will add the item to the queue as well as the node
  • dropping items to a auto refreshed @playlist query will add the item to that playlist as well as the node
    • dropping items will also cause the query to refresh so that the folder layout is correct - so if you drop a file anywhere under a playlist or queue quere, the playlist or queue will be added to, then the query will be refreshed so everything in the query node is in the proper place...
  • respond to file moves and deletes by moving underyling path and removing node respectively.

Release 2.1.1

  • updated SDK and related fixes

Bug Fixes

  • fixed bug when loading queries with max length

Release 2.1.0

New Features

  • split track finder into its own component.

Bug Fixes

  • removed +/- in parents of hidden nodes/leaves

Release 2.0.10b

Bug Fixes

  • fixed crash on hitting cancel when exporting.

Release 2.0.10

Bug Fixes

  • sort AFTER trimming - allows you to do a random album or mix of songs...

New Features

  • properly nest @drops containing playlists
  • set edge style on search box
  • custom selection text colors
  • added @hidden3 that hides leaves in the immediate folder (make sure @hidden3 is followed by a space)
  • root/Export (All) and root/Export (Visible) exports to text file.
  • allow search for nodes (example: %_overallindex% IS 50)

Release 2.0.9

Bug Fixes

  • fixed bug in @drop<> queries that are not in default format. bug was introduced by my test for file existance to stop crash.
  • increased line buffer to 1024 characters instead of 256. I think this may have been causing some issues.
  • enter / space now know the calling node - fixes issues with playlist names
  • fixed bug in $sum

New Features

  • option to turn off default queries - makes it easier to modify your layout in columns ui

Release 2.0.8

New Features

  • Added @drop<> query creation on drop with shift held
  • selection action limit option. if the selected node has more than that many files, the selection action will not be perfomed. default is 5000. set to 0 to disable.

Bug Fixes

  • highlight selected node on right click / middle click
  • Warn if @drop file does not exist, do not crash
  • changed edge style code
  • fixed Font leak
  • do not allow root node to be removed

Release 2.0.7

New Features

  • @limit
  • @hidden - children are hidden and node is show as grayed out
    • example- any album with more than 8 tracks will be hidden
  • @hidden2 - children are hidden and node is not shown
  • do not refresh $playing<> tracks if nothing playing
  • Added back the dialog about the user map
  • Custom item colors - Currently only works for folders and queries
    • selection focus / selection on focus color options
    • @rgb<r,g,b> function - Applies to the entire label
    • preference option: custom colors - This must be enabled for @rgb and the selection color options to work
    • Example to alternate colors on query result folders:
      • @format<@quote<$ifgreater($mod(%_folderindex%,2),0,'@rgb<255,255,255>','@rgb<255,0,255>')>>%album%|[$num(%tracknumber%,2) - ]%title%

Release 2.0.6

New Features

  • Main menu items for:
    • Collapse Tree
    • Track Finder on Current Playlist
  • Local processing of space and enter
    • Renamed "Mouse" preferences to "Mouse and Keyboard"
    • Added options for Space and Enter keys in Mouse and Keyboard preferences
  • Added option to enable/disable keyboard shortcut processing in tree
  • Local Functions / Variables:
    • $parent
    • $hidetext
    • %_displayname% - similar to %_name% but will process away @icon<>, etc.

Bug fixes

  • Track Finder maximum (default 4000)
  • fixed @icon<x> in Library playlist name
  • fixed FAKE node bug (Edit a query before expanding it, click ok)
  • search will now always search the last active tree, not the first tree
  • Proper storage of save / restore filename when shutting down

Release 2.0.5

  • Upgraded to columns ui sdk 6.1

Bug fixes

  • Fixed doubling items in send to active playlist - missing break statement
  • fixed combo box selection issues in win2k
    • note to self: click on combo box arrow and adjust size in resource editor

Release 2.0.4

New Features

  • Options to rename selected node as artist, album or album artist

Bug fixes

  • fixed drag and drop lock up issue -> incorrect usage of playlist_incoming_filter
  • changed menu generation to use m_label rather than get_display_name - fixes issues if your folder display is something other than %_name%
  • process dropped playlists (use g_process_path_ex rather than g_process_path)

Release 2.0.3b

Bug Fixes

  • Fixed crash if icon directory does not exist
  • Fixed preprocessing away @format in query labels

Release 2.0.3

  • fixed new folder bug: http://bowron.us/smf/index.php?topic=218.0
  • Enabled "Refresh everytime a new track starts" - For refresh $playing() queries - example
  • Playlist Tree/New playlist names playlist the name of the source node if the contents come from a tree node, "New" otherwise.
  • Search edit box colors are same as trees
  • Added collapse tree option to playlist tree panel menu
  • basic tree search toolbar - uses playlistgen syntax
  • "Redraw Tree" option in playlist tree panel menu - useful if you change default icons
  • @quote tag processing in query format string
  • Option to remove last library playlist on send. Useful when library playlist name has TAGZ
  • Library Playlist name can have tagz
  • Option to activate library playlist when sent to
  • Mouse actions have their own separate configuration page under playlist tree main configuration
  • added middle click, right click and right click + shift options
  • added [local] operations to selection actions and double click actions. Most items in the Playlist Tree main menu and local node context menu can be found under [local]
  • fixed edge styles
  • Main menu options: Selection/foobar2000 context menu and Selection/Local context menu - for your keymapping pleasure
  • case insensitive test for add_child_conditional => query results will be added to nodes in a case insensitive manner.
  • option:
    • Bitmaps: Load Windows Bitmaps - Loads the shell icons
    • Requires restart
    • You will probably need to change your folder, leaf and query icons becuase I load the system icons first because its much easier that way.

Release 2.0.beta2

  • removed $http_clean -> moved to separate component: foo_cwb_hooks
  • @drop queries with @default format
  • multiple tag support using %<tag>% extended format
    • allows multiple meta tags separated by commas
      • for examples if some files are marked with GENRE and some STYLE you could iterate through all using: %<genre,style>%
    • if files match none of the tags they will be omitted from the tree
    • may behave slightly than in album list (especially when used in an $if)
  • Double click refresh query option
  • Middle Click on node shows local context menu
  • Track Finder (not working for large lists problem with TrackPopup)
  • Track Finder preferences page (Tools)
  • converted local context menu to same data structure as main menu items
  • Main Menu commands (under Library):
    • Playlist Tree/Selection
      • Edit
      • Remove
      • Refresh Queries
      • New Folder
      • New Query
      • Sort
      • Sort Recursively
    • Playlist Tree/Root
      • New Folder
      • New Query
      • Sort All
      • Refresh All Queries
    • Playlist Tree/File
      • Save...
      • Open...
  • Options
    • hide root
    • hide leaves
    • hide lines
    • hide +/-
    • no horizontal scroll
  • Only ask about saving / restoring to a file one time...
  • Icon selector in folder and query edit box work
  • When editting a query, if you hold shift while clicking OK, the query will NOT be refreshed
  • PT specifc tagz:
    • %_name%
    • %_size% - now the raw size in bytes
    • %_size_abbr%
    • %_size_abb%
    • %_play_length%
    • %_itemcount%
    • %_isleaf%
    • %_isquery%
    • %_isfolder%
    • %_folderindex%
    • %_overallindex%
  • Local Functions
    • @format<> in folder names
    • @icon<> function in folder names
    • @quote
    • $avg() <=> was @avg before
    • $sum() <=> was @sum before
    • $playing() <=> was @playing before (example: artist IS @format<$playing('%artist%')>)
  • default bitmap selector
  • additional bitmap option
  • option to enable / disable bitmaps


2.0.beta1 (First Release for 0.9 SDK )

Changes so far:

  • Context Menu:
    • Right click an item to view the normal foobar2000 contxt menu for that node
    • Shift+right click on an item to view the playlist tree specific context menu
    • Right click off an item to view the context menu for the panel, i.e. file selector...
  • Multiple panels possible, each with own save/restore file
  • Selecting a node automatically sends it to foo_browser if installed
  • Many, many things dont work yet. This includes but is not limited to:
    • Search
    • Icon Selection
    • Quick Query
    • Track Finder
    • Fancy variables like %_folderindex%, etc

What should be working

  • Static Folders
  • Basic Queries
    • All source designators and operations should work (@playlist<foo> @and @playlist<bar>)
  • Sort - sorts by display name, and folders above files
  • Shortcut key processing in panel
  • Multiple panels
  • Save / Restore to a file (right click somewhere on panel, off tree item to select)
  • Selected node contents should be sent to foo_browser if it is installed
  • Drag and Drop
    • Drop files from playlist and windows
    • Drag files to playlist
  • text color, line color, background color, and font
  • edge styles
    • need to restart or resize panel for change to take effect
  • Selection Actions
    • You can select two actions that happen whenever a node is selected
    • Default action 1 is "Browse" which will populate foo_browser panels if active
    • Default action 2 is "" which does nothing
    • "Playlist Tree/Send to Libary Playlist" would be another good option for selection actions
  • Double Click
    • Default action is nothing
  • Global context menu items:
    • Playlist Tree/Add to active playlist
    • Playlist Tree/Send to active playlist
    • Playlist Tree/New playlist
    • Playlist Tree/Send to Libary Playlist

End of .8.3 Development

  • fixed stupid bug in query_node::write_sexp
  • fixed issue using "Missing" in quick query
  • if you right click on a node then the context menu applies to that node... if you right click somewhere other than a node label, it apples to the root.
  • fixed crash: select root node, then in preferences change to "hide root node"
  • query and folder dialog changes
  • added source option for queries... now all the source specifiers (@playlists, @playlist, @database, @drop, @node, @or, @and) go here...
  • @playlists creates @playlist<> queries
  • fixed default expansion when files does not exist crash
  • fixed wording on save/restore file
  • file drop onto blank area adds to root node
  • changed get_entries()
  • fixed refresh on double click
  • removed @notnode
  • @database source operator... allows you do do something @database @not @node<Bla>... it is implied if no other source operator is specified
  • @or, @and, and @not operators for use with @playlist and @node
    • @node<node1> @and @node<node2> ===> Everything in BOTH node1 and node2
    • @node<node1> @or @node<node2> ===> Everything in EITHER node1 OR node2
    • @node<node1> @not @node<node2> ===> Everything in node1 that IS NOT in node2
  • option: TREE\Queries\Quick Query Target Node
  • fixed bug in track finder when multiple actions
  • search all ==> creates a query
  • fixed search all bug due to change in query_node constructor
  • fixed @browse_as bug (| was being treated as extra items delimiter)
  • fixed preferences tree crash when tree not active
  • redid config page
  • removed parenthesize checkbox, added parenthesize button which puts parentheses around accumulated text
  • changed workflow in quick query
  • fixed bug in removing the selected node
  • redid search all... less customizable... but no more doubles and working better
  • cfg_var_refresh for variables like "show hidden nodes" that require tree to be redrawn...
  • fixed send to library - sending from context menu when not auto-selecting
  • added a default @playlists query when no file is loaded
  • @playlists operator... put it in your query criteria and it will create a tree of all the playlists...
    • REMEMBER: this operator only reflects what is in your playlists... changing a playlist tree folder will not effect what is in the global playlist...
  • fixed small hide/unhide issue
  • fixed small focus issue on query refresh
  • added link to wiki in preferences: "homepage"
  • fixed no browse issue... if a node is set to Don't Browse it will not be sent to the library or the browser
  • Nested Queries - w00t - Probably NOT for the casual user
    • if you put something like @query<%title%;title HAS %title%,'%title%'> in the formatting string, it will generate a query for each matching item... I'm not sure the best uses of this but I am sure that someone will find this useful... Say were were trying to find cover versions of Beatles songs you might try something like this:

Criteria: artist HAS beatles Format: @query<%title%;title HAS %title%;'%artist% - %title%'>

NOTE: thos are SEMICOLONS between the parameters

    • If a query with the same name and criteria already exists it will not be duplicated...
  • @query => @pquery ( for finding something about the query parent of an item )
  • fixed single click expand... it works a little funny in that it when you click on a new node it collapses the node you were on, then expands the new one... this is how the treeview control works, not something I implemented...
  • removed no vscroll option, added no scroll option...
  • hidden node options:
    • "Show normal",
    • "Show normal, no children",
    • "Show as disabled",
    • "Hide completely",
  • removed "Playlist Tree/Selection/Do Nothing" option in context menu, added Blank item to context menu item selection for double click, etc... Use that if you want to undefine an action.
  • removed dedicated track finder from playlist tree context menu... use generic one...
  • multiple actions defineable for track finder... user can select one at track finder time...
  • better key processing in tree (should be able to use context menu shortcut keys)
    • This causes problems when tree navigation keys are mapped to commands... biggest I've seen is arrows keys are mapped to moving the seekbar in the UI but they also navigate the tree, so when you navigate the tree with them, the seek bar gets changed too... Best workaround at this point is remove those kinds of shortcut keys...
  • expert mode checkbox in quick query... when unchecked AND, OR, and parentheses options are hidden.
  • added parentheses buttons in quick query...
  • parenthesize option in quick query
  • option "Autmatically Select Node On Context Menu"
  • browser filter code changes
  • fixed unnecessary level in @drop playlist file
  • redid drag / drop code
  • expand all / collapse all buttons in configuration menu
  • @avg now uses 2 decimal points precision. If you want just the integer you can use @format<$num(@avg<%_length%>,1)>
  • removed selected folder display... no longer a separate display format for a selection
  • refresh on tag changes and update browser on tag changes seem to be working ok auto refreshing @playing seems to be working ok
  • track finder action can be any context menu item
  • Added "All" to track finder
  • double click action can be any context menu item - tree and browser
  • removed some external bitmap options... if you want to use external bitmaps you can use them with the "More Bitmaps" option.. You can then set the indices of the bitmaps you want to use by default for the 3 node types in preferences...
  • moved beta features to own preferences nodes
  • added default query -> by artist
  • removed explorer
  • removed local keyprocessing in tree
  • removed options for searching and filtering using playlist_gen format... they are now automatic
  • moved playlist options (send, play, new, etc) to global context menu
  • switched from r00t node to g_root pointer to node
  • removed cfg_device option - default device is now first item in the other list
  • configuration menu - only click on checkboxes will change check boxes
  • different file layout - different extension PTS

Older Releases

Playlist Tree Changelog 1.7.x

Playlist Tree Changelog 1.6.x

Playlist Tree Changelog 1.5.x

Playlist Tree Changelog 1.4.x

Playlist Tree Changelog 1.3.x

Playlist Tree Changelog 1.2.x

Playlist Tree Changelog 1.1.x

Playlist Tree Changelog 1.0.x

Personal tools