Skip to content

Commit

Permalink
Fix mac os support. (#9)
Browse files Browse the repository at this point in the history
Vlc process on mac is uppercase
  • Loading branch information
mrkeuz authored Aug 5, 2023
1 parent f4f5bb6 commit ace58b1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "vlcsync"
version = "0.2.0"
version = "0.2.1"
description = "Utility for synchronize multiple instances of VLC. Supports seek, play and pause. "
authors = ["mrkeuz <[email protected]>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion vlcsync/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from vlcsync.vlc_finder import print_exc
from vlcsync.vlc_state import VlcId

__version__ = "0.2.0"
__version__ = "0.2.1"


@click.command
Expand Down
4 changes: 2 additions & 2 deletions vlcsync/vlc_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ def _has_listen_port(proc: Process, iface_ip) -> int | None:
@functools.lru_cache(maxsize=1024)
def is_vlc(self, proc: Process):
with skip_on_error():
return proc.name() == 'vlc' or self.vlc_cmdline(proc)
return proc.name() is not None and proc.name().lower() == 'vlc' or self.vlc_cmdline(proc)

# noinspection PyUnreachableCode
return False

@staticmethod
def vlc_cmdline(proc) -> bool:
for part in proc.cmdline():
if 'vlc' in part:
if part is not None and 'vlc' in part.lower():
return True
return False

Expand Down

0 comments on commit ace58b1

Please sign in to comment.