Foobar Text Dislplay Component Preset (foo_textdisplay) W/ Progress Bar


/ Published in: Python
Save to your folder(s)

1. Yes it's messy. I am not finished cleaning it up yet.

2. I am still new to the syntax of FooBar and Python, sorry I'll try to do better in the future.

3. This snippet took me about 4 hours, I don't know if that is sad or not, but it was about twice as long with worse results.

4. I now appreciate much more the optimization process coders go through, and also see firsthand how the benefits are enormous.

5. Like most code it is forever a work in progress and optimizing.

6. For example I have an equation that should be simple, however I have been working on it for 4 hours and have managed to reduce it to 3 or 4 variable puts and gets but I still have the math wrong.

7. But, when I started it was a lot longer and a lot more variable puts. Les Sigh. That snippet is going to be posted after this one.

8. If you have any questions let me know and I will try to get back to you ASAP.

9. This script provides some of the file essentials and relevant current playback data of the currently playing song in Foobar using the foo_textdisplay component (see Line 12 for Download Link).

10. There are no other dependencies to use this script other than foo_playcount to retrieve the count and date data variables. See Line 11 For Download Link.

11. http://www.foobar2000.org/components/view/foo_playcount

12. http://www.foobar2000.org/components/view/foo_textdisplay

13. See the indicated URL posted along with this snippet for an example of FLAC output and MP3/VBR Output with this code, use the built in formatting for color and alignment at this time.
14. If you like the status bar I will have that in a snippet as well just search my snips!
15. Enjoy!


Copy this code and paste it in your HTML
  1. [$caps2(
  2. [%title%]$crlf()
  3. [%artist%]$crlf()
  4. [Last Played: '['$date(%last_played%)']' Total: %play_count%]$crlf()
  5. [$info(channel_mode)'CH - ']%channels%[' In '$info(MP3_STEREO_MODE)]$crlf()
  6. [%samplerate% Hz |][$info(bitspersample)-Bit|] %filesize_natural%$crlf()
  7. [$info(encoding)][' | '$info(codec)[' | '$info(codec_profile)]][ '|' $info(bitrate) Kpbs$crlf()]
  8. [Encoder: [$left(%__tool%,23)' '$crlf()]]
  9. [Tags: %__tagtype%$crlf()]
  10. $crlf()
  11. $progress2(%_time_elapsed_seconds%,%_time_total_seconds%,24,$char(9635),$char(9633))$crlf()
  12. $crlf()$tab()'Remaining: '%playback_time_remaining%$crlf()//adjust align by adding spaces between single quotes on each of next lines
  13. $tab()'Position: '%playback_time%$tab()$crlf()//adjust align by adding spaces
  14. $tab()'Total: ' %length%)$crlf()]

URL: https://1drv.ms/i/s!AjawBNTnJIPFsgGqwIY6N1CP7nNj

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.