mirror of
https://github.com/beetbox/beets.git
synced 2026-01-04 06:53:27 +01:00
adapt is_url checking for bytestring paths
This commit is contained in:
parent
1088df7242
commit
12136e1d32
1 changed files with 2 additions and 1 deletions
|
|
@ -40,9 +40,10 @@ mpd_config = config['mpd']
|
|||
def is_url(path):
|
||||
"""Try to determine if the path is an URL.
|
||||
"""
|
||||
if isinstance(path, bytes): # if it's bytes, then it's a path
|
||||
return False
|
||||
return path.split('://', 1)[0] in ['http', 'https']
|
||||
|
||||
|
||||
# Use the MPDClient internals to get unicode.
|
||||
# see http://www.tarmack.eu/code/mpdunicode.py for the general idea
|
||||
class MPDClient(mpd.MPDClient):
|
||||
|
|
|
|||
Loading…
Reference in a new issue