fix my bug.

This commit is contained in:
Hellowlol 2017-02-11 10:58:20 +01:00
parent b37e7fefeb
commit ba9e7c6fe4

View file

@ -51,8 +51,7 @@ class PlexObject(object):
for attr in attrs:
value = self.__dict__.get(attr)
if value:
value = value.encode('utf-8')
value = str(value).replace(' ', '-')
value = str(value, errors='replace').replace(' ', '-')
value = value.replace('/library/metadata/', '')
value = value.replace('/children', '')
return value[:20]