Skip to content

feat: filter by Plex player, and by several users - #4

Merged
roblesi merged 1 commit into
mainfrom
claude/plex-blank-episode-titles-rwe4kf
Oct 9, 2026
Merged

roblesi merged 1 commit into
mainfrom
claude/plex-blank-episode-titles-rwe4kf

Conversation

@roblesi

@roblesi roblesi commented Oct 9, 2026

Copy link
Copy Markdown
Member

Problem

The same user who reported the blank-between-episodes issue (#3) mounts a Note above their TV and wants it to show whatever is playing there. They and their partner use separate Plex accounts.

Plex User matches only one account. Their options were two plugin instances plus rules to switch between them, or pulling the data through Home Assistant at the media-player level. The board really cares about the device, not the account.

Change

  • New plex_player setting ("Plex Player"): only shows streams on these devices. It matches, case-insensitively, the device name Plex reports, which is the value of {{plex.player}}.
  • Comma-separated lists: plex_user and plex_player both take them, e.g. Sam, Kim. Spaces around names and empty entries are ignored. When both settings are set, a stream must match both.
  • No migration needed: existing single-name plex_user values behave exactly as before.
  • Docs: the README configuration table and features list, the SETUP quick-setup step, the configuration reference, and a troubleshooting entry on finding the exact device name. The stream_count description now names both filters.
  • Version: bumped to 1.3.0.

Limitation: the device name must match exactly (apart from case), so renaming a device in Plex means updating the setting.

Tests

There are 7 new tests in TestFetchData, written before the implementation. test_existing_settings_keys_kept_and_optional now includes plex_player.

Before the implementation, they failed on behavior:

E       AssertionError: assert [] == ['Kim', 'Sam']
E       assert 0 == 1
E       AssertionError: assert 'Ozymandias' == 'Interstellar'
E       AssertionError: assert ['Bedroom', '...ving Room TV'] == ['Kitchen', 'Living Room TV']
E       AssertionError: assert 'Playing' == 'Idle'
E       AssertionError: assert [('Alex', 'Be...ing Room TV')] == [('Alex', 'Living Room TV')]
E       AssertionError: assert 'plex_player' in {...}
FAILED TestFetchData::test_user_filter_accepts_several_users
FAILED TestFetchData::test_user_filter_ignores_empty_entries
FAILED TestFetchData::test_player_filter_shows_only_that_device
FAILED TestFetchData::test_player_filter_accepts_several_devices
FAILED TestFetchData::test_player_filter_without_match_is_idle
FAILED TestFetchData::test_user_and_player_filters_both_apply
FAILED TestManifest::test_existing_settings_keys_kept_and_optional

test_player_filter_follows_whoever_uses_the_device passed before the change, since with no filter every stream shows. Mutations confirm it and the rest aren't vacuous:

Mutation Caught by
Player filter compares the user field 4 player tests, including test_player_filter_follows_whoever_uses_the_device
No comma split test_user_filter_accepts_several_users, test_user_filter_ignores_empty_entries, test_player_filter_accepts_several_devices
Names not stripped test_user_filter_accepts_several_users, test_player_filter_accepts_several_devices
Empty entries kept 24 tests, including test_user_filter_ignores_empty_entries
Player filter not applied test_player_filter_shows_only_that_device and 3 more

Results:

  • ./run_tests.sh: 132 passed, __init__.py at 100% coverage.
  • FiestaBoard's scripts/validate_plugins.py --plugin=plex --strict: passed.

Not verified: I didn't test against a real Plex server. The device name comes from Player.title, falling back to Player.product, the same value {{plex.player}} already exposes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01A7aYfsnp25o3X3x3AYhzPQ


Generated by Claude Code

A board mounted over a TV should show whatever is playing on that TV,
whoever is watching. Plex User only matched one account, so a household
with separate accounts had to run two instances and switch between them.

- New Plex Player setting (plex_player): only show streams on these
  devices, matched case-insensitively against the device name Plex shows.
- Plex User and Plex Player both take comma-separated lists. When both
  are set, a stream must match both.

Bumps the plugin to 1.3.0.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A7aYfsnp25o3X3x3AYhzPQ
@roblesi
roblesi merged commit bb85baf into main Oct 9, 2026
1 check 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