User:Mjb/foobar2000 rip log file view

From Offset
< User:Mjb
Revision as of 02:40, 8 April 2013 by Mjb (talk | contribs) (new page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

foobar2000 doesn't ordinarily allow log file viewing in its Default User Interface environment. However, it is possible to do. Just follow these steps.

  • Install the foo_textfile component, which allows you to configure the mapping of a text file to a variable (updated for each playlist item). The variable can be used in title formatting scripts to import the contents of the text file. The text file is identified by a path that you can generate with a title formatting script. It doesn't support wildcards.
  • Install the foo_textdisplay component, which makes available a Default User Interface element which contains arbitrary text written as a title formatting script.

Remember, you can usually install components by just dragging them into the Preferences > Components window. Now go to Preferences > Tools > Textfile and create three variables:

  • Name: folder_log
  • Path: $replace(%path%,%directoryname%\%filename_ext%,%directoryname%\%directoryname%.log)
  • Encoding: UTF-8

  • Name: album_log
  • Path: $replace(%path%,%directoryname%\%filename_ext%,%directoryname%\%album%.log)
  • Encoding: UTF-8

  • Name: artist_album_log
  • Path: $replace(%path%,%directoryname%\%filename_ext%,%directoryname%\%artist% - %album%.log)
  • Encoding: UTF-8

These are the three types of log file names that I usually encounter. Obviously, if you have more variations, just create more variables.

Now go to View > Layout > Enable Layout Editing Mode and put a text display UI element wherever you want. Right-click in the element and choose Settings. The Format tab is where you enter the title formatting script:

  • [%folder_log%][%album_log%][%artist_album_log%]

Of course you can format it however you want. I use a monospace font, e.g. Consolas.

Toggle the Layout Editing Mode again and you should be done. Try it out by putting an item in the playlist that is in a folder where a log file is. When the playlist item is selected, you should see the log!