target might be unicode too
This commit is contained in:
parent
913eb99205
commit
2f9409d435
1 changed files with 4 additions and 0 deletions
|
@ -1124,6 +1124,8 @@ class Item(models.Model):
|
||||||
media_path = v.media.path
|
media_path = v.media.path
|
||||||
if isinstance(media_path, unicode):
|
if isinstance(media_path, unicode):
|
||||||
media_path = media_path.encode('utf-8')
|
media_path = media_path.encode('utf-8')
|
||||||
|
if isinstance(video, unicode):
|
||||||
|
video = video.encode('utf-8')
|
||||||
os.symlink(media_path, video)
|
os.symlink(media_path, video)
|
||||||
size = v.media.size
|
size = v.media.size
|
||||||
duration = v.duration
|
duration = v.duration
|
||||||
|
@ -1137,6 +1139,8 @@ class Item(models.Model):
|
||||||
media_path = v.media.path
|
media_path = v.media.path
|
||||||
if isinstance(media_path, unicode):
|
if isinstance(media_path, unicode):
|
||||||
media_path = media_path.encode('utf-8')
|
media_path = media_path.encode('utf-8')
|
||||||
|
if isinstance(video, unicode):
|
||||||
|
video = video.encode('utf-8')
|
||||||
os.symlink(media_path, video)
|
os.symlink(media_path, video)
|
||||||
size += v.media.size
|
size += v.media.size
|
||||||
duration += v.duration
|
duration += v.duration
|
||||||
|
|
Loading…
Reference in a new issue