diff --git a/beetsplug/mpdstats.py b/beetsplug/mpdstats.py index 2b6422942..b1a01b52e 100644 --- a/beetsplug/mpdstats.py +++ b/beetsplug/mpdstats.py @@ -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):