From 68e4ac8f5647121afdf47a4cf7e160143bdc6914 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 24 Apr 2014 14:12:11 +0000 Subject: [PATCH] make links relative --- pandora/item/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora/item/models.py b/pandora/item/models.py index 7ce7acd05..ccb945902 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -1182,6 +1182,7 @@ class Item(models.Model): media_path = media_path.encode('utf-8') if isinstance(video, unicode): video = video.encode('utf-8') + media_path = os.path.relpath(media_path, os.path.dirname(video)) os.symlink(media_path, video) size = v.media.size duration = v.duration @@ -1197,6 +1198,7 @@ class Item(models.Model): media_path = media_path.encode('utf-8') if isinstance(video, unicode): video = video.encode('utf-8') + media_path = os.path.relpath(media_path, os.path.dirname(video)) os.symlink(media_path, video) size += v.media.size duration += v.duration