From 2f9409d4358dd126a986f18648d8a7aa5aaeddac Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 18 Jan 2014 11:29:26 +0000 Subject: [PATCH] target might be unicode too --- pandora/item/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora/item/models.py b/pandora/item/models.py index bfbc46946..b95a3cf80 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -1124,6 +1124,8 @@ class Item(models.Model): media_path = v.media.path if isinstance(media_path, unicode): media_path = media_path.encode('utf-8') + if isinstance(video, unicode): + video = video.encode('utf-8') os.symlink(media_path, video) size = v.media.size duration = v.duration @@ -1137,6 +1139,8 @@ class Item(models.Model): media_path = v.media.path if isinstance(media_path, unicode): media_path = media_path.encode('utf-8') + if isinstance(video, unicode): + video = video.encode('utf-8') os.symlink(media_path, video) size += v.media.size duration += v.duration