From 9db8b57dd2d401b0ce3a75cda38db9eda0e3cf24 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 8 Oct 2013 06:56:45 +0000 Subject: [PATCH] dont fail to create torrent for unicode titles --- pandora/item/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora/item/models.py b/pandora/item/models.py index ce1dc33f..a1086a36 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -1059,6 +1059,8 @@ class Item(models.Model): return base = self.path('torrent') base = os.path.abspath(os.path.join(settings.MEDIA_ROOT, base)) + if isinstance(base, unicode): + base = base.encode('utf-8') if os.path.exists(base): shutil.rmtree(base) ox.makedirs(base)