Private GIT

Skip to content
Snippets Groups Projects
Commit 0c3283fa authored by Alexandre Beloin's avatar Alexandre Beloin
Browse files

Merge pull request #1611 from abeloin/patch-subtitle_windows

Fix subliminal not working properly on Windows.
parents 18c3f0b4 9e6ba950
No related branches found
No related tags found
No related merge requests found
...@@ -59,6 +59,10 @@ class Video(object): ...@@ -59,6 +59,10 @@ class Video(object):
self._path = None self._path = None
self.hashes = {} self.hashes = {}
if sys.platform == 'win32':
if isinstance(path, str):
path = unicode(path.encode('utf-8'))
else:
if isinstance(path, unicode): if isinstance(path, unicode):
path = path.encode('utf-8') path = path.encode('utf-8')
...@@ -228,6 +232,10 @@ def scan(entry, max_depth=3, scan_filter=None, depth=0): ...@@ -228,6 +232,10 @@ def scan(entry, max_depth=3, scan_filter=None, depth=0):
""" """
if sys.platform == 'win32':
if isinstance(entry, str):
entry = unicode(entry.encode('utf-8'))
else:
if isinstance(entry, unicode): if isinstance(entry, unicode):
entry = entry.encode('utf-8') entry = entry.encode('utf-8')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment