Skip to content

Fix BBC Launcher metadata flapping on UK channels#85

Merged
Sholofly merged 2 commits into
Sholofly:devfrom
mase1981:fix/bbc-launcher-metadata-flapping
Apr 29, 2026
Merged

Fix BBC Launcher metadata flapping on UK channels#85
Sholofly merged 2 commits into
Sholofly:devfrom
mase1981:fix/bbc-launcher-metadata-flapping

Conversation

@mase1981
Copy link
Copy Markdown
Contributor

Summary

When BBC channels display their launcher overlay, the set-top box briefly reports app state with generic "BBC Launcher" metadata, overwriting valid program information. This causes artwork and channel info to flicker and show generic launcher screen instead of actual program details.

Problem observed:

  • BBC channel starts → correct artwork and media info loads
  • After 2-3 seconds → reverts to "BBC Launcher" with no artwork/program info
  • Logs show good metadata arriving first, then being overwritten by app state

Solution

  • Cache valid linear metadata after successful linear/replay/reviewbuffer processing
  • Detect launcher app overlays (name contains "launcher" or image URL contains "appstore")
  • When launcher overlay detected, restore cached metadata instead of showing generic info
  • Clear cache on standby/offline to prevent stale data

Changes

  • lghorizon_models.py:

    • Added _last_good_linear_metadata dict to LGHorizonDeviceState
    • Added cache_linear_metadata() method
    • Added restore_linear_metadata() method
    • Added clear_linear_metadata_cache() method
    • Added static is_launcher_app() detection method
  • lghorizon_device_state_processor.py:

    • Cache metadata after processing linear, reviewbuffer, and replay states
    • Check for launcher apps in _process_apps_state and restore cached data
    • Clear cache on standby/offline states

Testing

Tested with Virgin Media UK BBC channels. The integration now maintains correct program artwork and metadata when BBC Launcher overlay briefly appears.

@Sholofly
Copy link
Copy Markdown
Owner

Hi @mase1981, Sorry for the late response. Minor health issues haven taken some time.
First of all: Massive thank you for taking the time to invest to optimize the library. Highly appreciated.

I am wondering: If a program on a channel is ended, will this cause the linear meta data to stay the same? Or is it updated accordingly when a new program starts.

Please note that in my latest additions to this library, i've added some extra program information. Probably you can use that for the good :)

@mase1981
Copy link
Copy Markdown
Contributor Author

Hey @Sholofly , i do hope you feel better now, health is more important !!

To answer your question:
Yes, metadata updates correctly when a new program starts, the library pushes new program data via MQTT and my integration picks it up.

The issue i addressed in my integeation was specifically BBC channels on Virgin Media, where the STB temporarily reports degraded metadata (BBC Launcher/No Channel/appstore image) during transitions. I built a degradation handler that caches good metadata and uses it as a bridge until valid data arrives.

And yeah, for sure, I'd love to use the extra program information you added!

I live in the US and i dont own any horizon boxes, so i do this completely blind and rely on users to provide logs and after lot of trial and error i releasse a new update, especially when you update too :)

@Sholofly Sholofly self-requested a review April 25, 2026 20:59
Copy link
Copy Markdown
Owner

@Sholofly Sholofly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please resolve conflicts

When BBC channels display their launcher overlay, the set-top box briefly
reports app state with generic "BBC Launcher" metadata, overwriting valid
program information. This causes artwork and channel info to flicker.

This fix:
- Caches valid linear metadata after successful linear/replay processing
- Detects launcher app overlays (name contains "launcher" or appstore logo)
- Restores cached metadata instead of showing generic launcher info
- Clears cache on standby/offline to prevent stale data

Fixes issue where BBC channels show correct info for 2-3 seconds then
revert to "BBC Launcher" with no artwork.
@mase1981 mase1981 force-pushed the fix/bbc-launcher-metadata-flapping branch from e17a7c2 to 4ff9c49 Compare April 26, 2026 19:38
@mase1981
Copy link
Copy Markdown
Contributor Author

@Sholofly , done.

Copy link
Copy Markdown
Owner

@Sholofly Sholofly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@Sholofly Sholofly merged commit 2cfffb0 into Sholofly:dev Apr 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants