Player refactor works with MPV player

This commit is contained in:
Sumner Evans
2020-06-13 20:53:56 -06:00
parent a86cf7a4e3
commit 8df85cba96
11 changed files with 212 additions and 123 deletions

View File

@@ -7,6 +7,7 @@ def test_init():
empty_fn,
empty_fn,
empty_fn,
empty_fn,
{
"Serve Local Files to Chromecasts on the LAN": True,
"LAN Server Port Number": 6969,

View File

@@ -7,7 +7,7 @@ from sublime.players.mpv import MPVPlayer
def test_init():
empty_fn = lambda *a, **k: None
MPVPlayer(empty_fn, empty_fn, empty_fn, {"Replay Gain": "Disabled"})
MPVPlayer(empty_fn, empty_fn, empty_fn, empty_fn, {"Replay Gain": "Disabled"})
def is_close(expected: float, value: float, delta: float = 0.5) -> bool:
@@ -16,7 +16,9 @@ def is_close(expected: float, value: float, delta: float = 0.5) -> bool:
def test_play():
empty_fn = lambda *a, **k: None
mpv_player = MPVPlayer(empty_fn, empty_fn, empty_fn, {"Replay Gain": "Disabled"})
mpv_player = MPVPlayer(
empty_fn, empty_fn, empty_fn, empty_fn, {"Replay Gain": "Disabled"}
)
song_path = Path(__file__).parent.joinpath("mock_data/test-song.mp3")
mpv_player.play_media(str(song_path), timedelta(seconds=10), None)