Skip to the content.

Beam now reads foobar2000 through the Beefweb HTTP API instead of the legacy COM automation path.

If you are upgrading from an older Beam setup, note that this fork no longer supports the previous deprecated foobar2000 plugin path. Existing users should install Beefweb before moving to v0.7.0.

Check officiaal documentation and foobar componet at: https://www.foobar2000.org/components/view/foo_beefweb

https://github.com/hyperblast/beefweb/blob/master/README.md

What It Does

The adapter lives in bin/modules/win/foobar2kmodule.py. Beam calls run(max_tanda_length) from bin/nowplayingdata.py and expects two values back:

The rest of Beam stays unchanged. That is the key design constraint.

Runtime Flow

  1. Beam calls run(max_tanda_length).
  2. The module checks whether foobar2000.exe is running.
  3. The module calls Beefweb GET /player with a list of title-format expressions to fetch player state and the current item.
  4. If Beefweb returns an active playlist and item index, the module calls GET /playlists/{playlistId}/items/{offset}:{count} to fetch the currently playing song plus the next items.
  5. The module converts each returned Beefweb item into Beam’s SongObject.
  6. Beam applies its normal rules, cortina logic, and display rendering.

API Endpoints Used

The implementation requests these columns in order:

That list maps directly onto Beam’s SongObject fields.

Configuration

Beam now supports saved Foobar2000 Beefweb settings in the main Preferences UI when Foobar2000 is the selected media player.

Open Settings, choose Foobar2000 as the media player, and Beam will show the Foobar2000 Beefweb section directly below the media-player selector.

These settings are stored in Beam configuration as:

"Foobar2000": {
  "BeefwebUrl": "http://localhost:8880/api/",
  "BeefwebUser": "",
  "BeefwebPassword": ""
}

These values are stored in Beam configuration and used by the foobar module at runtime.

Multiple foobar2000 instances

Beam connects to one Beefweb server URL. It does not detect or manage multiple foobar2000 instances separately.

If you run a second foobar2000 instance for preview or prelisten, Beam can only follow the instance exposed through the configured Beefweb URL.

For a reliable setup, expose Beefweb only on the foobar2000 instance you want Beam to follow. If your preview instance also has Beefweb enabled, disable it there or move it to a different port that Beam is not using.

Beam first reads the saved Preferences values. Environment variables are only used as a fallback for older setups that have not moved to the saved settings yet.

Environment variables are still accepted as a fallback for older setups:

Example PowerShell session:

$env:BEAM_BEEFWEB_URL = "http://localhost:8880/api/"
$env:BEAM_BEEFWEB_USER = ""
$env:BEAM_BEEFWEB_PASSWORD = ""
python .\beam.py

Important note:

How The Playlist Logic Works

Beam’s tanda logic is already implemented outside the foobar module. The only thing the foobar module needs to do is return enough songs in playback order.

The Beefweb implementation therefore returns:

That is enough for Beam to populate:

No changes are required in the display pipeline for that part.

Failure Behavior

Diagnostics

How To Extend It

Add more metadata:

  1. Add another Beefweb column expression in BEAM_BEEFWEB_COLUMNS.
  2. Map the returned column to a SongObject field.
  3. If it is a brand new Beam field, also update bin/songclass.py, bin/nowplayingdata.py, and the layout editor tags.

Improve configuration:

  1. Add Beefweb URL, username, password, and timeout to Beam config.
  2. Expose those settings in the preferences UI.
  3. Replace the environment-variable reads in the foobar module with Beam settings accessors.

Support artwork:

  1. Call GET /artwork/current or GET /artwork/{playlistId}/{index}.
  2. Convert the returned bytes into an image object Beam can render.
  3. Keep this logic in the foobar module or a small helper to avoid leaking Beefweb details into the UI layer.