feat: log blacklisted player
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "lrx-cli"
|
name = "lrx-cli"
|
||||||
version = "0.7.7"
|
version = "0.7.8"
|
||||||
description = "Fetch line-synced lyrics for your music player."
|
description = "Fetch line-synced lyrics for your music player."
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.13"
|
requires-python = ">=3.13"
|
||||||
|
|||||||
@@ -103,11 +103,12 @@ async def _select_player(
|
|||||||
return matched[0] if matched else None
|
return matched[0] if matched else None
|
||||||
|
|
||||||
# auto-selection: apply blacklist before choosing
|
# auto-selection: apply blacklist before choosing
|
||||||
candidates = [
|
candidates = []
|
||||||
p
|
for p in all_names:
|
||||||
for p in all_names
|
if any(x.lower() in p.lower() for x in player_blacklist):
|
||||||
if not any(x.lower() in p.lower() for x in player_blacklist)
|
logger.info(f"Excluding blacklisted player: {p}")
|
||||||
]
|
else:
|
||||||
|
candidates.append(p)
|
||||||
playing: list[str] = []
|
playing: list[str] = []
|
||||||
for p in candidates:
|
for p in candidates:
|
||||||
status = await _get_playback_status(bus, p)
|
status = await _get_playback_status(bus, p)
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ class PlayerMonitor:
|
|||||||
if not hint_active and any(
|
if not hint_active and any(
|
||||||
x.lower() in name.lower() for x in self._player_blacklist
|
x.lower() in name.lower() for x in self._player_blacklist
|
||||||
):
|
):
|
||||||
|
logger.info(f"Excluding blacklisted player: {name}")
|
||||||
continue
|
continue
|
||||||
if not self._target.allows(name):
|
if not self._target.allows(name):
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user