Return to Snippet

Revision: 71981
at April 7, 2017 19:04 by SPIKEYPUP

Initial Code
[Last Played: '['$date(%last_played%)']' Total: %play_count%]$crlf()
[$info(channel_mode)'CH - ']%channels%[' In '$info(MP3_STEREO_MODE)]$crlf()
[%samplerate% Hz |][$info(bitspersample)-Bit|] %filesize_natural%$crlf()
[$info(encoding)][' | '$info(codec)[' | '$info(codec_profile)]][ '|' $info(bitrate) Kpbs$crlf()]
[Encoder: [$left(%__tool%,23)' '$crlf()]]
[Tags: %__tagtype%$crlf()]
$crlf()$tab()'Remaining:      '%playback_time_remaining%$crlf()//adjust align by adding spaces between single quotes on each of next lines
$tab()'Position:         '%playback_time%$tab()$crlf()//adjust align by adding spaces
$tab()'Total:             ' %length%)$crlf()]

Initial URL!AjawBNTnJIPFsgGqwIY6N1CP7nNj

Initial Description
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.



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!

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

Initial Tags

Initial Language