Merge branch 'fix/macos-build' into develop
This commit is contained in:
commit
0b2fdce882
@ -176,7 +176,7 @@ def _query_duration(pipeline):
|
|||||||
elif duration < 0:
|
elif duration < 0:
|
||||||
duration = None # Stream without duration.
|
duration = None # Stream without duration.
|
||||||
else:
|
else:
|
||||||
duration = duration // Gst.MSECOND
|
duration = int(duration // Gst.MSECOND)
|
||||||
return success, duration
|
return success, duration
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -151,6 +151,9 @@ class M3UPlaylistsProviderTest(unittest.TestCase):
|
|||||||
self.assertEqual(playlist.name, result.name)
|
self.assertEqual(playlist.name, result.name)
|
||||||
self.assertEqual(track.uri, result.tracks[0].uri)
|
self.assertEqual(track.uri, result.tracks[0].uri)
|
||||||
|
|
||||||
|
@unittest.skipIf(
|
||||||
|
platform.system() == 'Darwin',
|
||||||
|
'macOS 10.13 raises IOError "Illegal byte sequence" on open.')
|
||||||
def test_load_playlist_with_nonfilesystem_encoding_of_filename(self):
|
def test_load_playlist_with_nonfilesystem_encoding_of_filename(self):
|
||||||
path = os.path.join(self.playlists_dir, 'øæå.m3u'.encode('latin-1'))
|
path = os.path.join(self.playlists_dir, 'øæå.m3u'.encode('latin-1'))
|
||||||
with open(path, 'wb+') as f:
|
with open(path, 'wb+') as f:
|
||||||
@ -160,10 +163,7 @@ class M3UPlaylistsProviderTest(unittest.TestCase):
|
|||||||
|
|
||||||
self.assertEqual(len(self.core.playlists.as_list()), 1)
|
self.assertEqual(len(self.core.playlists.as_list()), 1)
|
||||||
result = self.core.playlists.as_list()
|
result = self.core.playlists.as_list()
|
||||||
if platform.system() == 'Darwin':
|
self.assertEqual('\ufffd\ufffd\ufffd', result[0].name)
|
||||||
self.assertEqual('%F8%E6%E5', result[0].name)
|
|
||||||
else:
|
|
||||||
self.assertEqual('\ufffd\ufffd\ufffd', result[0].name)
|
|
||||||
|
|
||||||
@unittest.SkipTest
|
@unittest.SkipTest
|
||||||
def test_playlists_dir_is_created(self):
|
def test_playlists_dir_is_created(self):
|
||||||
|
|||||||
@ -60,4 +60,8 @@ def test_lookup_converts_uri_metadata_to_track(audio, config, track_uri):
|
|||||||
backend = actor.StreamBackend(audio=audio, config=config)
|
backend = actor.StreamBackend(audio=audio, config=config)
|
||||||
|
|
||||||
result = backend.library.lookup(track_uri)
|
result = backend.library.lookup(track_uri)
|
||||||
assert result == [Track(length=4406, uri=track_uri)]
|
|
||||||
|
assert len(result) == 1
|
||||||
|
track = result[0]
|
||||||
|
assert track.uri == track_uri
|
||||||
|
assert track.length == 4406
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user